mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager
[ Upstream commit 7846665d35 ]
When using libvirt to passthrough VF to VM it will always set the VF vlan
to 0 even if user didn’t request it, this will cause libvirt to fail to
boot in case the PF isn't eswitch owner.
Example of such case is the DPU host PF which isn't eswitch manager, so
any attempt to passthrough VF of it using libvirt will fail.
Fix it by not returning error in case set VF vlan is called with vid 0.
Signed-off-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d24e3a126b
commit
4e2e5a033e
@@ -431,7 +431,7 @@ int mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw,
|
||||
int err = 0;
|
||||
|
||||
if (!mlx5_esw_allowed(esw))
|
||||
return -EPERM;
|
||||
return vlan ? -EPERM : 0;
|
||||
|
||||
if (vlan || qos)
|
||||
set_flags = SET_VLAN_STRIP | SET_VLAN_INSERT;
|
||||
|
||||
Reference in New Issue
Block a user