Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macsec/show_macsec]: Don't cache XPN in macsec stats #20654

Merged

Conversation

liamkearney-msft
Copy link
Contributor

@liamkearney-msft liamkearney-msft commented Oct 31, 2024

Why I did it

XPN is not a stat, it is a reflection of the SA state, so it should not be cleared on sonic-clear macsec.

Work item tracking

How I did it

Only apply the stats cache for macsec on values that are explicitly stats (ie. start with "SAI_MACSEC_SA_STAT")

How to verify it

Run some traffic on a macsec session, clear the counters, and then show them and make sure XPN is not reset

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • [x ] 202405

Tested branch (Please provide the tested image version)

202205

Description for the changelog

Existing implementation would also cache XPN / SAI_MACSEC_ATTR values, which should not be reset on a sonic-clear macsec command. Change the show command to only look at SAI_MACSEC_SA_STAT values when accounting for the cache

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Existing implementation would also cache XPN / SAI_MACSEC_ATTR values, which
should not be reset on a sonic-clear macsec command. Change the show
command to only look at SAI_MACSEC_SA_STAT values when accounting for
the cache

Signed-off-by: Liam Kearney <liamkearney@microsoft.com>
@liamkearney-msft liamkearney-msft changed the title [macsec/show_macsec]: Only cache macsec stats [macsec/show_macsec]: Don't cache XPN in macsec stats Oct 31, 2024
@arlakshm
Copy link
Contributor

arlakshm commented Nov 5, 2024

@judyjoseph, can you signoff on this PR

Copy link
Contributor

@judyjoseph judyjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lguohan lguohan merged commit 3cb17c0 into sonic-net:master Nov 19, 2024
22 checks passed
github-actions bot pushed a commit to bradh352/sonic-buildimage that referenced this pull request Nov 19, 2024
Existing implementation would also cache XPN / SAI_MACSEC_ATTR values, which
should not be reset on a sonic-clear macsec command. Change the show
command to only look at SAI_MACSEC_SA_STAT values when accounting for
the cache

Signed-off-by: Liam Kearney <liamkearney@microsoft.com>
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Nov 30, 2024
Existing implementation would also cache XPN / SAI_MACSEC_ATTR values, which
should not be reset on a sonic-clear macsec command. Change the show
command to only look at SAI_MACSEC_SA_STAT values when accounting for
the cache

Signed-off-by: Liam Kearney <liamkearney@microsoft.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #20971

mssonicbld pushed a commit that referenced this pull request Nov 30, 2024
Existing implementation would also cache XPN / SAI_MACSEC_ATTR values, which
should not be reset on a sonic-clear macsec command. Change the show
command to only look at SAI_MACSEC_SA_STAT values when accounting for
the cache

Signed-off-by: Liam Kearney <liamkearney@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants