patch 'net/mlx5: fix MPESW PF probe for any number of ports' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:56:00 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.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 02/22/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f399a2052b210c214499e441c0623be71482fed7
Thanks.
Luca Boccassi
---
>From f399a2052b210c214499e441c0623be71482fed7 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Mon, 5 Jan 2026 15:29:41 +0200
Subject: [PATCH] net/mlx5: fix MPESW PF probe for any number of ports
[ upstream commit a3ad6bace70cc229698f4e9b14cb713937d02fa3 ]
Current MPESW PF probe was designed for interfaces with up to 2 ports.
The patch can handle interfaces with any number of ports.
Fixes: 11c73de9ef63 ("net/mlx5: probe multi-port E-Switch device")
Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Reviewed-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Signed-off-by: Bing Zhao <bingz at nvidia.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 47 +++++++++++++++++++---------------
1 file changed, 26 insertions(+), 21 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 7747b0c869..c93a7ac4f2 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -493,8 +493,9 @@ mlx5_representor_info_get(struct rte_eth_dev *dev,
struct rte_eth_representor_info *info)
{
struct mlx5_priv *priv = dev->data->dev_private;
- int n_type = 5; /* Representor types: PF, VF, HPF at VF, SF and HPF at SF. */
- int n_pf = 2; /* Number of PFs. */
+ /* Representor types: PF, VF, HPF at VF, SF and HPF at SF, total 5. */
+ int n_type = RTE_ETH_REPRESENTOR_PF + 2; /* Maximal type + 2 for HPFs. */
+ int n_pf = 8; /* Maximal number of PFs. */
int i = 0, pf;
int n_entries;
@@ -509,25 +510,29 @@ mlx5_representor_info_get(struct rte_eth_dev *dev,
info->pf = 0;
if (mlx5_is_port_on_mpesw_device(priv)) {
info->pf = priv->mpesw_port;
- /* PF range, both ports will show the same information. */
- info->ranges[i].type = RTE_ETH_REPRESENTOR_PF;
- info->ranges[i].controller = 0;
- info->ranges[i].pf = priv->mpesw_owner + 1;
- info->ranges[i].vf = 0;
- /*
- * The representor indexes should be the values set of "priv->mpesw_port".
- * In the real case now, only 1 PF/UPLINK representor is supported.
- * The port index will always be the value of "owner + 1".
- */
- info->ranges[i].id_base =
- MLX5_REPRESENTOR_ID(priv->mpesw_owner, info->ranges[i].type,
- info->ranges[i].pf);
- info->ranges[i].id_end =
- MLX5_REPRESENTOR_ID(priv->mpesw_owner, info->ranges[i].type,
- info->ranges[i].pf);
- snprintf(info->ranges[i].name, sizeof(info->ranges[i].name),
- "pf%d", info->ranges[i].pf);
- i++;
+ for (i = 0; i < n_pf; i++) {
+ /* PF range, both ports will show the same information. */
+ info->ranges[i].type = RTE_ETH_REPRESENTOR_PF;
+ info->ranges[i].controller = 0;
+ info->ranges[i].pf = priv->mpesw_owner + i + 1;
+ info->ranges[i].vf = 0;
+ /*
+ * The representor indexes should be the values set of "priv->mpesw_port".
+ * In the real case now, only 1 PF/UPLINK representor is supported.
+ * The port index will always be the value of "owner + 1".
+ */
+ info->ranges[i].id_base =
+ MLX5_REPRESENTOR_ID(priv->mpesw_owner,
+ info->ranges[i].type,
+ info->ranges[i].pf);
+ info->ranges[i].id_end =
+ MLX5_REPRESENTOR_ID(priv->mpesw_owner,
+ info->ranges[i].type,
+ info->ranges[i].pf);
+ snprintf(info->ranges[i].name,
+ sizeof(info->ranges[i].name),
+ "pf%d", info->ranges[i].pf);
+ }
} else if (priv->pf_bond >= 0)
info->pf = priv->pf_bond;
for (pf = 0; pf < n_pf; ++pf) {
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:45.505895001 +0000
+++ 0058-net-mlx5-fix-MPESW-PF-probe-for-any-number-of-ports.patch 2026-02-20 14:55:43.244191751 +0000
@@ -1 +1 @@
-From a3ad6bace70cc229698f4e9b14cb713937d02fa3 Mon Sep 17 00:00:00 2001
+From f399a2052b210c214499e441c0623be71482fed7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a3ad6bace70cc229698f4e9b14cb713937d02fa3 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list