vlan Test Suite
Test the support of VLAN Offload Features by Poll Mode Drivers.
This test suite verifies that VLAN filtering, stripping, and header insertion all function as expected. When a VLAN ID is in the filter list, all packets with that ID should be forwarded and all others should be dropped. While stripping is enabled, packets sent with a VLAN ID should have the ID removed and then be forwarded. Additionally, when header insertion is enabled packets without a VLAN ID should have a specified ID inserted and then be forwarded.
- class TestVlan
Bases:
TestSuiteDPDK VLAN test suite.
Ensures VLAN packet reception, stripping, and insertion on the Poll Mode Driver when the appropriate conditions are met. The suite contains four test cases:
1. VLAN reception no stripping - verifies that a VLAN packet with a tag within the filter list is received. 2. VLAN reception stripping - verifies that a VLAN packet with a tag within the filter list is received without the VLAN tag. 3. VLAN no reception - verifies that a VLAN packet with a tag not within the filter list is dropped. 4. VLAN insertion - verifies that a non VLAN packet is received with a VLAN tag when insertion is enabled.
- vlan_receipt_no_stripping() None
Verify packets are received with their VLAN IDs when stripping is disabled.
- Steps:
Start testpmd.
Set up VLAN.
Send and capture VLAN packet.
- Verify:
Packets are received with their VLAN IDS.
- vlan_receipt_stripping() None
Ensure VLAN packet received with no tag when receipts and header stripping are enabled.
- Steps:
Start testpmd.
Set up VLAN.
Send and capture VLAN packet with the packet header stripped.
- Verify:
Packets are received with no tag when receipts and header stripping are enabled.
- vlan_no_receipt() None
Ensure VLAN packet dropped when filter is on and sent tag not in the filter list.
- Steps:
Start testpmd.
Set up VLAN.
Send VLAN packets.
- Verify:
VLAN packets are dropped.
- vlan_header_insertion() None
Ensure that VLAN packet is received with the correct inserted VLAN tag.
- Steps:
Start testpmd.
Set forwarding mode to MAC.
Disable promiscuous mode.
Enable Tx VLAN and set the VLAN tag.
Send and capture VLAN packets.
- Verify:
VLAN packets are received with the correct inserted VLAN tag.
- required_capabilities: ClassVar[set[Capability]] = {9}
The capabilities the test case or suite requires in order to be executed.