dynamic_config Test Suite
Dynamic configuration capabilities test suite.
This suite checks that it is possible to change the configuration of a port dynamically. The Poll Mode Driver should be able to enable and disable promiscuous mode on each port, as well as check the Rx and Tx packets of each port. Promiscuous mode in networking passes all traffic a NIC receives to the CPU, rather than just frames with matching MAC addresses. Each test case sends a packet with a matching address, and one with an unknown address, to ensure this behavior is shown.
If packets should be received and forwarded, or received and not forwarded, depending on the configuration, the port info should match the expected behavior.
- class TestDynamicConfig
Bases:
TestSuiteDynamic config suite.
Use the show port commands to see the MAC address and promisc mode status of the Rx port on the DUT. The suite will check the Rx and Tx packets of each port after configuring promiscuous, multicast, and default mode on the DUT to verify the expected behavior. It consists of four test cases:
Default mode: verify packets are received and forwarded.
Disable promiscuous mode: verify that packets are received only for the packet with destination address matching the port address.
Disable promiscuous mode broadcast: verify that packets with destination MAC address not matching the port are received and not forwarded, and verify that broadcast packets are received and forwarded.
Disable promiscuous mode multicast: verify that packets with destination MAC address not matching the port are received and not forwarded, and verify that multicast packets are received and forwarded.
- default_mode() None
Tests default configuration.
- Steps:
Start testpmd.
Sends two packets, one matching source MAC address and one unknown.
- Verify:
Promiscuous mode is enabled by default.
Both packets are received.
- disable_promisc() None
Tests disabled promiscuous mode configuration.
- Steps:
Start testpmd.
Disables promiscuous mode.
Sends two packets, one matching source MAC address and one unknown.
- Verify:
Only the matching address packet are received.
- disable_promisc_broadcast() None
Tests broadcast reception with disabled promisc mode config.
- Steps:
Start testpmd.
Disable promiscuous mode.
Send two packets, one matching source MAC address and one broadcast.
- Verify:
Both packets are received.
- disable_promisc_multicast() None
Tests allmulticast mode with disabled promisc config.
- Steps:
Start testpmd.
Disable promiscuous mode.
Send two packets, one matching source MAC address and one multicast.
- Verify:
Multicast packets are only received when receiving multicast frames is enabled.
- required_capabilities: ClassVar[set[Capability]] = {28}
The capabilities the test case or suite requires in order to be executed.