[PATCH] dmadev: clarify last_idx documentation for completion APIs

Raghavendra Ningoji raghavendra.ningoji at amd.com
Tue Jul 14 13:00:43 CEST 2026


On Tue, 14 Jul 2026, Bruce Richardson <bruce.richardson at intel.com> wrote:
>
> Just wondering if completed is ambiguous here. The index is that of the
> last reported operation, right? So if we request completed status of e.g.
> 32 operations, but 64 are actually completed, we only get returned the
> index of the 32nd op AFAIK.

Right, that's correct - last_idx is the ring_idx of the last operation
*reported by the call*, which is bounded by nb_cpls, not necessarily the
last operation the device has completed. And as you point out this applies
to both APIs. How about making that explicit, e.g. for completed_status():

    @param[out] last_idx
      The ring_idx of the last operation reported by this call, regardless
      of whether it completed successfully or with an error (at most nb_cpls
      operations are reported, so this may not be the last operation the
      device has actually completed).

and the equivalent (with the "successfully completed" wording) for
rte_dma_completed()? If that reads well I'll send it as v2.

Thanks,
Raghavendra


More information about the dev mailing list