DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Guzik <john@shieldxnetworks.com>
To: dev@dpdk.org
Cc: John Guzik <john@shieldxnetworks.com>
Subject: [dpdk-dev] [PATCH] vmxnet3: VLAN tag on end packet, not first
Date: Tue, 12 Apr 2016 16:08:04 -0700	[thread overview]
Message-ID: <1460502484-15873-1-git-send-email-john@shieldxnetworks.com> (raw)
In-Reply-To: <SN1PR20MB028564DE6A82A22983157757DC900@SN1PR20MB0285.namprd20.prod.outlook.com>

Signed-off-by: John Guzik <john@shieldxnetworks.com>
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

  parent reply	other threads:[~2016-04-12 23:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 17:11 [dpdk-dev] vmxnet3 driver - vlan offload is on end descriptor John Guzik
2016-04-07 17:34 ` Thomas Monjalon
2016-04-07 18:22   ` Yong Wang
2016-04-07 17:35 ` Stephen Hemminger
2016-04-12 23:08 ` John Guzik [this message]
2016-05-10 15:04   ` [dpdk-dev] [PATCH] vmxnet3: VLAN tag on end packet, not first Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460502484-15873-1-git-send-email-john@shieldxnetworks.com \
    --to=john@shieldxnetworks.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).