[EXT] Re: [PATCH v2] lib/dmadev: get DMA device using device ID
Amit Prakash Shukla
amitprakashs at marvell.com
Fri Feb 9 12:30:36 CET 2024
<snip>
> > >
> > > invoke (*dev->dev_ops->dma_adapter_vchan_add)(dev, dma_dev_id,
> > > vchan, event),
> > >
> > > at cnxk driver, this ops will check whether the DMA is
> > > cnxk_dmadev_pci_driver.
> > >
> > > I think this is because the cnxk's event-and-dma implement has deep
> > > coupling
> > >
> > > (because the cnxk's event device could interact with another
> > > vendor's dma device).
> > >
> > >
> > > Maybe we should think of a better way to solve this kind of coupling
> > > problem.
> >
> > Id, is the DMA dev id which is used in looking up DMA dev. This API is in-line
> with the other libraries.
> > Crypto library has an api rte_cryptodev_pmd_get_dev to get crypto device
> based on device id.
>
> OK I think I understand.
> It is the library ID, the same as returned by int
> rte_dma_get_dev_id_by_name(const char *name);
>
> I can remove the const and apply if you are OK.
Sure, I am okay.
> I would just change this comment:
>
> + * @param dev_id
> + * Device ID value to select the device structure.
>
> into
>
> + * DMA device index in dmadev library.
Sure.
Thanks.
More information about the dev
mailing list