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]; > +} [...] > +/** > + * @internal > + * Get the rte_dma_dev structure device pointer for the device id. > + * > + * @param dev_id > + * Device ID value to select the device structure. This comment is not explanatory. What is an ID? Where does it come from? Where can we see such ID for DMA device? > + * > + * @return > + * - rte_dma_dev structure pointer for the given device ID on success, NULL > + * otherwise. > + */ > +__rte_internal > +struct rte_dma_dev *rte_dma_pmd_get_dev_by_id(const int dev_id); Again, const does not make sense here. Chengwen, please can you comment this patch as you maintain dmadev?