Skip to content

FDB Scale Test Plan

Xin Wang edited this page Apr 25, 2019 · 2 revisions

Overview

The purpose of this test is to check the FDB correctly configured on the switch. After setup, L2 packets are sent from one member of a VLAN and expected to be received from another member of the VLAN. The destination MAC address is set to the destination VLAN member's MAC address instead of the DUT's MAC address.

Test Cases

Case 1 FDB scale test

This test case is to verify that the basic FDB learning and L2 forwarding work in case of large number of FDB entries. Idea of how to verify is to firstly inject multiple packets to each of the VLAN ports. Each of the packet should has a unique source MAC address. DUT can learn FDB entries learned on each of the VLAN ports. Then send packets to each of the VLAN ports to verify L2 forwarding. Destination MAC address of the packets are set to each of the MAC addresses previously learned. And verify that the packet is forwarded to expected VLAN ports by sniffering.

Steps

  • Clear IP address of the PTF ports connected to VLAN ports of DUT. This is to avoid the PTF interfaces sending unexpected packets.
  • Set unique MAC address for the PTF ports
  • Inject packets to DUT, FDB learning
    • Inject one packet to each VLAN ports from PTF:
      • Source MAC Address: mac address of the PTF port
      • Destination MAC address: mac address of DUT
      • Ethernet Type: Any type that should not be trapped to CPU of DUT, for example: 0x1234
    • Inject some extra number of packets to each VLAN ports from PTF, for example 10 packets
      • Source MAC Address: unique dummy MAC address
      • Destination MAC address: mac address of DUT
      • Ethernet Type: Any type that should not be trapped to CPU of DUT, for example: 0x1234
  • Verify L2 forwarding:
    • To each of the VLAN ports, inject packets with destination MAC set to MAC address of PTF ports connected to other VLAN ports.
    • Verify that the injected packet is captured on the corresponding PTF port, not on other PTF ports.
    • To each of the VLAN ports, inject packets with destination MAC set to dummy MAC address learned on other VLAN ports.
    • Verify that the injected packet is captured on the corresponding PTF port, not on other PTF ports.
  • Run the "show mac" command. Verify that the number of learned MAC addresses is expected, both the nubmer of PTF port MAC addresses and dummy MAC addresses.

Pass/Fail Criteria

  • All the injected packets should be forwarded to expected PTF port, not to other PTF ports.
  • The number of MAC addresses learned should be expected.

Automation

Automated in script: ansible/roles/test/tasks/fdb.yml

Case 2 FDB learning during initialization

This test case is to verify that all the FDB entries learned from SDK during switch initilization can be correctly reported to upper layer. At the time of writing, this test case is Mellanox platform specific because of the method of checking learned FDB entries from SDK is not common. It takes around 4 minutes to run the test. There is no point taking time to run the test and skip the platform specific verification step. If other vendors would like to run this case, they can easily refactor the script to make just the verification step platform specific.

Steps

  • Clear IP address of the PTF ports connected to VLAN ports of DUT. This is to avoid the PTF interfaces sending unexpected packets.
  • Set unique MAC address for the PTF ports.
  • Start a PTF script to inject packets to DUT:
    • Each of the injected packet as a unique dummy MAC address with common prefix.
    • Packets are injected in batch. Each batch inject the a packet to all the LAG ports and same number of VLAN ports.
    • Packets are injected to VLAN ports and LAG ports in interleaved way
    • Interval between packet injecting is 0.1 second
    • Inject packets for 200 seconds.
  • Keep the PTF script running in background.
  • Issue command "sudo config reload -y" to reload DUT.
  • After DUT is reloaded, wait until the PTF script completed execution.
  • Check the number of learned FDB entries from SDK layer. This step is platform specific. On Mellanox platform, the command for this checking is:
    • docker exec syncd sx_api_fdb_dump.py | grep {{ dummy_mac_prefix }} | wc -l
  • Check the number of learned FDB entries from upper layer:
    • show mac | grep {{ dummy_mac_prefix }} | wc -l
  • Compare the number of learned FDB entries, the two numbers should equal.

Pass/Fail Criteria

  • The number of learned FDB entries counted from SDK layer should equal to the number of learned FDB entries counted from upper layer.

Automation

Automated in script: ansible/roles/test/tasks/fdb.yml

Topology

Supported topologies: t0, t0-64, t0-116

Clone this wiki locally