Added a new testcase for macsec_gearbox#4182
Open
shreyansh-nexthop wants to merge 3 commits intosonic-net:masterfrom
Open
Added a new testcase for macsec_gearbox#4182shreyansh-nexthop wants to merge 3 commits intosonic-net:masterfrom
shreyansh-nexthop wants to merge 3 commits intosonic-net:masterfrom
Conversation
|
|
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Shreyansh Jain <shreyansh@nexthop.ai>
243c4af to
8324132
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
|
Hi, @judyjoseph, can you please help with the review? This is based on the review comment given on PR#3926. I went ahead with the dynamically generating phy approach, as adding a second PHY to File: src/sonic-sairedis/vslib/VirtualSwitchSaiInterface.cpp if (m_switchStateMap.size() == 1) {
switch_id = m_switchStateMap.begin()->first;
} else {
SWSS_LOG_THROW("multiple switches not supported, FIXME");
} |
Contributor
|
Hi @prsunny , Please help to get this PR reviewed. Thanks |
Collaborator
|
@judyjoseph , please review and signoff. Lgtm |
Collaborator
|
@shreyansh-nexthop , could you rebase? |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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
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.
Why I did it
macsec_supported=trueand others havemacsec_supported=false. This validates the scenario where a platform owner enables MACsec support only for specific gearbox PHYs. Got this as part of review comment for PR#3926.How I did it
Added test_macsec_mixed_phy_support test case that:
Added/Modified helper functions in gearbox.py:
reassign_interface_to_phy():Reassigns an existing interface to a new PHY (creates the PHY if needed)get_gearbox_port_by_phy():Gets a port connected to a specific PHYverify_macsec_for_port_in_asic_db()andverify_macsec_for_port_in_gb_asic_db:Modified the old helper functionsThis is more robust as it verifies if the macsec is configured for the right interface or not.How to verify it
It can be verified by running the testcase
TestMacsecGearbox::test_macsec_mixed_phy_supportWhich release branch to backport