]> asedeno.scripts.mit.edu Git - linux.git/commit
net: hns3: fix VF VLAN table entries inconsistent issue
authorJian Shen <shenjian15@huawei.com>
Thu, 12 Mar 2020 07:11:04 +0000 (15:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 18:38:26 +0000 (11:38 -0700)
commit23b4201dead410c4a5108a8e723240419ab75257
tree789a441c13be18fa341f90af7500c6b714d7c46e
parent5eb01ddfcfb25e6ebc404a41deae946bde776731
net: hns3: fix VF VLAN table entries inconsistent issue

Currently, if VF is loaded on the host side, the host doesn't
clear the VF's VLAN table entries when VF removing. In this
case, when doing reset and disabling sriov at the same time the
VLAN device over VF will be removed, but the VLAN table entries
in hardware are remained.

This patch fixes it by asking PF to clear the VLAN table entries for
VF when VF is removing. It also clears the VLAN table full bit
after VF VLAN table entries being cleared.

Fixes: c6075b193462 ("net: hns3: Record VF vlan tables")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c