DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/enic: reset the vxlan port during vNIC initialization
@ 2018-07-31 21:13 John Daley
  2018-07-31 21:26 ` [dpdk-dev] [PATCH v2] " John Daley
  0 siblings, 1 reply; 3+ messages in thread
From: John Daley @ 2018-07-31 21:13 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Hyong Youb Kim

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

The NIC persists the vxlan port number across vNIC init/de-init
(e.g. restart testpmd). So, explicitly reset the setting to the
default value (4789) as part of the initialization.

Fixes: 8a4efd17410c ("net/enic: add handlers to add/delete vxlan port number")

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

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index f04dc0878..03bde76b2 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1664,6 +1664,16 @@ static int enic_dev_init(struct enic *enic)
 		enic->overlay_offload = true;
 		enic->vxlan_port = ENIC_DEFAULT_VXLAN_PORT;
 		dev_info(enic, "Overlay offload is enabled\n");
+		/*
+		 * Reset the vxlan port to the default, as the NIC firmware
+		 * does not reset it automatically and keeps the old setting.
+		 */
+		if (vnic_dev_overlay_offload_cfg(enic->vdev,
+						 OVERLAY_CFG_VXLAN_PORT_UPDATE,
+						 ENIC_DEFAULT_VXLAN_PORT)) {
+			dev_err(enic, "failed to update vxlan port\n");
+			return -EINVAL;
+		}
 	}
 
 	return 0;
-- 
2.16.2

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

end of thread, other threads:[~2018-08-02  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-31 21:13 [dpdk-dev] [PATCH] net/enic: reset the vxlan port during vNIC initialization John Daley
2018-07-31 21:26 ` [dpdk-dev] [PATCH v2] " John Daley
2018-08-02  8:30   ` Thomas Monjalon

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