Blame SOURCES/0001-net-i40e-re-program-promiscuous-mode-on-VF-interface.patch

eb2664
From b6cf6a0100ce9645a74a23bbeeff4083e80d8a39 Mon Sep 17 00:00:00 2001
eb2664
Message-Id: <b6cf6a0100ce9645a74a23bbeeff4083e80d8a39.1577094089.git.echaudro@redhat.com>
eb2664
From: Eelco Chaudron <echaudro@redhat.com>
eb2664
Date: Tue, 19 Nov 2019 08:45:21 -0500
eb2664
Subject: [PATCH] net/i40e: re-program promiscuous mode on VF interface
eb2664
eb2664
During a kernel PF reset, this event is propagated to the VF.
eb2664
The DPDK VF PMD will execute the reset task before the PF is done
eb2664
with his. This results in the admin queue message not being responded
eb2664
to leaving the port in "promiscuous" mode.
eb2664
eb2664
This patch makes sure the promiscuous mode is configured independently
eb2664
of the current admin state.
eb2664
eb2664
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
eb2664
Reviewed-by: Xiao Zhang <xiao.zhang@intel.com>
eb2664
---
eb2664
 drivers/net/i40e/i40e_ethdev_vf.c | 16 ----------------
eb2664
 1 file changed, 16 deletions(-)
eb2664
eb2664
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
eb2664
index 5dba092..43f7ab5 100644
eb2664
--- a/drivers/net/i40e/i40e_ethdev_vf.c
eb2664
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
eb2664
@@ -2092,10 +2092,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
eb2664
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
eb2664
 	int ret;
eb2664
 
eb2664
-	/* If enabled, just return */
eb2664
-	if (vf->promisc_unicast_enabled)
eb2664
-		return;
eb2664
-
eb2664
 	ret = i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled);
eb2664
 	if (ret == 0)
eb2664
 		vf->promisc_unicast_enabled = TRUE;
eb2664
@@ -2107,10 +2103,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
eb2664
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
eb2664
 	int ret;
eb2664
 
eb2664
-	/* If disabled, just return */
eb2664
-	if (!vf->promisc_unicast_enabled)
eb2664
-		return;
eb2664
-
eb2664
 	ret = i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled);
eb2664
 	if (ret == 0)
eb2664
 		vf->promisc_unicast_enabled = FALSE;
eb2664
@@ -2122,10 +2114,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
eb2664
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
eb2664
 	int ret;
eb2664
 
eb2664
-	/* If enabled, just return */
eb2664
-	if (vf->promisc_multicast_enabled)
eb2664
-		return;
eb2664
-
eb2664
 	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1);
eb2664
 	if (ret == 0)
eb2664
 		vf->promisc_multicast_enabled = TRUE;
eb2664
@@ -2137,10 +2125,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
eb2664
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
eb2664
 	int ret;
eb2664
 
eb2664
-	/* If enabled, just return */
eb2664
-	if (!vf->promisc_multicast_enabled)
eb2664
-		return;
eb2664
-
eb2664
 	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0);
eb2664
 	if (ret == 0)
eb2664
 		vf->promisc_multicast_enabled = FALSE;
eb2664
-- 
eb2664
1.8.3.1
eb2664