DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix setting VF MAC address
@ 2020-03-10  2:58 Guinan Sun
  2020-03-11  7:29 ` Ye Xiaolong
  2020-03-11  9:06 ` [dpdk-dev] [PATCH v2] " Guinan Sun
  0 siblings, 2 replies; 4+ messages in thread
From: Guinan Sun @ 2020-03-10  2:58 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, Qiming Yang, Guinan Sun, stable

This problem occurs because clear_rar is executed at the wrong time,
 so PF cannot receive data normally.
This patch is used to modify the calling logic of clear_rar.

Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-13  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10  2:58 [dpdk-dev] [PATCH] net/ixgbe: fix setting VF MAC address Guinan Sun
2020-03-11  7:29 ` Ye Xiaolong
2020-03-11  9:06 ` [dpdk-dev] [PATCH v2] " Guinan Sun
2020-03-13  1:09   ` Ye Xiaolong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).