[1/5] net/hns3: fix VF default MAC modified when set failed
Checks
Commit Message
From: Dengdui Huang <huangdengdui@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@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
1 file changed, 2 insertions(+)
@@ -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,