summaryrefslogtreecommitdiff
path: root/drivers/net/enic
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2018-09-25 19:54:22 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:48 +0200
commit308b514b8e8f712e5df1aa40b6bbd8958dc5e6b4 (patch)
tree09c019f5cd1f29ac3c0ee9a9eed08a859b518fac /drivers/net/enic
parent70401fd7784db6f55cce87b91e19d364edce506a (diff)
downloaddpdk-next-eventdev-308b514b8e8f712e5df1aa40b6bbd8958dc5e6b4.zip
dpdk-next-eventdev-308b514b8e8f712e5df1aa40b6bbd8958dc5e6b4.tar.gz
dpdk-next-eventdev-308b514b8e8f712e5df1aa40b6bbd8958dc5e6b4.tar.xz
net/enic: explicitly disable overlay offload
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>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/enic_main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 03c5ef7..af29f9d 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,