> Subject: RE: [EXTERNAL] Re: [PATCH v2] rawdev: add API to get device from 
> index
> 
> > > > diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h
> > > > index 22b406444d..8339122348 100644
> > > > --- a/lib/rawdev/rte_rawdev_pmd.h
> > > > +++ b/lib/rawdev/rte_rawdev_pmd.h
> > > > @@ -102,6 +102,30 @@ rte_rawdev_pmd_get_named_dev(const char
> > *name)
> > > >         return NULL;
> > > >  }
> > > >
> > > > +/**
> > > > + * Get the rte_rawdev structure device pointer for given device ID.
> > > > + *
> > > > + * @param dev_id
> > > > + *   raw device index.
> > > > + *
> > > > + * @return
> > > > + *   - The rte_rawdev structure pointer for the given device ID.
> > > > + */
> > > > +static inline struct rte_rawdev *
> > > > +rte_rawdev_pmd_get_dev(uint8_t dev_id)
> > > > +{
> > > > +       struct rte_rawdev *dev;
> > > > +
> > > > +       if (dev_id >= RTE_RAWDEV_MAX_DEVS)
> > > > +               return NULL;
> > > > +
> > > > +       dev = &rte_rawdevs[dev_id];
> > > > +       if (dev->attached == RTE_RAWDEV_ATTACHED)
> > > > +               return dev;
> > > > +
> > > > +       return NULL;
> > > > +}
> > > > +
> > >
> > > This seems simple enough and we have the same kind of helper in other
> > > device class libraries.
> > > But I would like to better understand the driver API that requires this.
> > >
> > This is being used in the new cnxk rvu_lf driver.
> > https://patches.dpdk.org/project/dpdk/cover/20241008105415.1026962-1-
> gak...@marvell.com/
> 
> Hi David/Thomas,
> Can this patch be merged in RC1, so that PMD patches can be rebased in next-
> net-mrvl for RC2?
> 

Can we merge this patch early into RC2, so that PMD patch can be rebased?

Reply via email to