]> git.droids-corp.org - dpdk.git/commitdiff
net/i40e: re-program promiscuous mode on VF interface
authorEelco Chaudron <echaudro@redhat.com>
Tue, 19 Nov 2019 13:45:21 +0000 (08:45 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:45:23 +0000 (19:45 +0100)
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: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Xiao Zhang <xiao.zhang@intel.com>
drivers/net/i40e/i40e_ethdev_vf.c

index 5dba0928b9fb26a2b33fda5a3da01d8af7c9f48b..43f7ab5322d4d6940e29c5c177b584481b500de7 100644 (file)
@@ -2162,10 +2162,6 @@ i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev)
        struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
        int ret;
 
-       /* If enabled, just return */
-       if (vf->promisc_unicast_enabled)
-               return 0;
-
        ret = i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled);
        if (ret == 0)
                vf->promisc_unicast_enabled = TRUE;
@@ -2181,10 +2177,6 @@ i40evf_dev_promiscuous_disable(struct rte_eth_dev *dev)
        struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
        int ret;
 
-       /* If disabled, just return */
-       if (!vf->promisc_unicast_enabled)
-               return 0;
-
        ret = i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled);
        if (ret == 0)
                vf->promisc_unicast_enabled = FALSE;
@@ -2200,10 +2192,6 @@ i40evf_dev_allmulticast_enable(struct rte_eth_dev *dev)
        struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
        int ret;
 
-       /* If enabled, just return */
-       if (vf->promisc_multicast_enabled)
-               return 0;
-
        ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1);
        if (ret == 0)
                vf->promisc_multicast_enabled = TRUE;
@@ -2219,10 +2207,6 @@ i40evf_dev_allmulticast_disable(struct rte_eth_dev *dev)
        struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
        int ret;
 
-       /* If enabled, just return */
-       if (!vf->promisc_multicast_enabled)
-               return 0;
-
        ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0);
        if (ret == 0)
                vf->promisc_multicast_enabled = FALSE;