On Mon, Feb 09, 2026 at 04:14:39PM +0000, Max Tottenham wrote:
> Query switch info in auxiliary probe path to properly identify
> SF representors. Without this, esw_mode stays 0 and vport
> metadata is never initialized for hotplugged SFs.
> 
> Fixes: 919488fbfa ("net/mlx5: support Sub-Function")

According to style check, commit hash in Fixes tag is formatted
incorrectly. Proper fixes tag can be generated using a git alias
documented at: 
https://doc.dpdk.org/guides/contributing/patches.html#commit-messages-body

Could you please fix?

> Signed-off-by: Max Tottenham <[email protected]>
> ---
>  drivers/net/mlx5/linux/mlx5_os.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c 
> b/drivers/net/mlx5/linux/mlx5_os.c
> index 7f73183bb1..ec96d11b26 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -2970,6 +2970,21 @@ mlx5_os_auxiliary_probe(struct mlx5_common_device 
> *cdev,
>       }
>       spawn.ifindex = ret;
>       spawn.cdev = cdev;
> +     /*
> +      * Query switch info for SF representors (like PCI probe does).
> +      * Without this, esw_mode stays 0 and vport metadata is never
> +      * initialized for hotplugged SFs.
> +      */
> +     if (spawn.ifindex > 0) {
> +             ret = mlx5_sysfs_switch_info(spawn.ifindex, &spawn.info);
> +             if (ret) {
> +                     DRV_LOG(DEBUG, "No switch info for ifindex %d, assuming 
> non-representor",
> +                             spawn.ifindex);
> +                     /* Not an error - device may not be a representor */
> +                     ret = 0;
> +             }
> +     }
> +

Could you please elaborate on the type of setup you are using
and what kind of issue are you seeing?
How PF, SFs are configured?
How are you probing all ports (both SF representors and SF).

In general, switch info is only required on related PCI PF which
controls the embedded switch.
Switch info for SFs should be queried only when SF representor is
probed and SF representors are based on PCI PF device
(e.g. probed with 03:00.0,representor=sf0).
When SF is probed (i.e. when mlx5_os_auxiliary_probe() is called)
this info is not needed, since SF itself does not control the switch.
In relation to patch 3, switch info will be used to create vport actions
on transfer proxy.

>       /* Spawn device. */
>       eth_dev = mlx5_dev_spawn(dev, &spawn, &eth_da, mkvlist);
>       if (eth_dev == NULL)

Reply via email to