Commit f2ed3049 authored by Jian Shen's avatar Jian Shen Committed by Paolo Abeni

net: hns3: only enable unicast promisc when mac table full

Currently, the driver will enable unicast promisc for the function
once configure mac address fail. It's unreasonable when the failure
is caused by using same mac address with other functions. So only
enable unicast promisc when mac table full.

Fixes: c631c696 ("net: hns3: refactor the promisc mode setting")
Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent f9f65126
...@@ -8824,7 +8824,7 @@ static void hclge_update_overflow_flags(struct hclge_vport *vport, ...@@ -8824,7 +8824,7 @@ static void hclge_update_overflow_flags(struct hclge_vport *vport,
if (mac_type == HCLGE_MAC_ADDR_UC) { if (mac_type == HCLGE_MAC_ADDR_UC) {
if (is_all_added) if (is_all_added)
vport->overflow_promisc_flags &= ~HNAE3_OVERFLOW_UPE; vport->overflow_promisc_flags &= ~HNAE3_OVERFLOW_UPE;
else else if (hclge_is_umv_space_full(vport, true))
vport->overflow_promisc_flags |= HNAE3_OVERFLOW_UPE; vport->overflow_promisc_flags |= HNAE3_OVERFLOW_UPE;
} else { } else {
if (is_all_added) if (is_all_added)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment