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'
> > >
> > > 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
> > >
>
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
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:
> >
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
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];
> +}
[...]
> +/*
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
>
> 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
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:
9 matches
Mail list logo