-
Notifications
You must be signed in to change notification settings - Fork 743
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]: test macsec counters over rekey, and clear command #15161
[macsec]: test macsec counters over rekey, and clear command #15161
Conversation
f7b6067
to
80412a0
Compare
Note that the test across rekey is a known failure - see : sonic-net/sonic-buildimage#19311 |
tests/macsec/macsec_helper.py
Outdated
|
||
def get_macsec_counters(sonic_asic, port): | ||
cmd = f"show macsec {port}" | ||
output = sonic_asic.sonichost.command(cmd)["stdout"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command is support at the Linecard level. We can get the output from duthost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes lgtm. couple of minor comments
tests/macsec/test_dataplane.py
Outdated
ingress_counters = Counter() | ||
for up_port in up_ports: | ||
|
||
asic = duthost.get_port_asic_instance(up_port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not have get te asic instance here the. show macsec
works on the linecard level
80412a0
to
8958759
Compare
@arlakshm I've addressed your comments, and also updated macsec setup to use config commands rather than poking the configdb directly. Would appreciate a re-review |
* test macsec counters over rekey * use show command for counters * use config instead of hitting configdb directly * test macsec counters clear Signed-off-by: Liam Kearney <[email protected]>
8958759
to
887d7d2
Compare
pipeline is failing due to a bug in config macsec command - If a port has macsec config deleted without it existing, the command crashes with the following backtrace:
Ticket in buildimage for this : sonic-net/sonic-buildimage#20631 |
Signed-off-by: Liam Kearney <[email protected]>
(it is bad practice to assert in fixtures) Signed-off-by: Liam Kearney <[email protected]>
Ive reverted the change to use config - will address in future PR |
Signed-off-by: Liam Kearney <[email protected]>
@liamkearney-msft I feel it is good to have a separate test : test_clear_counters : than modifying the existing counter test. Additionally, as a first step let us add the test to do clear counters functionality without rekey. We have a Brcm CSP still open (sonic-net/sonic-buildimage#19311) to fix the clear counters after rekey. Will enhance the test_clear_counters for rekey once this fix is merged. |
Sure. Will close this and reopen with "just counters", and another with "test across rekey" |
Summary:
Fixes #13347
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix test gap by adding sonic-clear macsec tests and testing over rekeys
How did you verify/test it?
Ran on macsec t2 chassis, using profiles with rekeys and without
https://elastictest.org/scheduler/testplan/6720229a42c9736d8d478924