[PATCH 1/5] net/hns3: fix VF default MAC modified when set failed
Dongdong Liu
liudongdong3 at huawei.com
Sat Aug 5 10:36:23 CEST 2023
From: Dengdui Huang <huangdengdui at huawei.com>
When the VF fail to set the default MAC address,
"hw->mac.mac_addr" should not be updated.
Fixes: a5475d61fa34 ("net/hns3: support VF")
Cc: stable at dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3 at huawei.com>
---
drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 5aac62a41f..ad0ccb82fe 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -250,6 +250,8 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
hns3_err(hw, "Failed to set mac addr(%s) for vf: %d",
mac_str, ret);
}
+ rte_spinlock_unlock(&hw->lock);
+ return ret;
}
rte_ether_addr_copy(mac_addr,
--
2.22.0
More information about the dev
mailing list