[PATCH v3] dmadev: clarify last_idx documentation for completion APIs

Thomas Monjalon thomas at monjalon.net
Fri Jul 17 10:44:43 CEST 2026


> > The last_idx output parameter was documented identically for
> > rte_dma_completed() and rte_dma_completed_status(), even though the two
> > APIs have different semantics:
> > 
> > - rte_dma_completed() only reports operations that completed
> >   successfully and stops at the first error, so its last_idx is the
> >   ring_idx of the last successfully completed operation.
> > - rte_dma_completed_status() reports all completed operations regardless
> >   of status, so its last_idx is the last completed operation's ring_idx
> >   irrespective of success or failure.
> > 
> > In both cases only up to nb_cpls operations are reported per call, so
> > last_idx is the ring_idx of the last reported operation, which may not
> > be the last operation the device has actually completed.
> > 
> > Refresh the full documentation of both functions to remove the
> > ambiguity and make the behaviour explicit.
> > 
> > Fixes: 91e581e5c924 ("dmadev: add data plane API")
> > 
> > Signed-off-by: Raghavendra Ningoji <raghavendra.ningoji at amd.com>
> > Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> Reviewed-by: Chengwen Feng <fengchengwen at huawei.com>

Applied, thanks.





More information about the dev mailing list