[dpdk-dev,v4,3/3] ixgbe: fix dev_close to remove VF MAC address.
Commit Message
Call the ixgbevf_remove_mac_addr() function in the ixgbevf_dev_close()
function to ensure that the VF traffic goes to the PF after stop,
close and detach of the VF.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Tuesday, March 08, 2016 5:10 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin; Lu, Wenzhuo; Wu, Jingjing; Iremonger, Bernard
> Subject: [PATCH v4 3/3] ixgbe: fix dev_close to remove VF MAC address.
>
> Call the ixgbevf_remove_mac_addr() function in the ixgbevf_dev_close()
> function to ensure that the VF traffic goes to the PF after stop,
> close and detach of the VF.
>
> Fixes: af75078fece3 ("first public release")
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 759177a..96b42f8 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -3911,8 +3911,12 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
>
> ixgbe_dev_free_queues(dev);
>
> - /* reprogram the RAR[0] in case user changed it. */
> - ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
> + /**
> + * Remove the VF MAC address ro ensure
> + * that the VF traffic goes to the PF
> + * after stop, close and detach of the VF
> + **/
> + ixgbevf_remove_mac_addr(dev, 0);
> }
>
> static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.6.3
@@ -3911,8 +3911,12 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
ixgbe_dev_free_queues(dev);
- /* reprogram the RAR[0] in case user changed it. */
- ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
+ /**
+ * Remove the VF MAC address ro ensure
+ * that the VF traffic goes to the PF
+ * after stop, close and detach of the VF
+ **/
+ ixgbevf_remove_mac_addr(dev, 0);
}
static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)