From: Yong Wang Date: Wed, 5 Nov 2014 01:49:39 +0000 (-0800) Subject: vmxnet3: add vlan Tx offload X-Git-Tag: spdx-start~10150 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3604496377da6eb744eb0f4eaf449099b5b02178;p=dpdk.git vmxnet3: add vlan Tx offload Signed-off-by: Yong Wang --- diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c index 986e5e5100..0b6363f8f7 100644 --- a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c +++ b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c @@ -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);