patch 'net/mlx5: fix local and host representor name collision' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:05:06 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8ede51912652547887ce1abf7df759fdb73094c7
Thanks.
Kevin
---
>From 8ede51912652547887ce1abf7df759fdb73094c7 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at nvidia.com>
Date: Tue, 3 Nov 2026 08:19:59 +0000
Subject: [PATCH] net/mlx5: fix local and host representor name collision
[ upstream commit 993be65c9dacc5c219aed7f1afdb319d74ee20cc ]
On BlueField with a single uplink and host PF, representor port names
omit the controller index. A local representor (pf0vf0, controller 0)
and a host representor (c1pf0vf0, controller 1) with the same index
were both named <BDF>_representor_vf0. Whichever was probed first took
the name. Probing the other one returned EEXIST, which is treated as
already spawned, so the attach succeeded silently without a new port.
Add controller and PF indexes to the names of local representors on
BlueField, detected by the presence of a host PF, for example
<BDF>_representor_c0pf0vf0 and <BDF>_representor_c0pf0sf0.
The host PF representor can also report controller 0, so it is
excluded explicitly. Host representor names are unchanged.
Also log a notice when a requested representor is already spawned,
so that probing it again is no longer silent.
Fixes: cb95feefdd03 ("net/mlx5: support sub-function representor")
Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 7f48e03c2b..cb4ef2db86 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1054,4 +1054,11 @@ is_hpf(const struct mlx5_dev_spawn_data *spawn)
}
+static bool
+is_bluefield_local_representor(const struct mlx5_dev_spawn_data *spawn)
+{
+ return spawn->info.representor && spawn->info.ctrl_num == 0 &&
+ spawn->nb_hpfs > 0 && !is_hpf(spawn);
+}
+
static int
build_port_name(struct rte_device *dpdk_dev,
@@ -1103,4 +1110,6 @@ build_port_name(struct rte_device *dpdk_dev,
* 2. There are multiple uplinks (MPESW).
* 3. There are multiple host PFs (BlueField socket direct).
+ * 4. Port is a local (controller 0) representor on BlueField. Local and
+ * host representors with the same index would otherwise share a name.
*
* If none of these conditions apply, then it is assumed that
@@ -1108,5 +1117,5 @@ build_port_name(struct rte_device *dpdk_dev,
* where there is only one uplink/PF and one host PF (on BlueField).
*/
- if (!is_standard_eswitch(spawn))
+ if (!is_standard_eswitch(spawn) || is_bluefield_local_representor(spawn))
ret = snprintf(name + written, name_sz - written,
"_representor_c%dpf%d%s%u",
@@ -1332,4 +1341,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
if (mkvlist)
mlx5_port_args_set_used(name, port_id, mkvlist);
+ if (switch_info->representor)
+ DRV_LOG(NOTICE, "representor \"%s\" is already spawned as port %u",
+ name, port_id);
rte_errno = EEXIST;
return NULL;
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:49.933103081 +0000
+++ 0380-net-mlx5-fix-local-and-host-representor-name-collisi.patch 2026-12-03 12:52:39.288938781 +0000
@@ -1 +1 @@
-From 993be65c9dacc5c219aed7f1afdb319d74ee20cc Mon Sep 17 00:00:00 2001
+From 8ede51912652547887ce1abf7df759fdb73094c7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 993be65c9dacc5c219aed7f1afdb319d74ee20cc ]
+
@@ -23 +24,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
-index 4c35737292..bf6f5c0ae2 100644
+index 7f48e03c2b..cb4ef2db86 100644
@@ -35 +36 @@
-@@ -1082,4 +1082,11 @@ is_hpf(const struct mlx5_dev_spawn_data *spawn)
+@@ -1054,4 +1054,11 @@ is_hpf(const struct mlx5_dev_spawn_data *spawn)
@@ -47 +48 @@
-@@ -1131,4 +1138,6 @@ build_port_name(struct rte_device *dpdk_dev,
+@@ -1103,4 +1110,6 @@ build_port_name(struct rte_device *dpdk_dev,
@@ -54 +55 @@
-@@ -1136,5 +1145,5 @@ build_port_name(struct rte_device *dpdk_dev,
+@@ -1108,5 +1117,5 @@ build_port_name(struct rte_device *dpdk_dev,
@@ -61 +62 @@
-@@ -1360,4 +1369,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -1332,4 +1341,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
More information about the stable
mailing list