uni_pkt Test Suite
Unified packet type flag testing suite.
According to DPDK documentation, each Poll Mode Driver should reserve 32 bits of packet headers for unified packet type flags. These flags serve as an identifier for user applications, and are divided into subcategories: L2, L3, L4, tunnel, inner L2, inner L3, and inner L4 types. This suite verifies the ability of the driver to recognize these types.
- class TestUniPkt
Bases:
TestSuiteDPDK Unified packet test suite.
This testing suite uses testpmd’s verbose output hardware/software packet type field to verify the ability of the driver to recognize unified packet types when receiving different packets.
- l2_packet_detect() None
Ensure the correct flags are shown in verbose output when sending L2 packets.
- Steps:
Create a list of packets to test, with a corresponding flag list to check against.
Launch testpmd with the necessary configuration.
Send each packet in the list, capture testpmd verbose output.
- Verify:
Each packet has a destination MAC address matching the set ID.
Packet type flags match in verbose output, verify the flags match.
- l3_l4_packet_detect() None
Ensure correct flags are shown in the verbose output when sending IP/L4 packets.
- Steps:
Create a list of packets to test, with a corresponding flag list to check against.
Launch testpmd with the necessary configuration.
Send each packet in the list, capture testpmd verbose output.
- Verify:
Each packet has a destination MAC address matching the set ID.
Packet type flags match in verbose output, verify the flags match.
- ipv6_l4_packet_detect() None
Ensure correct flags are shown in the verbose output when sending IPv6/L4 packets.
- Steps:
Create a list of packets to test, with a corresponding flag list to check against.
Launch testpmd with the necessary configuration.
Send each packet in the list, capture testpmd verbose output.
- Verify:
Each packet has a destination MAC address matching the set ID.
Packet type flags match in verbose output, verify the flags match.
- l3_tunnel_packet_detect() None
Ensure correct flags are shown in the verbose output when sending IPv6/L4 packets.
- Steps:
Create a list of packets to test, with a corresponding flag list to check against.
Launch testpmd with the necessary configuration.
Send each packet in the list, capture testpmd verbose output.
- Verify:
Each packet has a destination MAC address matching the set ID.
Packet type flags match in verbose output, verify the flags match.
- gre_tunnel_packet_detect() None
Ensure the correct flags are shown in the verbose output when sending GRE packets.
- Steps:
Create a list of packets to test, with a corresponding flag list to check against.
Launch testpmd with the necessary configuration.
Send each packet in the list, capture testpmd verbose output.
- Verify:
Each packet has a destination MAC address matching the set ID.
Packet type flags match in verbose output, verify the flags match.
- nsh_packet_detect() None
Verify the correct flags are shown in the verbose output when sending NSH packets.
- Steps:
Create a list of packets to test, with a corresponding flag list to check against.
Launch testpmd with the necessary configuration.
Send each packet in the list, capture testpmd verbose output.
- Verify:
Each packet has a destination MAC address matching the set ID.
Packet type flags match in verbose output, verify the flags match.
- vxlan_tunnel_packet_detect() None
Ensure the correct flags are shown in the verbose output when sending VXLAN packets.
- Steps:
Create a list of packets to test, with a corresponding flag list to check against.
Add a UDP port for VXLAN packet filter within testpmd.
Launch testpmd with the necessary configuration.
Send each packet in the list, capture testpmd verbose output.
- Verify:
Each packet has a destination MAC address matching the set ID.
Packet type flags match in verbose output, verify the flags match.