DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Daley <johndale@cisco.com>
To: ferruh.yigit@intel.com
Cc: dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 3/6] net/enic: set Rx VLAN offload flag for non-stripped packets
Date: Tue, 25 Sep 2018 19:54:19 -0700	[thread overview]
Message-ID: <20180926025422.21912-3-johndale@cisco.com> (raw)
In-Reply-To: <20180926025422.21912-1-johndale@cisco.com>

From: Hyong Youb Kim <hyonkim@cisco.com>

The NIC indicates VLAN TCI to the driver even when VLAN stripping is
disabled. The driver sets mbuf's vlan_tci but not PKT_RX_VLAN. Set
PKT_RX_VLAN to indicate that vlan_tci is valid.

Fixes: c6f455507411 ("net/enic: add ethernet VLAN packet type")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_rxtx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index 7129e1217..0eb113d75 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -233,10 +233,12 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
 		pkt_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		mbuf->packet_type |= RTE_PTYPE_L2_ETHER;
 	} else {
-		if (vlan_tci != 0)
+		if (vlan_tci != 0) {
+			pkt_flags |= PKT_RX_VLAN;
 			mbuf->packet_type |= RTE_PTYPE_L2_ETHER_VLAN;
-		else
+		} else {
 			mbuf->packet_type |= RTE_PTYPE_L2_ETHER;
+		}
 	}
 	mbuf->vlan_tci = vlan_tci;
 
-- 
2.16.2

  parent reply	other threads:[~2018-09-26  2:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  2:54 [dpdk-dev] [PATCH 1/6] net/enic: do not use non-standard integer types John Daley
2018-09-26  2:54 ` [dpdk-dev] [PATCH 2/6] net/enic: enable IOVA mode John Daley
2018-09-26  2:54 ` John Daley [this message]
2018-09-26  2:54 ` [dpdk-dev] [PATCH 4/6] net/enic: do not use deprecated Tx VLAN packet flag John Daley
2018-09-26  2:54 ` [dpdk-dev] [PATCH 5/6] net/enic: add VLAN and csum offloads to simple Tx handler John Daley
2018-09-26  2:54 ` [dpdk-dev] [PATCH 6/6] net/enic: explicitly disable overlay offload John Daley
2018-10-01 14:32 ` [dpdk-dev] [PATCH 1/6] net/enic: do not use non-standard integer types Ferruh Yigit

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=20180926025422.21912-3-johndale@cisco.com \
    --to=johndale@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hyonkim@cisco.com \
    --cc=stable@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).