[PATCH 20.11 V2 1/2] net/hns3: fix residual MAC after setting default MAC

lihuisong (C) lihuisong at huawei.com
Mon Dec 6 07:11:16 CET 2021


在 2021/11/27 21:55, Xueming(Steven) Li 写道:
> On Sat, 2021-11-13 at 17:17 +0800, Huisong Li wrote:
>> [ upstream commit 19e67d8ebced5cb12829f75c70e6c497b5925e82 ]
>>
>> This problem occurs in the following scenarios:
>> 1) reset is encountered when the adapter is running.
>> 2) set a new default MAC address
>>
>> After the above two steps, the old default MAC address should be not
>> take effect. But the current behavior is contrary to that. This is due
>> to the change of the "default_addr_setted" in hw->mac from 'true' to
>> 'false' after the reset. As a result, the old MAC address is not removed
>> when the new default MAC address is set. This variable controls whether
>> to delete the old default MAC address when setting the default MAC
>> address. It is only used when the mac_addr_set API is called for the
>> first time. In fact, when a unicast MAC address is deleted, if the
>> address isn't in the MAC address table, the driver doesn't return
>> failure. So this patch remove the redundant and troublesome variables to
>> resolve this problem.
>>
>> Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")
>>
>> Signed-off-by: Huisong Li <lihuisong at huawei.com>
>> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
>> ---
> Applied to 20.11.4 list.
>
> One trailing tab removed, please run checkpatch next time :)
ok,thanks😅
>
> Best Regards,
> Xueming Li


More information about the stable mailing list