net: hns3: refine the process when PF set VF VLAN
authorJian Shen <shenjian15@huawei.com>
Thu, 24 Mar 2022 12:54:50 +0000 (20:54 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Mar 2022 23:37:46 +0000 (16:37 -0700)
commit190cd8a72b0181c543ecada6243be3a50636941b
tree1074f1c9e289af7ee7c2bda9616bbe18ceeeae47
parent1932a624ab88ff407d1a1d567fe581faa15dc725
net: hns3: refine the process when PF set VF VLAN

Currently, when PF set VF VLAN, it sends notify mailbox to VF
if VF alive. VF stop its traffic, and send request mailbox
to PF, then PF updates VF VLAN. It's a bit complex. If VF is
killed before sending request, PF will not set VF VLAN without
any log.

This patch refines the process, PF can set VF VLAN direclty,
and then notify the VF. If VF is resetting at that time, the
notify may be dropped, so VF should query it after reset finished.

Fixes: 92f11ea177cd ("net: hns3: fix set port based VLAN issue for VF")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c