[PATCH 6/8] bus: factorize device selection
David Marchand
david.marchand at redhat.com
Thu Mar 26 09:48:42 CET 2026
On Tue, 24 Mar 2026 at 15:15, Kevin Traynor <ktraynor at redhat.com> wrote:
> > diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
> > index 136ac511ef..00e7e7315c 100644
> > --- a/drivers/dma/idxd/idxd_bus.c
> > +++ b/drivers/dma/idxd/idxd_bus.c
> > @@ -263,12 +263,8 @@ is_for_this_process_use(struct rte_dsa_device *dev, const char *name)
> > if (strncmp(name, prefix, prefixlen) == 0 && name[prefixlen] == '_')
> > retval = 1;
> >
> > - if (retval && dsa_bus.bus.conf.scan_mode != RTE_BUS_SCAN_UNDEFINED) {
> > - if (dsa_bus.bus.conf.scan_mode == RTE_BUS_SCAN_ALLOWLIST)
> > - retval = rte_bus_find_devargs(&dsa_bus.bus, dev->device.name) != NULL;
> > - else
> > - retval = rte_bus_find_devargs(&dsa_bus.bus, dev->device.name) == NULL;
> > - }
> > + if (retval && !rte_bus_is_ignored_device(&dsa_bus.bus, dev->device.name))
> > + retval = 1;
>
> hmm, should this be
>
> if (retval && rte_bus_is_ignored_device(&dsa_bus.bus, dev->device.name))
> retval = 0;
>
> >
> > return retval;
> > }
Indeed, something is wrong with my change.
I will go with a if (retval) retval =
!rte_bus_is_ignored_device(&dsa_bus.bus, dev->device.name);
--
David Marchand
More information about the dev
mailing list