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

Adding a new testcase to check if mac learning happens correctly #13912

Merged

Conversation

CharudattaSChitale
Copy link
Contributor

@CharudattaSChitale CharudattaSChitale commented Aug 1, 2024

What is the motivation for this PR?
When the DUT performs MAC Learning, a situation may arise such that even if the interface is shutdown, 'show mac' will show previously learnt MAC addresses on the 'Down' interfaces. These stale entries will persist even after doing 'sonic-clear fdb all'
This Testcase covers this scenario and makes sure that stale entries are removed

How did you do it?
Followed below steps to recreate the scenario
-shut down all ports
-config save
-config reload
-bring up 1 port. populate fdb
-bring up 3 more ports. populate fdb.
-shut down 3 ports added in last step
-verify that MAC entries connected to shutdown ports are gone from MAC table
-sonic-clear fdb all
-populate fdb for the UP port
-verify that the MAC entries connected to shutdown ports don't show up in the MAC table again

Type of change
-Test case(new)

Back port request
-202305
-202311
-202405

How did you verify/test it?
Tested on an Image which does not have a fix for this issue. Made sure that TC fails.
Tested on an Image with the fix. Made sure that TC passes.

@wsycqyz
Copy link
Contributor

wsycqyz commented Aug 5, 2024

@CharudattaSChitale Suggest not back port to 202305? Can we?

@CharudattaSChitale
Copy link
Contributor Author

The original MAC Learning issue was found in 202305 (https://migsonic.atlassian.net/browse/MIGSMSFT-424)
It would be good to backport this script to 202305 also

@kevinskwang
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kevinskwang kevinskwang merged commit 2d42037 into sonic-net:master Sep 27, 2024
18 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Sep 27, 2024
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #14779

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.

4 participants