]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 18:40:20 +0000 (14:40 -0400)
commitbf88f41f2f47b17660faad11d0d0ccd00ac1df96
tree329b7fa9c54d6640d19608d955225260cfce9729
parent2f894c5b40d6168fc34156f7943213cfc2a5c7b4
net: hns3: add existence checking before adding unicast mac address

BugLink: https://bugs.launchpad.net/bugs/1768670
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: 46a3df9f9718 ("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>
(cherry picked from commit d07b6bb4350040e10be8483640ae1b2bf37a3e5e)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c