Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net/mlx5: Add controller number to SF and VF phys_port_name
@ 2026-11-25 21:20 Tariq Toukan
  2026-11-25 21:20 ` [PATCH net-next 1/2] net/mlx5: SF, Pass pfnum through the SF hardware-table allocation path Tariq Toukan
  2026-11-25 21:20 ` [PATCH net-next 2/2] net/mlx5: Add controller number for SF and ECVF phys_port_name Tariq Toukan
  0 siblings, 2 replies; 3+ messages in thread
From: Tariq Toukan @ 2026-11-25 21:20 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Carolina Jubran, Chris Mi, Gal Pressman, Kees Cook,
	Leon Romanovsky, linux-rdma, Mark Bloch, Moshe Shemesh,
	Or Har-Toov, Parav Pandit, Saeed Mahameed, Shay Drori,
	Tariq Toukan

Hi,

This series by Chris adds the controller number to the phys_port_name of
SF and VF representors on the non-master PCI link of a BlueField-4
Socket-Direct topology.

Today the controller number is omitted from phys_port_name when it is 0.
In a BlueField-4 Socket-Direct topology there are two PCI links under a
single eswitch, and they have duplicate function numbers (pf num) and
SF/VF numbers. As a result, SFs/VFs on the two links end up with the
same phys_port_name, for example pf0sf0 on both, and cannot be told
apart.

Patch 1 is a preparation patch. It passes a pfnum parameter through the
SF hardware-table allocation and free call chain, and stores it on
struct mlx5_sf. This is plumbing only: pfnum is not used for hwc
selection yet, and the controller/pfnum validation is unchanged.

Patch 2 gives the non-master PCI link its own controller number, read
from the MLX5_PCI_PF_TYPE_QUERY_PF entry of QUERY_ESW_FUNCTIONS as
host_number + 1, so that its SFs/VFs display the controller prefix.
Since the self PF and a satellite PF share the same controller number,
pfnum is used to locate the right hwc table. With this, the SF on the
second link is named c4pf0sf0 instead of pf0sf0. A user can create an SF
with the device controller number either specified or omitted, and any
other controller number is rejected.

Regards,
Tariq

Chris Mi (2):
  net/mlx5: SF, Pass pfnum through the SF hardware-table allocation path
  net/mlx5: Add controller number for SF and ECVF phys_port_name

 .../mellanox/mlx5/core/esw/devlink_port.c     |  24 ++--
 .../net/ethernet/mellanox/mlx5/core/eswitch.c | 117 ++++++++++++++++--
 .../net/ethernet/mellanox/mlx5/core/eswitch.h |  22 +++-
 .../mellanox/mlx5/core/eswitch_offloads.c     |  16 ++-
 .../mellanox/mlx5/core/lag/shared_fdb.c       |  58 +++++++++
 .../ethernet/mellanox/mlx5/core/sf/devlink.c  |  58 +++++++--
 .../ethernet/mellanox/mlx5/core/sf/hw_table.c |  49 +++++---
 .../net/ethernet/mellanox/mlx5/core/sf/priv.h |  12 +-
 8 files changed, 295 insertions(+), 61 deletions(-)


base-commit: 612848d37e68b858e15815175f1c5e609e09d719
-- 
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-25 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 21:20 [PATCH net-next 0/2] net/mlx5: Add controller number to SF and VF phys_port_name Tariq Toukan
2026-11-25 21:20 ` [PATCH net-next 1/2] net/mlx5: SF, Pass pfnum through the SF hardware-table allocation path Tariq Toukan
2026-11-25 21:20 ` [PATCH net-next 2/2] net/mlx5: Add controller number for SF and ECVF phys_port_name Tariq Toukan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox