On Thu, Jul 28, 2022 at 6:57 PM Bruce Richardson <bruce.richard...@intel.com> wrote: > > On Thu, Jul 28, 2022 at 05:26:35PM +0200, David Marchand wrote: > > Make rte_bus opaque for non internal users. > > This will make extending this object possible without breaking the ABI. > > > > Introduce a new driver header and move rte_bus definition and helpers. > > Update drivers and library to use the internal header. > > > > Some applications may have been dereferencing rte_bus objects, mark > > this object's accessors as stable. > > > > Signed-off-by: David Marchand <david.march...@redhat.com> > > --- > > Changes since RFC v2: > > - updated release notes, > > - marked accessors as stable, > > > > Changes since RFC v1: > > - update all existing users of the public header to use the internal one, > > > > Acked-by: Bruce Richardson <bruce.richard...@intel.com> > > One small comment below... > > > --- > > app/test/test_devargs.c | 2 +- > <snip> > > lib/pcapng/rte_pcapng.c | 2 +- > > 38 files changed, 343 insertions(+), 319 deletions(-) > > create mode 100644 lib/eal/include/bus_driver.h > > > > diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c > > index ac5bc34c18..0a4c34a1ad 100644 > > --- a/app/test/test_devargs.c > > +++ b/app/test/test_devargs.c > > @@ -9,7 +9,7 @@ > > #include <rte_common.h> > > #include <rte_devargs.h> > > #include <rte_kvargs.h> > > -#include <rte_bus.h> > > +#include <bus_driver.h> > > #include <rte_class.h> > > > > This seems a strange file to need to access bus internals. Maybe something > to investigate in future.
Yeah... I am not sure it is worth fixing. This code dereferences a bus object to check the ring driver registered (by calling vdev_bus->parse()). We could make it possible to list the drivers (maybe per bus, or even globally). Or we may expose something like bus_can_parse() / rte_bus_find_by_device_name(). But I did not find applications needing this so I let the code as is. -- David Marchand