[dpdk-dev,v4,3/3] ixgbe: fix dev_close to remove VF MAC address.
diff mbox

Message ID 1457457027-21419-4-git-send-email-bernard.iremonger@intel.com
State Accepted, archived
Delegated to: Bruce Richardson
Headers show

Commit Message

Bernard Iremonger March 8, 2016, 5:10 p.m. UTC
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

Ananyev, Konstantin March 9, 2016, 1:17 p.m. UTC | #1
> -----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

Patch
diff mbox

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)