qinq Test Suite

QinQ (802.1ad) Test Suite.

This test suite verifies the correctness and capability of DPDK Poll Mode Drivers (PMDs) in handling QinQ-tagged Ethernet frames, which contain a pair of stacked VLAN headers (outer S-VLAN and inner C-VLAN). These tests ensure that both software and hardware offloads related to QinQ behave as expected across different NIC vendors and PMD implementations.

class TestQinq

Bases: TestSuite

QinQ test suite.

This suite consists of 2 test cases:

1. QinQ Forwarding: Send a QinQ packet and verify the received packet contains both QinQ/VLAN layers. 2. QinQ Strip: Enable VLAN/QinQ stripping and verify sent packets are received with the expected VLAN/QinQ layers.

test_qinq_forwarding() None

QinQ Rx filter test case.

Steps:

Launch testpmd with mac forwarding mode. Disable VLAN filter mode on port 0. Send test packet and capture verbose output.

Verify:

Check that the received packet has two separate VLAN layers in proper QinQ fashion. Check that the received packet outer and inner VLAN layer has the appropriate ID.

test_qinq_strip() None

Test combinations of VLAN/QinQ strip settings with various QinQ packets.

Steps:

Launch testpmd with QinQ and VLAN strip enabled. Send four VLAN/QinQ related test packets.

Verify:

Check received packets have the expected VLAN/QinQ layers/tags.