Skip to content

Commit

Permalink
net/hns3: fix VF default MAC modified when set failed
Browse files Browse the repository at this point in the history
[ upstream commit ed7faab2a717347077d9e657fba010bb145a2b54 ]

When the VF fail to set the default MAC address,
"hw->mac.mac_addr" should not be updated.

Fixes: a5475d6 ("net/hns3: support VF")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
  • Loading branch information
Dengdui Huang authored and kevintraynor committed Oct 31, 2023
1 parent 2a40eea commit e5a3497
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/hns3/hns3_ethdev_vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e5a3497

Please sign in to comment.