* [PATCH] net/mlx5: fix ignoring PF representor
@ 2026-03-11 7:53 Dariusz Sosnowski
2026-03-11 12:15 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Dariusz Sosnowski @ 2026-03-11 7:53 UTC (permalink / raw)
To: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
Matan Azrad
Cc: dev, Raslan Darawsheh
Whenever a new set of representors are probed by mlx5 driver
on Multiport E-Switch setup using these device arguments:
0000:08:00.0,dv_flow_en=2,representor=(pf1)vf1
mlx5 driver should create 2 DPDK ports.
One for 1st physical port (transfer proxy) and another for
PF1VF1 representor. Parentheses are used in representor argument
to indicate that physical port related to PF1VF1 should be ignored.
Offending patch has introduced a regression to ignore logic.
Whenever mlx5 driver checked if related physical port should be probed
and if representor_match_uplink() returned false (as it should),
this result was ignored and probing continued.
If requested VF/SF index matched PF index, physical port was probed.
This patch fixes that by adding explicit rejection of spawning physical
ports for VF/SF representors if checked port is a physical port and
driver have not already spawned it.
Fixes: f363bbe2c036 ("net/mlx5: fix probing to allow BlueField Socket Direct")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 57a6ce7458..a717191002 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1184,6 +1184,10 @@ representor_match_port(const struct mlx5_dev_spawn_data *spawn,
representor_match_uplink(spawn, spawn->info.pf_num, eth_da, pf_num))
return true;
+ /* Uplink ports should not be matched against representor_ports. */
+ if (spawn->info.name_type == MLX5_PHYS_PORT_NAME_TYPE_UPLINK)
+ return false;
+
for (uint16_t f = 0; f < eth_da->nb_representor_ports; ++f) {
uint16_t port_num = eth_da->representor_ports[f];
bool pf_num_match;
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] net/mlx5: fix ignoring PF representor
2026-03-11 7:53 [PATCH] net/mlx5: fix ignoring PF representor Dariusz Sosnowski
@ 2026-03-11 12:15 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2026-03-11 12:15 UTC (permalink / raw)
To: Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam,
Suanming Mou, Matan Azrad
Cc: dev
Hi,
On 11/03/2026 9:53 AM, Dariusz Sosnowski wrote:
> Whenever a new set of representors are probed by mlx5 driver
> on Multiport E-Switch setup using these device arguments:
>
> 0000:08:00.0,dv_flow_en=2,representor=(pf1)vf1
>
> mlx5 driver should create 2 DPDK ports.
> One for 1st physical port (transfer proxy) and another for
> PF1VF1 representor. Parentheses are used in representor argument
> to indicate that physical port related to PF1VF1 should be ignored.
>
> Offending patch has introduced a regression to ignore logic.
> Whenever mlx5 driver checked if related physical port should be probed
> and if representor_match_uplink() returned false (as it should),
> this result was ignored and probing continued.
> If requested VF/SF index matched PF index, physical port was probed.
>
> This patch fixes that by adding explicit rejection of spawning physical
> ports for VF/SF representors if checked port is a physical port and
> driver have not already spawned it.
>
> Fixes: f363bbe2c036 ("net/mlx5: fix probing to allow BlueField Socket Direct")
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Acked-by: Bing Zhao <bingz@nvidia.com>
Patch squashed into relevant commit in next-net-mlx,
Kindest regards
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-11 12:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 7:53 [PATCH] net/mlx5: fix ignoring PF representor Dariusz Sosnowski
2026-03-11 12:15 ` Raslan Darawsheh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox