On Wed, Sep 15, 2021 at 12:12:34PM +0200, Maxime Coquelin wrote:
> Hi Kevin,
> 
> On 9/8/21 12:30 PM, Kevin Laatz wrote:
> > Add the basic device probing for DSA devices bound to the IDXD kernel
> > driver. These devices can be configured via sysfs and made available to
> > DPDK if they are found during bus scan. Relevant documentation is included.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
> > Signed-off-by: Kevin Laatz <kevin.la...@intel.com>
> > ---
> >  doc/guides/dmadevs/idxd.rst  |  64 +++++++
> >  drivers/dma/idxd/idxd_bus.c  | 352 +++++++++++++++++++++++++++++++++++
> >  drivers/dma/idxd/meson.build |   1 +
> >  3 files changed, 417 insertions(+)
> >  create mode 100644 drivers/dma/idxd/idxd_bus.c
> > 
> 
> Sorry if it has been asked before, but what is the reason this DSA bus
> driver is not in drivers/bus/?
> 

This bus-driver solution came out of discussion previously when we were
looking to add DSA support to the ioat driver. Individual device drivers of
any class cannot themselves do any probing to discover devices, but only
bus drivers can do that. Therefore, to enable discovery of DSA devices used
by the kernel driver, a custom bus driver is necessary. Since this bus
driver only supports discovery of DSA devices using a single driver type
behind the scenes (referred to in previous discussions as a "singleton" bus
driver), it's kept in with the rest of the DSA driver code. It's not a full
bus driver, more a minimal driver whose job it is to scan /dev/dsa and
initialise the proper DSA/idxd driver.

So we could move it to /dev/bus, but I think it would lead to overall
higher maintenance and I fail to see any real benefits.

/Bruce

Reply via email to