]> git.ipfire.org Git - thirdparty/linux.git/commit
net/mlx5: E-switch, Set representor attributes for adjacent VFs
authorAdithya Jayachandran <ajayachandra@nvidia.com>
Fri, 29 Aug 2025 22:37:21 +0000 (15:37 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 2 Sep 2025 13:18:16 +0000 (15:18 +0200)
commit5d8ae2c2cfe88a2c7458e18f30df4c655dfa983e
tree583dcf48971f3b5fdb5562683477bd26fbe473e2
parenta0a7002b943997f5a4a9103ab92db388965f7aff
net/mlx5: E-switch, Set representor attributes for adjacent VFs

Adjacent vfs get their devlink port information from firmware,
use the information (pfnum, function id) from FW when populating the
devlink port attributes.

Before:
$ devlink port show
pci/0000:00:03.0/180225: type eth netdev eth0 flavour pcivf controller 0 pfnum 0 vfnum 49152 external false splittable false
  function:
    hw_addr 00:00:00:00:00:00

After:
$ devlink port show
pci/0000:00:03.0/180225: type eth netdev enp0s3npf0vf2 flavour pcivf controller 0 pfnum 0 vfnum 2 external false splittable false
  function:
    hw_addr 00:00:00:00:00:00

Signed-off-by: Adithya Jayachandran <ajayachandra@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250829223722.900629-7-saeed@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/adj_vport.c
drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h