From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hyong Youb Kim Subject: [PATCH 10/15] net/enic: initialize VXLAN port regardless of overlay offload Date: Wed, 27 Feb 2019 23:03:12 -0800 Message-ID: <20190228070317.17002-11-hyonkim@cisco.com> References: <20190228070317.17002-1-hyonkim@cisco.com> Cc: dev@dpdk.org, John Daley , Hyong Youb Kim , stable@dpdk.org To: Ferruh Yigit Return-path: In-Reply-To: <20190228070317.17002-1-hyonkim@cisco.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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