On Thu, 8 Oct 2026 at 19:24, David Marchand <[email protected]> wrote:
>
> On Wed, 12 Aug 2026 at 11:30, Gagandeep Singh <[email protected]> wrote:
> > diff --git a/drivers/bus/platform/bus_platform_driver.h 
> > b/drivers/bus/platform/bus_platform_driver.h
> > index e4dcbacf5e..607fd0bd1d 100644
> > --- a/drivers/bus/platform/bus_platform_driver.h
> > +++ b/drivers/bus/platform/bus_platform_driver.h
> > @@ -121,12 +121,19 @@ static const char *pdrvinit_ ## nm ## _alias; \
> >  RTE_INIT(pdrvinitfn_ ##nm) \
> >  { \
> >         (platform_drv).driver.name = RTE_STR(nm); \
> > -       (platform_drv).driver.alias = pdrvinit_ ## nm ## _alias; \
> > +       if (pdrvinit_ ## nm ## _alias != NULL) \
> > +               (platform_drv).driver.alias = pdrvinit_ ## nm ## _alias; \
> >         rte_platform_register(&(platform_drv)); \
>
> This alias stuff in the platform bus header looks wrong in the first place.
> We have a conflict between vdev and platform bus both defining
> RTE_PMD_REGISTER_ALIAS.
>
> You could simply declare:
>
> RTE_PMD_REGISTER_PLATFORM(dma_imx_edma5, imx_edma5_pmd_drv);
> static const char *pdrvinit_dma_imx_edma5_alias = IMX_EDMA5_COMPAT;
>
> But, since we have no in-tree platform driver using the alias stuff so
> far, I am for removing the RTE_PMD_REGISTER_ALIAS macro from
> bus/platform (plus the pdrvinit_ ## nm ## _alias variable), and let
> the driver value be the reference.
>
> >  } \
> >  RTE_PMD_EXPORT_NAME(nm)
> >
> > -/** Helper for setting platform driver alias. */
> > +/**
> > + * Helper for setting platform driver alias.
> > + *
> > + * Note: this macro uses RTE_STR() to stringify the alias argument, so it
> > + * cannot express strings that contain a comma. For such aliases,
> > + * set .driver.alias directly in the rte_platform_driver initializer 
> > instead.
> > + */
> >  #define RTE_PMD_REGISTER_ALIAS(nm, alias) \
> >  static const char *pdrvinit_ ## nm ## _alias = RTE_STR(alias)

I just sent a patch on this topic.
Have a look please.

https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/


-- 
David Marchand

Reply via email to