net: hns3: only enable unicast promisc when mac table full
authorJian Shen <shenjian15@huawei.com>
Mon, 18 Sep 2023 07:48:38 +0000 (15:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:40 +0000 (14:56 +0200)
commitd3f7af41de523dc13792a7497f7f1f3613fc9098
treea140d065ebe88f7c248ba811bed047d67a150f91
parented6a0b21b6acd8128e10a9553e50b5dec0c18e82
net: hns3: only enable unicast promisc when mac table full

[ Upstream commit f2ed304922a55690529bcca59678dd92d7466ce8 ]

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>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c