lkml.org 
[lkml]   [2023]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V2 net 3/5] net: hns3: only enable unicast promisc when mac table full
    Date
    From: Jian Shen <shenjian15@huawei.com>

    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: c631c696823c ("net: hns3: refactor the promisc mode setting")
    Signed-off-by: Jian Shen <shenjian15@huawei.com>
    Signed-off-by: Jijie Shao <shaojijie@huawei.com>
    ---
    drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
    index 8ca368424436..c0d03283775f 100644
    --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
    +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
    @@ -8824,7 +8824,7 @@ static void hclge_update_overflow_flags(struct hclge_vport *vport,
    if (mac_type == HCLGE_MAC_ADDR_UC) {
    if (is_all_added)
    vport->overflow_promisc_flags &= ~HNAE3_OVERFLOW_UPE;
    - else
    + else if (hclge_is_umv_space_full(vport, true))
    vport->overflow_promisc_flags |= HNAE3_OVERFLOW_UPE;
    } else {
    if (is_all_added)
    --
    2.30.0
    \
     
     \ /
      Last update: 2023-09-18 09:56    [W:8.775 / U:0.168 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site