Re: [PATCH mlx5-next v1 05/11] net/mlx5: Register mlx5 devices to auxiliary virtual bus

From: Jason Gunthorpe
Date: Thu Nov 05 2020 - 16:10:01 EST


On Thu, Nov 05, 2020 at 12:59:20PM -0800, Saeed Mahameed wrote:

> 2. you can always load a driver without its underlying device existed.
> for example, you can load a pci device driver/module and it will load
> and wait for pci devices to pop up, the subsysetem infrastructure will
> match between drivers and devices and probe them.

Yes, this works fine with this design

> struct aux_driver mlx5_vpda_aux_driver {
>
> .name = "vdpa",
> /* match this driver with mlx5_core devices */
> .id_table = {"mlx5_core"},
> .ops {
> /* called before probe on actual aux mlx5_core device */
> .is_supported(struct aux_device);

This means module auto loading is impossible, we can't tell to load
the module until we load the module to call the is_supported code ..

Jason