]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix failed to add reuse multicast mac addr to hardware when mc mac table...
authorGuangbin Huang <huangguangbin2@huawei.com>
Wed, 10 Nov 2021 13:42:49 +0000 (21:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Nov 2021 14:20:43 +0000 (14:20 +0000)
commit080729870d47a0505b865438b6f672b0a958a11f
tree4e01d9fd65e73f8bd0997801cec14f09d2956b1d
parent564b794585d9b8af3953390e2a34f92e3cf9de7d
net: hns3: fix failed to add reuse multicast mac addr to hardware when mc mac table is full

Currently, when driver is failed to add a new multicast mac address to
hardware due to the multicast mac table is full, it will directly return.
In this case, if the multicast mac list has some reuse addresses after the
new address, those reuse addresses will never be added to hardware.

To fix this problem, if function hclge_add_mc_addr_common() returns
-ENOSPC, hclge_sync_vport_mac_list() should judge whether continue or
stop to add next address.

As function hclge_sync_vport_mac_list() needs parameter mac_type to know
whether is uc or mc, refine this function to add parameter mac_type and
remove parameter sync. So does function hclge_unsync_vport_mac_list().

Fixes: a822412780c1 ("net: hns3: refactor the MAC address configure")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c