Re: [PATCH net] net/mlx5: Attach late uplink netdev to loaded representors

From: Jianbo Liu

Date: Fri Oct 16 2026 - 04:46:38 EST




On 10/16/2026 10:36 AM, Chenguang Zhao wrote:
[...]
I’m wondering if we could add a check during mode configuration to
disallow mode switching when the device is unbound.

Maybe we can call `mlx5_uplink_netdev_get()` within `mlx5_devlink_eswitch_mode_set()`
to retrieve the netdev, and return `-ENODEV` if it comes back NULL.
Hi Chenguang,

I don't think we should reject the mode change. A switchdev eswitch without an uplink netdev is valid for our use cases.

The check is also racy, since eth can unbind right after it, and
eth may simply not have probed yet when a script sets switchdev
after mlx5_core probe.

Thanks,
Jianbo