Hardware Accelerated 802.1ad VLAN (Q-in-Q Tunneling)
Q-in-Q tunneling allows the user to create a Layer 2 Ethernet connection between two servers. The user can segregate a different VLAN traffic on a link or bundle different VLANs into a single VLAN. Q-in-Q tunneling adds a service VLAN tag before the user's 802.1Q VLAN tags.
For Q-in-Q support in virtualized environments (SR-IOV), please refer to     
"    
    
Q-in-Q    
     
Encapsulation    
     
per    
     
VF    
     
in    
     
Linux    
     
(VST)    
    
"    
.
- ConnectX-3/ConnectX-3 Pro without Rx offloads 
- Firmware version 2.34.8240 and up 
- Kernel version 3.10 and up 
- iproute-3.10.0-13.el7.x86_64 and up 
To enable device support for accelerated 802.1ad VLAN:
- Turn on the new ethtool private flag "phv-bit" (disabled by default). - $ ethtool --set-priv-flags eth1 phv-bit on - Enabling this flag sets the phv_en port capability. 
- Change the interface device features by turning on the ethtool device feature "tx-vlan- stag-hw-insert" (disabled by default). - $ ethtool -K eth1 tx-vlan-stag-hw-insert on - Once the private flag and the ethtool device feature are set, the device will be ready for 802.1ad VLAN acceleration. Warning- The "phv-bit" private flag setting is available for the Physical Function (PF) only. 
 The Virtual Function (VF) can use the VLAN acceleration by setting the "tx-vlan-stag-hw-insert" parameter only if the private flag "phv-bit" is enabled by the PF. If the PF enables/disables the "phv-bit" flag after the VF driver is up, the configuration will take place only after the VF driver is restarted.