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

Add test case for testing zero source MAC address handling in dualtor #14693

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Janetxxx
Copy link
Contributor

Description of PR

Summary:
Add test case to Hackathon testgap #9344

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

Cover the scenario when two servers in the same rack are down together, invalid source MAC address from two ports should not be learned by the dualtor.

How did you do it?

Generate and send ICMP packets with a zero source MAC address from two randomly selected ports and verify that the MAC table doesn't contain the zero MAC (the zero MAC shouldn't be learned).

How did you verify/test it?

Validate it in internal setup

------------------------------------------------------------------------------------------- live log sessionfinish -------------------------------------------------------------------------------------------
03:05:42 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
================================================================================== 1 passed, 1 warning in 151.68s (0:02:31) ==================================================================================

Any platform specific information?

vms21-dual-t0-7260

Supported testbed topology if it's a new test case?

dualtor-120

Documentation

Signed-off-by: Janetxxx <janet970527@gmail.com>
Signed-off-by: Janetxxx <janet970527@gmail.com>
test_ports = random.sample(list(mux_configs.keys()), 2)
logging.info("Selected test ports: %s", pprint.pformat(test_ports))
# send zero source MAC ICMP packets from the selected ports
zero_mac_packet_sender = send_zero_mac_packets(test_ports)
Copy link
Contributor

Choose a reason for hiding this comment

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

The fanout switches might drop those packets as it has zero src mac, so the device cannot receive them.
Could you pls confirm?

Copy link
Contributor

Choose a reason for hiding this comment

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

You might have to start a script on leaf fanout to send packets. There should be some examples in pfcwd test cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

having a script running the DUT to send/receive heartbeats could also work

@Janetxxx Janetxxx changed the title Test zero source MAC address handling in dualtor Add test case for testing zero source MAC address handling in dualtor Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants