From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from net-apps-01.shieldx.dev (unknown [50.242.104.1]) by dpdk.org (Postfix) with ESMTP id 81D75293B for ; Wed, 13 Apr 2016 01:08:00 +0200 (CEST) Received: from john-dev1.shieldx.dev (john-dev1.shieldx.dev [172.16.3.29]) by net-apps-01.shieldx.dev (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u3CN7wbp025480; Tue, 12 Apr 2016 16:07:59 -0700 From: John Guzik To: dev@dpdk.org Cc: John Guzik Date: Tue, 12 Apr 2016 16:08:04 -0700 Message-Id: <1460502484-15873-1-git-send-email-john@shieldxnetworks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Subject: [dpdk-dev] [PATCH] vmxnet3: VLAN tag on end packet, not first 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: Tue, 12 Apr 2016 23:08:01 -0000 Signed-off-by: John Guzik Fixes: 9fd5e98b --- drivers/net/vmxnet3/vmxnet3_rxtx.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 4ac0456..3d4a5eb 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -587,12 +587,6 @@ vmxnet3_post_rx_bufs(vmxnet3_rx_queue_t *rxq, uint8_t ring_id) static void vmxnet3_rx_offload(const Vmxnet3_RxCompDesc *rcd, struct rte_mbuf *rxm) { - /* Check for hardware stripped VLAN tag */ - if (rcd->ts) { - rxm->ol_flags |= PKT_RX_VLAN_PKT; - rxm->vlan_tci = rte_le_to_cpu_16((uint16_t)rcd->tci); - } - /* Check for RSS */ if (rcd->rssType != VMXNET3_RCD_RSS_TYPE_NONE) { rxm->ol_flags |= PKT_RX_RSS_HASH; @@ -737,7 +731,15 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxq->last_seg = rxm; if (rcd->eop) { - rx_pkts[nb_rx++] = rxq->start_seg; + struct rte_mbuf *start = rxq->start_seg; + + /* Check for hardware stripped VLAN tag */ + if (rcd->ts) { + start->ol_flags |= PKT_RX_VLAN_PKT; + start->vlan_tci = rte_le_to_cpu_16((uint16_t)rcd->tci); + } + + rx_pkts[nb_rx++] = start; rxq->start_seg = NULL; } -- 1.9.1