]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add existence checking before adding unicast mac address
authorJian Shen <shenjian15@huawei.com>
Sat, 10 Mar 2018 03:29:32 +0000 (11:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Mar 2018 02:53:32 +0000 (22:53 -0400)
commitf643def60a5232976e8ca8948003fa96940d180d
tree3e76c94e0ea9a5b0bcf9eb2ccb9a471adad09a33
parentc07de5c55d4e1539102e8e5baefd5ff6370e78e8
net: hns3: add existence checking before adding unicast mac address

It's not allowed to add two same unicast mac address entries to the
mac_vlan table. When modify the uc mac address of a VF device to the
same value with the PF device's, the PF device will lose its entry of
the mac_vlan table.

Lookup the mac address in the mac_vlan table, and add it if the entry
is inexistent.

Fixes: 575d84053c84 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c