|SUCCESS| net/mlx5: fix skipping PF representors
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Wed Apr 8 00:17:07 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
git sha: 2f7cdd821b1b
Author: Dariusz Sosnowski <dsosnowski at nvidia.com>
net/mlx5: fix skipping PF representors
This patch corrects the representor matching logic in the mlx5 driver
to ensure all requested PF representors are properly probed when MPESW
is enabled.
> 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;
Looking at the representor_match_port() function, can you clarify the
loop structure here? This change modifies a 'return false' to 'continue',
but what loop is being continued? Is there a for/while loop at this
scope that allows continue to work properly?
Without seeing more context, changing 'return false' to 'continue' in
what appears to be a conditional check seems potentially incorrect. Does
this code actually compile and function as intended? If there's no
enclosing loop at this level, the 'continue' statement would be invalid.
Can you provide the full function context showing the loop structure that
makes this 'continue' valid?
>
> for (uint16_t f = 0; f < eth_da->nb_representor_ports; ++f) {
> uint16_t port_num = eth_da->representor_ports[f];
More information about the test-report
mailing list