From: Tariq Toukan <tariqt@nvidia.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Carolina Jubran <cjubran@nvidia.com>, Chris Mi <cmi@nvidia.com>,
"Gal Pressman" <gal@nvidia.com>,
Kees Cook <kees+treewide@kernel.org>,
"Leon Romanovsky" <leon@kernel.org>, <linux-rdma@vger.kernel.org>,
Mark Bloch <mbloch@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>,
Or Har-Toov <ohartoov@nvidia.com>,
Parav Pandit <parav@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>, Shay Drori <shayd@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>
Subject: [PATCH net-next 0/2] net/mlx5: Add controller number to SF and VF phys_port_name
Date: Wed, 25 Nov 2026 23:20:30 +0200 [thread overview]
Message-ID: <20261125212032.243064-1-tariqt@nvidia.com> (raw)
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
next reply other threads:[~2026-11-25 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 21:20 Tariq Toukan [this message]
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
2026-11-26 21:21 ` sashiko-bot
2026-11-26 22:10 ` netdev-bot+sashiko
2026-11-26 21:21 ` [PATCH net-next 0/2] net/mlx5: Add controller number to SF and VF phys_port_name sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261125212032.243064-1-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=cjubran@nvidia.com \
--cc=cmi@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=gal@nvidia.com \
--cc=kees+treewide@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=ohartoov@nvidia.com \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=shayd@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox