From: Dengdui Huang <huangdeng...@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: sta...@dpdk.org Signed-off-by: Dengdui Huang <huangdeng...@huawei.com> Signed-off-by: Dongdong Liu <liudongdo...@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