[PATCH v2 5/7] bus: factorize devargs lookup
David Marchand
david.marchand at redhat.com
Fri Apr 3 16:22:41 CEST 2026
Hello,
On Sat, 28 Mar 2026 at 04:33, fengchengwen <fengchengwen at huawei.com> wrote:
> > diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
> > index 06a3643290..e6963dc18a 100644
> > --- a/drivers/bus/uacce/uacce.c
> > +++ b/drivers/bus/uacce/uacce.c
> > @@ -70,25 +70,10 @@ extern int uacce_bus_logtype;
> > #define UACCE_BUS_DEBUG(fmt, ...) UACCE_BUS_LOG(DEBUG, fmt, ##__VA_ARGS__)
> >
> >
> > -static struct rte_devargs *
> > -uacce_devargs_lookup(const char *dev_name)
> > -{
> > - char name[RTE_UACCE_DEV_PATH_SIZE] = {0};
> > - struct rte_devargs *devargs;
> > -
> > - snprintf(name, sizeof(name), "%s%s", UACCE_DEV_PREFIX, dev_name);
>
> For uacce, application should pass device with prefix uacce, e.g:
> dpdk-testpmd -a uacce:hisi_zip-0,queues=2 --file-prefix=feng -- -i
>
> And the scan device is hisi_zip-0, so in match we should combined which is
> above snprintf does.
Erm, strange that I did not see this during my tests, but I think you are right.
It means the matching is broken in rte_bus_find_devargs().
I'll respin (I need to, anyway, as there was some fslmc change that
got merged late in v26.03).
>
> > - RTE_EAL_DEVARGS_FOREACH(uacce_bus.bus.name, devargs) {
> > - if (strcmp(devargs->name, name) == 0)
> > - return devargs;
> > - }
> > -
> > - return NULL;
> > -}
> > -
--
David Marchand
More information about the dev
mailing list