-
Notifications
You must be signed in to change notification settings - Fork 644
[gearsyncd,macsec]: Deterministic MACsec backend selection for gearbox ports #3926
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
Open
rajshekhar-nexthop
wants to merge
2
commits into
sonic-net:master
Choose a base branch
from
nexthop-ai:rajshekhar.macsec_gearbox
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[gearsyncd,macsec]: Deterministic MACsec backend selection for gearbox ports #3926
rajshekhar-nexthop
wants to merge
2
commits into
sonic-net:master
from
nexthop-ai:rajshekhar.macsec_gearbox
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ec74bde to
ca0690b
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…csec_supported fix Why I did it On gearbox ports, creating MACsec on the PHY switch fails with SAI_STATUS_NOT_IMPLEMENTED if the gearbox PHY lacks a MACsec engine. A fix for this issue has already been committed. This PR aims to create the corresponding test case to validate that fix. How I did it Have added three testcases: - test_macsec_phy_switch_default: This tests the scenario when the macsec_supported field is absent in the gearbox_config.json - test_macsec_phy_switch_explicit: This tests the scenario when the macsec_supported field is set as true in the gearbox_config.json - test_macsec_npu_switch: This tests the scenario when the macsec_supported field is set as false in the gearbox_config.json Some helpers functions: - verify_macsec_in_asic_db: This verifies if the ASIC_DB has the required entries created or not. - verify_macsec_in_gb_asic_db: This verifies if the GB_ASIC_DB has the required entries created or not. - setup_gearbox_table: The job of this function is change the value of macsec_supported field. It modifies the value as per the requirement of the testcase. It writes the file gearbox_config.json - enable_macsec_on_port: Helper function to enable macsec. - cleanup_macsec: Helper function to delete macsec configuration.
ca0690b to
aeca8bc
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Introduce a platform capability flag in the gearbox config to determine, per PHY, whether MACsec is supported (applies to all ports mapped to that PHY). MACsec orchestration will:
Have added three DVS testcases:
test_macsec_phy_switch_default: This tests the scenario when the macsec_supported field is absent in the gearbox_config.json
test_macsec_phy_switch_explicit: This tests the scenario when the macsec_supported field is set as true in the gearbox_config.json
test_macsec_npu_switch: This tests the scenario when the macsec_supported field is set as false in the gearbox_config.json
Why I did it
On gearbox ports, creating MACsec on the PHY switch fails (SAI_STATUS_NOT_IMPLEMENTED) if gearbox PHY does not have the MACsec engine.
How I verified it
Manually verified on DUT by adding macsec_supported=false in gearbox_config.json and configuring the macsec on the PHY port. Also ran the dvs testcase and made sure it is passing
sudo pytest -v tests/test_macsec_gearbox.pyDetails if related
HLD: sonic-net/SONiC#2072
gearbox_config.json changes are posted here: https://github.com/sonic-net/sonic-buildimage/pull/24169/files#diff-737ea59a7eba8ea0ed71a15a052868815f7faad351fd353736ad196932bed57a