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] Refactor the logic of macsec name map #2348

Merged
merged 5 commits into from
Jun 24, 2022

Conversation

jimmyzhai
Copy link
Contributor

What I did

  1. Add/remove macsec name map w/o gearbox correctly
  2. Add macsec counter unit test

Why I did it
When install/uninstall macsec flex counter, add/remove the name map entry correctly.

How I verified it

sudo pytest -v --dvsname=vs test_macsec.py
=================================================================== test session starts ====================================================================
platform linux -- Python 3.8.10, pytest-4.6.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/junhuazhai/workspace/sonic-buildimage/src/sonic-swss/tests
plugins: flaky-3.7.0
collected 3 items

test_macsec.py::TestMACsec::test_macsec_term_orch PASSED                                                                                             [ 33%]
test_macsec.py::TestMACsec::test_macsec_attribute_change PASSED                                                                                      [ 66%]
test_macsec.py::test_nonflaky_dummy PASSED                                                                                                           [100%]

================================================================ 3 passed in 65.58 seconds =================================================================

Details if related

@@ -678,23 +701,23 @@ def test_macsec_term_orch(self, dvs: conftest.DockerVirtualSwitch, testlog):
macsec_port_identifier,
1))
assert(
inspector.get_macsec_sa(
macsec_port,
inspector.get_macsec_xpn_counter(
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep original checker

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

@jimmyzhai jimmyzhai requested a review from Pterosaur June 24, 2022 05:52
@jimmyzhai jimmyzhai merged commit 1ed0b4b into sonic-net:master Jun 24, 2022
yxieca pushed a commit that referenced this pull request Jun 25, 2022
* Add/remove macsec name map w/o gearbox correctly
* Add macsec counter unit test
jimmyzhai added a commit to sonic-net/sonic-buildimage that referenced this pull request Jun 27, 2022
2022-06-24 93af69c: [PFC_WD] Avoid applying ZeroBuffer Profiles to ingress PG when a PFC storm is detected (sonic-net/sonic-swss#2304)
2022-06-24 37349cf: [swssconfig] Optimize performance of swssconfig (sonic-net/sonic-swss#2336)
2022-06-24 84e9b07: [fdborch] fix heap-use-after-free in clearFdbEntry() (sonic-net/sonic-swss#2353)
2022-06-24 1b8bd94: Create ACL table fails due to incorrect check for supported ACL actions #11235 (sonic-net/sonic-swss#2351)
2022-06-24 1ed0b4b: [macsec] Refactor the logic of macsec name map (sonic-net/sonic-swss#2348)
2022-06-23 f88f992: [mock_tests] Add Sflow Orch UTs (sonic-net/sonic-swss#2295)
2022-06-23 ec57bf1: [macsec] Update macsec flex counter (sonic-net/sonic-swss#2338)
2022-06-22 6e0fc85: [ACL] Support stage particular match fields (sonic-net/sonic-swss#2341)
2022-06-22 efb4530: [orchagent, DTel]: report session support to set user vrf (sonic-net/sonic-swss#2326)
2022-06-22 d82874d: Fix for "orchagent crashed when trying to delete fdb static entry with swssconfig #11046" (sonic-net/sonic-swss#2332)
2022-06-22 0c789e6: Fix qos map test in vs test (sonic-net/sonic-swss#2343)
2022-06-17 1bb5070: Enhance mock test for dynamic buffer manager for port removing and qos reload flows (sonic-net/sonic-swss#2262)
2022-06-16 700492f: [aclorch] Fix and simplify DTel watchlist tables and entries (sonic-net/sonic-swss#2155)
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
* Add/remove macsec name map w/o gearbox correctly
* Add macsec counter unit test
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.

None yet

3 participants