vmxnet3: add vlan Tx offload
authorYong Wang <yongwang@vmware.com>
Wed, 5 Nov 2014 01:49:39 +0000 (17:49 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 14 Nov 2014 16:31:06 +0000 (17:31 +0100)
Signed-off-by: Yong Wang <yongwang@vmware.com>
lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c

index 986e5e5..0b6363f 100644 (file)
@@ -319,6 +319,12 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                        txd->cq = 1;
                        txd->eop = 1;
 
+                       /* Add VLAN tag if requested */
+                       if (txm->ol_flags & PKT_TX_VLAN_PKT) {
+                               txd->ti = 1;
+                               txd->tci = rte_cpu_to_le_16(txm->vlan_tci);
+                       }
+
                        /* Record current mbuf for freeing it later in tx complete */
 #ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER
                        VMXNET3_ASSERT(txm);