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 6/6] net/enic: explicitly disable overlay offload
Date: Tue, 25 Sep 2018 19:54:22 -0700	[thread overview]
Message-ID: <20180926025422.21912-6-johndale@cisco.com> (raw)
In-Reply-To: <20180926025422.21912-1-johndale@cisco.com>

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

  parent reply	other threads:[~2018-09-26  2:57 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 ` [dpdk-dev] [PATCH 3/6] net/enic: set Rx VLAN offload flag for non-stripped packets John Daley
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 ` John Daley [this message]
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-6-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).