patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 3/6] net/enic: set Rx VLAN offload flag for non-stripped packets
       [not found] <20180926025422.21912-1-johndale@cisco.com>
@ 2018-09-26  2:54 ` John Daley
  2018-09-26  2:54 ` [dpdk-stable] [PATCH 6/6] net/enic: explicitly disable overlay offload John Daley
  1 sibling, 0 replies; 2+ messages in thread
From: John Daley @ 2018-09-26  2:54 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Hyong Youb Kim, stable

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-stable] [PATCH 6/6] net/enic: explicitly disable overlay offload
       [not found] <20180926025422.21912-1-johndale@cisco.com>
  2018-09-26  2:54 ` [dpdk-stable] [PATCH 3/6] net/enic: set Rx VLAN offload flag for non-stripped packets John Daley
@ 2018-09-26  2:54 ` John Daley
  1 sibling, 0 replies; 2+ messages in thread
From: John Daley @ 2018-09-26  2:54 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Hyong Youb Kim, stable

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

Reopening vNIC does not automatically disable overlay offload. If it
is previously enabled, it remains enabled even when the user restarts
DPDK and requests overlay offload to be disabled via devarg
disable-overlay=1. So explicitly disable overlay offload when
requested.

Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 03c5ef741..af29f9d90 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1652,6 +1652,19 @@ static int enic_dev_init(struct enic *enic)
 	vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */
 
 	enic->overlay_offload = false;
+	if (enic->disable_overlay && enic->vxlan) {
+		/*
+		 * Explicitly disable overlay offload as the setting is
+		 * sticky, and resetting vNIC does not disable it.
+		 */
+		if (vnic_dev_overlay_offload_ctrl(enic->vdev,
+						  OVERLAY_FEATURE_VXLAN,
+						  OVERLAY_OFFLOAD_DISABLE)) {
+			dev_err(enic, "failed to disable overlay offload\n");
+		} else {
+			dev_info(enic, "Overlay offload is disabled\n");
+		}
+	}
 	if (!enic->disable_overlay && enic->vxlan &&
 	    /* 'VXLAN feature' enables VXLAN, NVGRE, and GENEVE. */
 	    vnic_dev_overlay_offload_ctrl(enic->vdev,
-- 
2.16.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-26  2:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180926025422.21912-1-johndale@cisco.com>
2018-09-26  2:54 ` [dpdk-stable] [PATCH 3/6] net/enic: set Rx VLAN offload flag for non-stripped packets John Daley
2018-09-26  2:54 ` [dpdk-stable] [PATCH 6/6] net/enic: explicitly disable overlay offload John Daley

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).