From eb9444341f83c25f48905451b4f9a2f1c2f94388 Mon Sep 17 00:00:00 2001 From: Robin Zhang Date: Sun, 27 Sep 2020 07:26:21 +0000 Subject: [PATCH] net/iavf: re-program promiscuous mode on VF interface 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 Acked-by: Qi Zhang --- drivers/net/iavf/iavf_ethdev.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 81f23832ca..c2e89b848a 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -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; -- 2.20.1