From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [208.91.2.12]) by dpdk.org (Postfix) with ESMTP id F22E768B5 for ; Mon, 13 Oct 2014 08:15:47 +0200 (CEST) Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 67E29986A2 for ; Sun, 12 Oct 2014 23:23:15 -0700 (PDT) Received: from ubuntu.localdomain (unknown [10.113.230.81]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id F1E3A41420 for ; Sun, 12 Oct 2014 23:23:14 -0700 (PDT) From: Yong Wang To: dev@dpdk.org Date: Sun, 12 Oct 2014 23:23:06 -0700 Message-Id: <1413181389-14887-3-git-send-email-yongwang@vmware.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413181389-14887-1-git-send-email-yongwang@vmware.com> References: <1413181389-14887-1-git-send-email-yongwang@vmware.com> Subject: [dpdk-dev] [PATCH 2/5] vmxnet3: Add VLAN Tx offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 06:15:48 -0000 Signed-off-by: Yong Wang --- lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c index 986e5e5..0b6363f 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); -- 1.9.1