]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: E-Switch, Allow setting GUID for host PF vport
authorParav Pandit <parav@nvidia.com>
Tue, 8 Jun 2021 16:03:24 +0000 (19:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jun 2021 12:42:46 +0000 (14:42 +0200)
commit38aafe678caa5b5a6444057291bad51b6bce1ac1
treed579c83d5e1ac5ac0217b973e0349036856d0a4e
parent601be24dba48dfa53bf2a3b8fd73f6af81cfa1f5
net/mlx5: E-Switch, Allow setting GUID for host PF vport

[ Upstream commit ca36fc4d77b35b8d142cf1ed0eae5ec2e071dc3c ]

E-switch should be able to set the GUID of host PF vport.
Currently it returns an error. This results in below error
when user attempts to configure MAC address of the PF of an
external controller.

$ devlink port function set pci/0000:03:00.0/196608 \
   hw_addr 00:00:00:11:22:33

mlx5_core 0000:03:00.0: mlx5_esw_set_vport_mac_locked:1876:(pid 6715):\
"Failed to set vport 0 node guid, err = -22.
RDMA_CM will not function properly for this VF."

Check for zero vport is no longer needed.

Fixes: 330077d14de1 ("net/mlx5: E-switch, Supporting setting devlink port function mac address")
Signed-off-by: Yuval Avnery <yuvalav@nvidia.com>
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Bodong Wang <bodong@nvidia.com>
Reviewed-by: Alaa Hleihel <alaa@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/vport.c