• Guangbin Huang's avatar
    net: hns3: fix failed to add reuse multicast mac addr to hardware when mc mac table is full · 3b4c6566
    Guangbin Huang authored
    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: ee4bcd3b ("net: hns3: refactor the MAC address configure")
    Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3b4c6566
hclge_main.c 355 KB