Intel® Ethernet Controller E810 Data Plane Development Kit (DPDK) 22.11/23.03

Configuration Guide

ID 764257
Date 06/16/2023
Version 22.11
Document Table of Contents

Q-in-Q Support

Q-in-Q, also known as double virtual LAN (VLAN) or VLAN stacking, is a standardized, networking technique that allows a packet to be encapsulated by two or more VLAN tags. VLAN complies with the IEEE standard 802.1Q, and is a method of segmenting traffic by adding an additional L2 header to tag Ethernet frames with a given ID. Q-in-Q adds two headers (or VLAN tags) to an Ethernet packet instead of just one. Q-in-Q complies with the IEEE 802.1ad specification.

Q-in-Q and single VLAN provide similar benefits like added security through network segmentation and logical organization of large networks. While VLAN provides approximately 4K segmentations, the additional tag in Q-in-Q expands this range to over 16 million separate VLANs.

DPDK supports Q-in-Q on both PF and VF interfaces, used either in the host environment or in a VM. Because of this flexibility, proper Q-in-Q configuration varies depending on the environment and the desired outcome. The following commands and examples are provided as a starting point for exploring this feature.

  • To enable Q-in-Q in an active testpmd session, use the following command: testpmd> vlan set extend on (port_id)
  • To set inner and outer TPID for packet filtering on a port, use the following command: testpmd> vlan set (inner | outer) tpid (value) (port_id)

VLAN stripping is also available for both inner and outer tags.

  • To strip the outer VLAN on Q-in-Q packets use the following command. This command will strip the VLAN tag on single VLAN packets as well. testpmd> vlan set strip on (port_id)
  • To strip the inner tag from Q-in-Q packets use the following command: testpmd> vlan set qinq_strip on (port_id)

In the following example, VLAN and Q-in-Q handling are enabled on port 0, and inner and outer tag filters are configured for different EtherTypes. Stripping of the outer VLAN tag is enabled on the port as well.

testpmd> vlan set filter on 0 testpmd> vlan set extend on 0 testpmd> vlan set inner tpid 0x8100 0 testpmd> vlan set outer tpid 0x88A8 0 testpmd> vlan set strip on 0

For additional VLAN configuration options with testpmd, see the Testpmd Runtime Functions page in the dpdk.org documentation:

https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html