[dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix setting VF MAC address

Ye Xiaolong xiaolong.ye at intel.com
Wed Mar 11 08:29:36 CET 2020


Hi, Guinan

On 03/10, Guinan Sun wrote:
>This problem occurs because clear_rar is executed at the wrong time,
> so PF cannot receive data normally.

Could you elaborate what problem you've encountered, and how this patch solves it?

Thanks,
Xiaolong

>This patch is used to modify the calling logic of clear_rar.
>
>Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
>Cc: stable at dpdk.org
>
>Signed-off-by: Guinan Sun <guinanx.sun at intel.com>
>---
> drivers/net/ixgbe/ixgbe_pf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
>index afae21f81..67b5bef44 100644
>--- a/drivers/net/ixgbe/ixgbe_pf.c
>+++ b/drivers/net/ixgbe/ixgbe_pf.c
>@@ -783,8 +783,10 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
> 		hw->mac.ops.set_rar(hw, vf_info[vf].mac_count,
> 				new_mac, vf, IXGBE_RAH_AV);
> 	} else {
>-		hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
>-		vf_info[vf].mac_count = 0;
>+		if (vf_info[vf].mac_count) {
>+			hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
>+			vf_info[vf].mac_count = 0;
>+		}
> 	}
> 	return 0;
> }
>-- 
>2.17.1
>


More information about the stable mailing list