* [PATCH] net/mlx5: fix skipping PF representors
@ 2026-04-07 10:31 Dariusz Sosnowski
2026-04-09 8:40 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Dariusz Sosnowski @ 2026-04-07 10:31 UTC (permalink / raw)
To: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
Matan Azrad
Cc: dev, Raslan Darawsheh, stable
Offending patch changed logic of matching IB ports to requested
representors in mlx5 driver.
Each found IB port was matched against all requested representors.
Whenever:
- requested representor was VF or SF
- PF was not ignored
- IB port was physical port
- physical port index matched requested PF index
the physical port representor was probed.
If any of the above is false, mlx5 driver should have continue testing
other requested PF representors.
In the offending patch, the representor matching loop was stopped.
As a result, if mlx5 device with MPESW enabled was probed with the
following devargs:
-a 08:00.0,dv_flow_en=2,representor=pf[0-1]vf[0,1]
Only 5 ports were probed (physical port 0 and all VF representors),
instead of 6 ports (physical port 1 is missing).
This patch fixes that by continuing representor matching loop
on physical port to PF index mismatch as described above.
Fixes: 2f7cdd821b1b ("net/mlx5: fix probing to allow BlueField Socket Direct")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index a717191002..10b947116c 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1186,7 +1186,7 @@ representor_match_port(const struct mlx5_dev_spawn_data *spawn,
/* Uplink ports should not be matched against representor_ports. */
if (spawn->info.name_type == MLX5_PHYS_PORT_NAME_TYPE_UPLINK)
- return false;
+ continue;
for (uint16_t f = 0; f < eth_da->nb_representor_ports; ++f) {
uint16_t port_num = eth_da->representor_ports[f];
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/mlx5: fix skipping PF representors
2026-04-07 10:31 [PATCH] net/mlx5: fix skipping PF representors Dariusz Sosnowski
@ 2026-04-09 8:40 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2026-04-09 8:40 UTC (permalink / raw)
To: Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam,
Suanming Mou, Matan Azrad
Cc: dev, stable
Hi,
On 07/04/2026 1:31 PM, Dariusz Sosnowski wrote:
> Offending patch changed logic of matching IB ports to requested
> representors in mlx5 driver.
> Each found IB port was matched against all requested representors.
> Whenever:
>
> - requested representor was VF or SF
> - PF was not ignored
> - IB port was physical port
> - physical port index matched requested PF index
>
> the physical port representor was probed.
> If any of the above is false, mlx5 driver should have continue testing
> other requested PF representors.
> In the offending patch, the representor matching loop was stopped.
> As a result, if mlx5 device with MPESW enabled was probed with the
> following devargs:
>
> -a 08:00.0,dv_flow_en=2,representor=pf[0-1]vf[0,1]
>
> Only 5 ports were probed (physical port 0 and all VF representors),
> instead of 6 ports (physical port 1 is missing).
>
> This patch fixes that by continuing representor matching loop
> on physical port to PF index mismatch as described above.
>
> Fixes: 2f7cdd821b1b ("net/mlx5: fix probing to allow BlueField Socket Direct")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Acked-by: Bing Zhao <bingz@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-09 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 10:31 [PATCH] net/mlx5: fix skipping PF representors Dariusz Sosnowski
2026-04-09 8:40 ` Raslan Darawsheh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox