net/iavf: re-program promiscuous mode on VF interface
authorRobin Zhang <robinx.zhang@intel.com>
Sun, 27 Sep 2020 07:26:21 +0000 (07:26 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 9 Oct 2020 11:17:43 +0000 (13:17 +0200)
During a kernel PF reset, this event is propagated to the VF.
The DPDK VF PMD will execute the reset task before the PF is done
with his. This results in the admin queue message not being responded
to leaving the port in "promiscuous" mode.

This patch makes sure the promiscuous mode is configured independently
of the current admin state.

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 81f2383..c2e89b8 100644 (file)
@@ -678,9 +678,6 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)
        struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
        int ret;
 
-       if (vf->promisc_unicast_enabled)
-               return 0;
-
        ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled);
        if (!ret)
                vf->promisc_unicast_enabled = true;
@@ -700,9 +697,6 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)
        struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
        int ret;
 
-       if (!vf->promisc_unicast_enabled)
-               return 0;
-
        ret = iavf_config_promisc(adapter, false,
                                  vf->promisc_multicast_enabled);
        if (!ret)
@@ -723,9 +717,6 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev)
        struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
        int ret;
 
-       if (vf->promisc_multicast_enabled)
-               return 0;
-
        ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true);
        if (!ret)
                vf->promisc_multicast_enabled = true;
@@ -745,9 +736,6 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)
        struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
        int ret;
 
-       if (!vf->promisc_multicast_enabled)
-               return 0;
-
        ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false);
        if (!ret)
                vf->promisc_multicast_enabled = false;