]> git.droids-corp.org - dpdk.git/commitdiff
net/iavf: disable promiscuous mode on close
authorRobin Zhang <robinx.zhang@intel.com>
Sun, 27 Sep 2020 07:26:23 +0000 (07:26 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 9 Oct 2020 11:17:43 +0000 (13:17 +0200)
In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit
doesn't disable promiscuous mode, this will cause vlan filter set by
Kernel Driver will not take effect.

This patch will fix it, add promiscuous disable at device disable.

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_ethdev.c

index 0012c77b9b368deb1a6aa87beafa454ef54ecb19..e8abda388cb195a92536a762ee9c075d5e4d5d0d 100644 (file)
@@ -1424,6 +1424,15 @@ iavf_dev_close(struct rte_eth_dev *dev)
        iavf_dev_stop(dev);
        iavf_flow_flush(dev, NULL);
        iavf_flow_uninit(adapter);
+
+       /*
+        * disable promiscuous mode before reset vf
+        * it is a workaround solution when work with kernel driver
+        * and it is not the normal way
+        */
+       if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
+               iavf_config_promisc(adapter, false, false);
+
        iavf_shutdown_adminq(hw);
        /* disable uio intr before callback unregister */
        rte_intr_disable(intr_handle);