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 02CE67E33 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 2C935986A1 for ; Sun, 12 Oct 2014 23:23:14 -0700 (PDT) Received: from ubuntu.localdomain (unknown [10.113.230.81]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id AEEFA41420 for ; Sun, 12 Oct 2014 23:23:13 -0700 (PDT) From: Yong Wang To: dev@dpdk.org Date: Sun, 12 Oct 2014 23:23:05 -0700 Message-Id: <1413181389-14887-2-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 1/5] vmxnet3: Fix VLAN Rx stripping 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 Shouldn't reset vlan_tci to 0 if a valid VLAN tag is stripped. Signed-off-by: Yong Wang --- lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c index 263f9ce..986e5e5 100644 --- a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c +++ b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c @@ -540,21 +540,19 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) /* Check for hardware stripped VLAN tag */ if (rcd->ts) { - PMD_RX_LOG(ERR, "Received packet with vlan ID: %d.", rcd->tci); rxm->ol_flags = PKT_RX_VLAN_PKT; - #ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER VMXNET3_ASSERT(rxm && rte_pktmbuf_mtod(rxm, void *)); #endif /* Copy vlan tag in packet buffer */ - rxm->vlan_tci = rte_le_to_cpu_16( - (uint16_t)rcd->tci); - - } else + rxm->vlan_tci = rte_le_to_cpu_16((uint16_t)rcd->tci); + } else { rxm->ol_flags = 0; + rxm->vlan_tci = 0; + } /* Initialize newly received packet buffer */ rxm->port = rxq->port_id; @@ -563,11 +561,9 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxm->pkt_len = (uint16_t)rcd->len; rxm->data_len = (uint16_t)rcd->len; rxm->port = rxq->port_id; - rxm->vlan_tci = 0; rxm->data_off = RTE_PKTMBUF_HEADROOM; rx_pkts[nb_rx++] = rxm; - rcd_done: rxq->cmd_ring[ring_idx].next2comp = idx; VMXNET3_INC_RING_IDX_ONLY(rxq->cmd_ring[ring_idx].next2comp, rxq->cmd_ring[ring_idx].size); -- 1.9.1