Re: [EXT] Re: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-02-09 Thread Thomas Monjalon
09/02/2024 12:30, Amit Prakash Shukla: > > > > > > > > > > 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'

RE: [EXT] Re: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-02-09 Thread Amit Prakash Shukla
> > > > > > 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 > > > >

Re: [EXT] Re: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-02-09 Thread Thomas Monjalon
09/02/2024 12:05, Amit Prakash Shukla: > > On 2024/2/9 0:25, Thomas Monjalon wrote: > > > 19/12/2023 12:00, Amit Prakash Shukla: > > >> +struct rte_dma_dev * > > >> +rte_dma_pmd_get_dev_by_id(const int dev_id) > > > const does not make sense here for an int parameter. > > > > > > I think it could

RE: [EXT] Re: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-02-09 Thread Amit Prakash Shukla
Hi Thomas and Chengwen, Thank you for the review and feedback. Please find my comment in-line. Thanks, Amit Shukla > -- > Hi Thomas, > > > On 2024/2/9 0:25, Thomas Monjalon wrote: > > 19/12/2023 12:00, Amit Prakash Shukla: > >

Re: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-02-09 Thread fengchengwen
Hi Thomas, On 2024/2/9 0:25, Thomas Monjalon wrote: 19/12/2023 12:00, Amit Prakash Shukla: +struct rte_dma_dev * +rte_dma_pmd_get_dev_by_id(const int dev_id) const does not make sense here for an int parameter. I think it could be OK with const even if the parameter is not pointer. Howeve

Re: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-02-08 Thread Thomas Monjalon
19/12/2023 12:00, Amit Prakash Shukla: > +struct rte_dma_dev * > +rte_dma_pmd_get_dev_by_id(const int dev_id) const does not make sense here for an int parameter. > +{ > + if (!rte_dma_is_valid(dev_id)) > + return NULL; > + > + return &rte_dma_devices[dev_id]; > +} [...] > +/*

RE: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-02-05 Thread Amit Prakash Shukla
ubject: RE: [PATCH v2] lib/dmadev: get DMA device using device ID > > > > > DMA library has a function to get DMA device based on device name but > > there is no function to get DMA device using device id. > > > > Added a function that lookup for the

RE: [PATCH v2] lib/dmadev: get DMA device using device ID

2024-01-08 Thread Anoob Joseph
> > DMA library has a function to get DMA device based on device name but > there is no function to get DMA device using device id. > > Added a function that lookup for the dma device using device id and returns > the pointer to the same. > > Signed-off-by: Amit Prakash Shukla > Acked-by: Cheng

[PATCH v2] lib/dmadev: get DMA device using device ID

2023-12-19 Thread Amit Prakash Shukla
DMA library has a function to get DMA device based on device name but there is no function to get DMA device using device id. Added a function that lookup for the dma device using device id and returns the pointer to the same. Signed-off-by: Amit Prakash Shukla Acked-by: Chengwen Feng --- v2: