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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:52 +0000 (14:23 +0200)
commit2dc73ba93202960aa6f81572e3de8c53ce8a42e8
tree21385a118122b0b89390909e1978c02cc418aef3
parentee7e9a9d73d9e3cfe4304d53c3bff704ae4890ed
net: hns3: refine the process when PF set VF VLAN

[ Upstream commit 190cd8a72b0181c543ecada6243be3a50636941b ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c