[PATCH v2] dmadev: clarify last_idx documentation for completion APIs
Bruce Richardson
bruce.richardson at intel.com
Wed Jul 15 10:03:19 CEST 2026
On Wed, Jul 15, 2026 at 11:36:30AM +0530, Raghavendra Ningoji wrote:
> 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.
>
> Clarify both descriptions to remove the ambiguity.
>
> Fixes: 91e581e5c924 ("dmadev: add data plane API")
>
> Signed-off-by: Raghavendra Ningoji <raghavendra.ningoji at amd.com>
> ---
> v2:
> - Clarify (per Bruce Richardson) that last_idx is the ring_idx of the
> last operation reported by the call, bounded by nb_cpls, which may not
> be the last operation the device has actually completed.
>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list