]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5b33318dc106a3f3b02fdd7ce8c29f3c553cad76
tree1074f1c9e289af7ee7c2bda9616bbe18ceeeae47
parentf92eac14225292f09bfac518fee621c53566f7aa
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: 24e686bbf38d ("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