net: hns3: Enable promisc mode when mac vlan table is full
authorJian Shen <shenjian15@huawei.com>
Fri, 12 Oct 2018 14:34:04 +0000 (15:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Oct 2018 18:23:45 +0000 (11:23 -0700)
commitc60edc17df391e33c9c3cd6e319eb1f32ce26730
tree07d434f5945d26a1ff40dfd27d6fb3e27e5b811d
parent5886d932e52acfbe12ea5aac8e7c3ad6f16364d1
net: hns3: Enable promisc mode when mac vlan table is full

Currently, the driver does nothing when mac vlan table is full.
In this case, the packet with new mac address will be dropped
by hardware. This patch adds check for the result of sync mac
address, and enable promisc mode when mac vlan table is full.
Furtherly, disable vlan filter when enable promisc by user
command.

Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c