From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by dpdk.org (Postfix) with ESMTP id C268C378E; Sat, 2 Mar 2019 11:45:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1454; q=dns/txt; s=iport; t=1551523536; x=1552733136; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ugkcOu7f4kvORdbpVKyKEtAjKMfvS+Vwf79wlDxNUDg=; b=ELWBtTyT5tanEnX+uIE3yrSU0PSPIWTQLK/wSge4vvqTQcYFAfnUC61o FwS2JQOvBmMcGI27VnBYu7TcgGN1C/nRHi99KXC/aXj7o/xxU/4qZZTYw qORUz0+gLoGldk+U3DcL+qLkTCQnaLkcqcUBcswvqL3rjJ1QZk9Eb5AZP k=; X-IronPort-AV: E=Sophos;i="5.58,431,1544486400"; d="scan'208";a="530643427" Received: from alln-core-5.cisco.com ([173.36.13.138]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2019 10:45:35 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-5.cisco.com (8.15.2/8.15.2) with ESMTP id x22AjZQv030353; Sat, 2 Mar 2019 10:45:36 GMT Received: by cisco.com (Postfix, from userid 508933) id C15D520F2001; Sat, 2 Mar 2019 02:45:35 -0800 (PST) From: Hyong Youb Kim To: Ferruh Yigit Cc: dev@dpdk.org, John Daley , Hyong Youb Kim , stable@dpdk.org Date: Sat, 2 Mar 2019 02:42:48 -0800 Message-Id: <20190302104251.32565-11-hyonkim@cisco.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20190302104251.32565-1-hyonkim@cisco.com> References: <20190302104251.32565-1-hyonkim@cisco.com> X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: alln-core-5.cisco.com Subject: [dpdk-dev] [PATCH v2 10/13] net/enic: reset VXLAN port regardless of 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: , X-List-Received-Date: Sat, 02 Mar 2019 10:45:37 -0000 Currently, the driver resets the vxlan port register only if overlay offload is enabled. But, the register is actually tied to hardware vxlan parsing, which is an independent feature and is always enabled even if overlay offload is disabled. If left uninitialized, it can affect flow rules that match vxlan. So always reset the port number when HW vxlan parsing is available. Fixes: 8a4efd17410c ("net/enic: add handlers to add/delete vxlan port number") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim --- drivers/net/enic/enic_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 2652949a2..ea9eb2edf 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -1714,8 +1714,15 @@ static int enic_dev_init(struct enic *enic) PKT_TX_OUTER_IP_CKSUM | PKT_TX_TUNNEL_MASK; enic->overlay_offload = true; - enic->vxlan_port = ENIC_DEFAULT_VXLAN_PORT; dev_info(enic, "Overlay offload is enabled\n"); + } + /* + * Reset the vxlan port if HW vxlan parsing is available. It + * is always enabled regardless of overlay offload + * enable/disable. + */ + if (enic->vxlan) { + enic->vxlan_port = ENIC_DEFAULT_VXLAN_PORT; /* * Reset the vxlan port to the default, as the NIC firmware * does not reset it automatically and keeps the old setting. -- 2.16.2