@@ -36,13 +36,13 @@ class TestDynamicConfig(TestSuite):
1. Default mode: verify packets are received and forwarded.
2. Disable promiscuous mode: verify that packets are received
- only for the packet with destination address matching the port address.
+ only for the packet with destination address matching the port address.
3. 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.
+ MAC address not matching the port are received and not forwarded, and verify
+ that broadcast packets are received and forwarded.
4. 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.
+ MAC address not matching the port are received and not forwarded, and verify
+ that multicast packets are received and forwarded.
"""
def send_packet_and_verify(self, should_receive: bool, mac_address: str) -> None:
@@ -93,13 +93,13 @@ def test_add_remove_mac_addresses(self) -> None:
the properties applied to the PMD at any given time.
Test:
- Start TestPMD without promiscuous mode.
- Send a packet with the port's default mac address. (Should receive)
- Send a packet with fake mac address. (Should not receive)
- Add fake mac address to the PMD's address pool.
- Send a packet with the fake mac address to the PMD. (Should receive)
- Remove the fake mac address from the PMD's address pool.
- Send a packet with the fake mac address to the PMD. (Should not receive)
+ * Start TestPMD without promiscuous mode.
+ * Send a packet with the port's default mac address. (Should receive)
+ * Send a packet with fake mac address. (Should not receive)
+ * Add fake mac address to the PMD's address pool.
+ * Send a packet with the fake mac address to the PMD. (Should receive)
+ * Remove the fake mac address from the PMD's address pool.
+ * Send a packet with the fake mac address to the PMD. (Should not receive)
"""
with TestPmdShell() as testpmd:
testpmd.set_promisc(0, enable=False)
@@ -127,15 +127,15 @@ def test_invalid_address(self) -> None:
built-in hardware address, or exceed their address pools.
Test:
- Start TestPMD.
- Attempt to add an invalid mac address. (Should fail)
- Attempt to remove the device's hardware address with no additional addresses in the
- address pool. (Should fail)
- Add a fake mac address to the pool twice in succession. (Should not create any errors)
- Attempt to remove the device's hardware address with other addresses in the address
- pool. (Should fail)
- Determine the device's mac address pool size, and fill the pool with fake addresses.
- Attempt to add another fake mac address, overloading the address pool. (Should fail)
+ * Start TestPMD.
+ * Attempt to add an invalid mac address. (Should fail)
+ * Attempt to remove the device's hardware address with no additional addresses in the
+ address pool. (Should fail)
+ * Add a fake mac address to the pool twice in succession. (Should not create any errors)
+ * Attempt to remove the device's hardware address with other addresses in the address
+ pool. (Should fail)
+ * Determine the device's mac address pool size, and fill the pool with fake addresses.
+ * Attempt to add another fake mac address, overloading the address pool. (Should fail)
"""
with TestPmdShell() as testpmd:
testpmd.start()
@@ -185,11 +185,11 @@ def test_multicast_filter(self) -> None:
to the PMD.
Test:
- Start TestPMD without promiscuous mode.
- Add a fake multicast address to the PMD's multicast address pool.
- Send a packet with the fake multicast address to the PMD. (Should receive)
- Remove the fake multicast address from the PMDs multicast address filter.
- Send a packet with the fake multicast address to the PMD. (Should not receive)
+ * Start TestPMD without promiscuous mode.
+ * Add a fake multicast address to the PMD's multicast address pool.
+ * Send a packet with the fake multicast address to the PMD. (Should receive)
+ * Remove the fake multicast address from the PMDs multicast address filter.
+ * Send a packet with the fake multicast address to the PMD. (Should not receive)
"""
with TestPmdShell() as testpmd:
testpmd.start()
@@ -48,8 +48,7 @@ def set_up_suite(self) -> None:
"""Set up the test suite.
Setup:
- Set traffic generator MTU lengths to a size greater than scope of all
- test cases.
+ Set traffic generator MTU lengths to a size greater than scope of all test cases.
"""
self.topology.tg_port_egress.configure_mtu(JUMBO_MTU + 200)
self.topology.tg_port_ingress.configure_mtu(JUMBO_MTU + 200)
@@ -89,12 +88,13 @@ def assess_mtu_boundary(self, testpmd_shell: TestPmdShell, mtu: int) -> None:
will not.
First, start testpmd and update the MTU. Then ensure the new value appears
- on port info for all ports.
- Next, start packet capturing and send 3 different lengths of packet and verify
- they are handled correctly.
- # 1. VENDOR_AGNOSTIC_PADDING units smaller than the MTU specified.
- # 2. Equal to the MTU specified.
- # 3. VENDOR_AGNOSTIC_PADDING units larger than the MTU specified (should be fragmented).
+ on port info for all ports. Next, start packet capturing and send 3 different lengths of
+ packet and verify they are handled correctly:
+
+ 1. VENDOR_AGNOSTIC_PADDING units smaller than the MTU specified.
+ 2. Equal to the MTU specified.
+ 3. VENDOR_AGNOSTIC_PADDING units larger than the MTU specified (should be fragmented).
+
Finally, stop packet capturing.
Args:
@@ -126,35 +126,35 @@ def test_runtime_mtu_updating_and_forwarding(self) -> None:
"""Verify runtime MTU adjustments and assess packet forwarding behavior.
Test:
- Start TestPMD in a paired topology.
- Set port MTU to 1500.
- Send packets of 1491, 1500 and 1509 bytes.
- Verify the first two packets are forwarded and the last is dropped.
-
- Set port MTU to 2400.
- Send packets of 1491, 1500 and 1509 bytes.
- Verify all three packets are forwarded.
- Send packets of 2391, 2400 and 2409 bytes.
- Verify the first two packets are forwarded and the last is dropped.
-
- Set port MTU to 4800.
- Send packets of 1491, 1500 and 1509 bytes.
- Verify all three packets are forwarded.
- Send packets of 4791, 4800 and 4809 bytes.
- Verify the first two packets are forwarded and the last is dropped.
-
- Set port MTU to 9000.
- Send packets of 1491, 1500 and 1509 bytes.
- Verify all three packets are forwarded.
- Send packets of 8991, 9000 and 9009 bytes.
- Verify the first two packets are forwarded and the last is dropped.
+ * Start TestPMD in a paired topology.
+ * Set port MTU to 1500.
+ * Send packets of 1491, 1500 and 1509 bytes.
+ * Verify the first two packets are forwarded and the last is dropped.
+
+ * Set port MTU to 2400.
+ * Send packets of 1491, 1500 and 1509 bytes.
+ * Verify all three packets are forwarded.
+ * Send packets of 2391, 2400 and 2409 bytes.
+ * Verify the first two packets are forwarded and the last is dropped.
+
+ * Set port MTU to 4800.
+ * Send packets of 1491, 1500 and 1509 bytes.
+ * Verify all three packets are forwarded.
+ * Send packets of 4791, 4800 and 4809 bytes.
+ * Verify the first two packets are forwarded and the last is dropped.
+
+ * Set port MTU to 9000.
+ * Send packets of 1491, 1500 and 1509 bytes.
+ * Verify all three packets are forwarded.
+ * Send packets of 8991, 9000 and 9009 bytes.
+ * Verify the first two packets are forwarded and the last is dropped.
Verify:
- Verifies the successful forwarding of packets via a search for an inserted payload.
- If the payload is found, the packet was transmitted successfully. Otherwise, the packet
- is considered dropped.
+ * Verifies the successful forwarding of packets via a search for an inserted payload.
+ If the payload is found, the packet was transmitted successfully. Otherwise, the
+ packet is considered dropped.
- Verify that standard MTU packets forward, in addition to packets within the limits of
- an MTU size set during runtime.
+ * Verify that standard MTU packets forward, in addition to packets within the limits of
+ an MTU size set during runtime.
"""
with TestPmdShell(tx_offloads=0x8000, mbuf_size=[JUMBO_MTU + 200]) as testpmd:
testpmd.set_port_mtu_all(1500, verify=True)
@@ -185,16 +185,16 @@ def test_cli_mtu_forwarding_for_std_packets(self) -> None:
"""Assesses packet forwarding of standard MTU packets after pre-runtime MTU adjustments.
Test:
- Start TestPMD with MTU size of 1518 bytes, set pre-runtime.
- Send packets of size 1491, 1500 and 1509 bytes.
- Verify the first two packets are forwarded and the last is dropped.
+ * Start TestPMD with MTU size of 1518 bytes, set pre-runtime.
+ * Send packets of size 1491, 1500 and 1509 bytes.
+ * Verify the first two packets are forwarded and the last is dropped.
Verify:
- Verifies the successful forwarding of packets via a search for an inserted payload.
- If the payload is found, the packet was transmitted successfully. Otherwise, the packet
- is considered dropped.
+ * Verifies the successful forwarding of packets via a search for an inserted payload.
+ If the payload is found, the packet was transmitted successfully. Otherwise, the
+ packet is considered dropped.
- Verify the first two packets are forwarded and the last is dropped after pre-runtime
- MTU modification.
+ * Verify the first two packets are forwarded and the last is dropped after pre-runtime
+ MTU modification.
"""
with TestPmdShell(
tx_offloads=0x8000,
@@ -215,14 +215,14 @@ def test_cli_jumbo_forwarding_for_jumbo_mtu(self) -> None:
"""Assess packet forwarding of packets within the bounds of a pre-runtime MTU adjustment.
Test:
- Start TestPMD with MTU size of 9018 bytes, set pre-runtime.
- Send packets of size 8991, 9000 and 1509 bytes.
+ * Start TestPMD with MTU size of 9018 bytes, set pre-runtime.
+ * Send packets of size 8991, 9000 and 1509 bytes.
Verify:
- Verifies the successful forwarding of packets via a search for an inserted payload.
- If the payload is found, the packet was transmitted successfully. Otherwise, the packet
- is considered dropped.
+ * Verifies the successful forwarding of packets via a search for an inserted payload.
+ If the payload is found, the packet was transmitted successfully. Otherwise, the
+ packet is considered dropped.
- Verify that all packets are forwarded after pre-runtime MTU modification.
+ * Verify that all packets are forwarded after pre-runtime MTU modification.
"""
with TestPmdShell(
tx_offloads=0x8000,
@@ -241,16 +241,16 @@ def test_cli_mtu_std_packets_for_jumbo_mtu(self) -> None:
"""Assess boundary of jumbo MTU value set pre-runtime.
Test:
- Start TestPMD with MTU size of 9018 bytes, set pre-runtime.
- Send a packets of size 8991, 9000 and 9009 bytes.
- Verify the first two packets are forwarded and the last is dropped.
+ * Start TestPMD with MTU size of 9018 bytes, set pre-runtime.
+ * Send a packets of size 8991, 9000 and 9009 bytes.
+ * Verify the first two packets are forwarded and the last is dropped.
Verify:
- Verifies the successful forwarding of packets via a search for an inserted payload.
- If the payload is found, the packet was transmitted successfully. Otherwise, the packet
- is considered dropped.
+ * Verifies the successful forwarding of packets via a search for an inserted payload.
+ If the payload is found, the packet was transmitted successfully. Otherwise, the
+ packet is considered dropped.
- Verify the first two packets are forwarded and the last is dropped after pre-runtime
- MTU modification.
+ * Verify the first two packets are forwarded and the last is dropped after pre-runtime
+ MTU modification.
"""
with TestPmdShell(
tx_offloads=0x8000,