net/i40e: always re-program promiscuous mode on VF interface
PATCH v2 1/1 net/i40e: always 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.
---
v1-v2:
In the earlier patch, we would force the vf->promisc_unicast_enabled state to false after a reset. Based on the review comments it was prefered to not take the current state into account when programming.
v1 patch was called: net/i40e: force promiscuous state after VF reset
drivers/net/i40e/i40e_ethdev_vf.c | 16 ---------------- 1 file changed, 16 deletions(-)
drivers/net/i40e/i40e_ethdev_vf.c +0 -16
@@ -2162,10 +2162,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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;
Any update on this patch?
Quoted 78 lines · Eelco Chaudron
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 <[email protected]>---
v1-v2:
In the earlier patch, we would force thevf->promisc_unicast_enabledstate to false after a reset. Based on the review comments it was prefered to not take the current state into account when
programming.v1 patch was called: net/i40e: force promiscuous state after VF
resetdrivers/net/i40e/i40e_ethdev_vf.c | 16 ---------------- 1 file changed, 16 deletions(-)drivers/net/i40e/i40e_ethdev_vf.c +0
-4@@ -2162,10 +2162,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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);drivers/net/i40e/i40e_ethdev_vf.c +0
-4if (ret ==0 ) vf->promisc_unicast_enabled = TRUE;@@ -2181,10 +2177,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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);drivers/net/i40e/i40e_ethdev_vf.c +0
-4if (ret ==0 ) vf->promisc_unicast_enabled = FALSE;@@ -2200,10 +2192,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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 );drivers/net/i40e/i40e_ethdev_vf.c +0
-4if (ret ==0 ) vf->promisc_multicast_enabled = TRUE;@@ -2219,10 +2207,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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 );drivers/net/i40e/i40e_ethdev_vf.c +0
-0if (ret ==0 ) vf->promisc_multicast_enabled = FALSE;
Trying again?
Quoted 84 lines · Eelco Chaudron
Any update on this patch?
Quoted 79 lines · Eelco Chaudron
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 <[email protected]>---
v1-v2:
In the earlier patch, we would force thevf->promisc_unicast_enabled
state to false after a reset. Based on the review comments it was prefered to not take the current state into account when
programming.v1 patch was called: net/i40e: force promiscuous state after VF
resetdrivers/net/i40e/i40e_ethdev_vf.c | 16 ---------------- 1 file changed, 16 deletions(-)drivers/net/i40e/i40e_ethdev_vf.c +0
-4@@ -2162,10 +2162,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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);drivers/net/i40e/i40e_ethdev_vf.c +0
-4if (ret ==0 ) vf->promisc_unicast_enabled = TRUE;@@ -2181,10 +2177,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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);drivers/net/i40e/i40e_ethdev_vf.c +0
-4if (ret ==0 ) vf->promisc_unicast_enabled = FALSE;@@ -2200,10 +2192,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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 );drivers/net/i40e/i40e_ethdev_vf.c +0
-4if (ret ==0 ) vf->promisc_multicast_enabled = TRUE;@@ -2219,10 +2207,6 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_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 );drivers/net/i40e/i40e_ethdev_vf.c +0
-0if (ret ==0 ) vf->promisc_multicast_enabled = FALSE;
Quoted 14 lines
-----Original Message-----
From: Eelco Chaudron [mailto:[email protected]]
Sent: Tuesday, November 19, 2019 9:45 PM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Zhang, Xiao <[email protected]>; [email protected]
Subject: [PATCH v2] net/i40e: always re-program promiscuous mode on VF interfaceDuring 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.
Quoted 4 lines
This patch makes sure the promiscuous mode is configured independently of the current admin state.
Signed-off-by Eelco Chaudron <[email protected]>
Ye Xiaolong
AppliedQuoted 14 lines · Xiao
Quoted 14 lines
-----Original Message-----
From: Eelco Chaudron [mailto:[email protected]]
Sent: Tuesday, November 19, 2019 9:45 PM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Zhang, Xiao <[email protected]>; [email protected]
Subject: [PATCH v2] net/i40e: always re-program promiscuous mode on VF interfaceDuring 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.
Quoted 6 lines
Quoted 4 lines
This patch makes sure the promiscuous mode is configured independently of the current admin state.
Signed-off-by Eelco Chaudron <[email protected]>Reviewed-by Xiao Zhang <[email protected]>
Applied to dpdk-next-net-intel, Thanks.
Thanks!
Quoted 23 lines · Ye Xiaolong
Quoted 14 lines · Xiao
Quoted 14 lines
-----Original Message-----
From: Eelco Chaudron [mailto:[email protected]]
Sent: Tuesday, November 19, 2019 9:45 PM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Zhang, Xiao <[email protected]>; [email protected]
Subject: [PATCH v2] net/i40e: always re-program promiscuous mode on VF interfaceDuring 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.Quoted 6 lines
Quoted 4 lines
This patch makes sure the promiscuous mode is configured independently of the current admin state.
Signed-off-by Eelco Chaudron <[email protected]>Reviewed-by Xiao Zhang <[email protected]>Applied to dpdk-next-net-intel, Thanks.