From patchwork Wed Sep 26 02:54:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 45349 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5572F1B183; Wed, 26 Sep 2018 04:57:33 +0200 (CEST) Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) by dpdk.org (Postfix) with ESMTP id 7D5E57CD2; Wed, 26 Sep 2018 04:57:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1573; q=dns/txt; s=iport; t=1537930651; x=1539140251; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ci903krzIO5Rp7Yyn5BBsTAXoqcuxJnJru34n9UWnJE=; b=S5lW5Imbjwhiz2uKqY5Qwx26wh6i6owWZOJ0z+es8M20HMu7W7wfJStP fNSc0lG2W+QCreUXiWfujn/R1uYw1uMucbbqSO76b70luhYWzWupssuaU qL4O5mL3Yu52UBGClcoa+cPPO8ui7wVjMTM2j1jyw7CE4hWGNd4TGtrHX s=; X-IronPort-AV: E=Sophos;i="5.54,304,1534809600"; d="scan'208";a="176148429" Received: from rcdn-core-6.cisco.com ([173.37.93.157]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 02:57:30 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-6.cisco.com (8.15.2/8.15.2) with ESMTP id w8Q2vUaZ010009; Wed, 26 Sep 2018 02:57:30 GMT Received: by cisco.com (Postfix, from userid 392789) id 44B8720F2001; Tue, 25 Sep 2018 19:57:30 -0700 (PDT) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Hyong Youb Kim , stable@dpdk.org Date: Tue, 25 Sep 2018 19:54:22 -0700 Message-Id: <20180926025422.21912-6-johndale@cisco.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180926025422.21912-1-johndale@cisco.com> References: <20180926025422.21912-1-johndale@cisco.com> X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-core-6.cisco.com Subject: [dpdk-dev] [PATCH 6/6] net/enic: explicitly disable overlay offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hyong Youb Kim 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 Reviewed-by: John Daley --- 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,