]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager
authorMaor Dickman <maord@nvidia.com>
Thu, 9 Dec 2021 12:03:01 +0000 (14:03 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 7 Jan 2022 00:22:53 +0000 (16:22 -0800)
commit4de20ad0f77c4fe63ab2ce7035edceafddfe4878
tree1f510c210e4ffba8bee8c7e6dc113ba835e00c22
parentd02df99f0cdb944633352a21e4ac1411bcc1e926
net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager

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>
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c