|SUCCESS| net/mlx5: fix skipping PF representors
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Wed Apr 8 00:11:22 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/162899
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-07
commit a1b2c3d4e5f6 (placeholder sha)
Author: Dariusz Sosnowski <dsosnowski at nvidia.com>
net/mlx5: fix skipping PF representors
This patch fixes a regression where physical port representor matching
was incorrectly terminated early when probing mlx5 devices with MPESW
enabled and multiple PF representors requested.
> 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;
Does this code preserve the original intent regarding uplink port
handling? The change from 'return false' to 'continue' fundamentally
alters the control flow in representor_match_port().
Looking at the commit message, when spawn->info.name_type is
MLX5_PHYS_PORT_NAME_TYPE_UPLINK, the code should skip matching this
spawn against the current representor_ports[i] entry and try the next
one. However, what loop does 'continue' target here?
Without seeing the full function context, can you verify whether
'continue' correctly skips to the next iteration of the intended loop?
If this is inside a nested loop structure, does 'continue' skip the
right level?
The commit message states "the representor matching loop was stopped"
as the bug, but the change is in a conditional that checks for uplink
ports. Can you clarify the relationship between uplink port detection
and the PF representor matching described in the commit message?
Does the function have proper bounds checking on eth_da->nb_representor_ports
before accessing eth_da->representor_ports[f] in the inner loop visible
at line 1191?
More information about the test-report
mailing list