]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[ena] Allow for out-of-order completions
authorMichael Brown <mcb30@ipxe.org>
Fri, 26 Aug 2022 14:48:52 +0000 (15:48 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 26 Aug 2022 18:38:25 +0000 (19:38 +0100)
commit6d2cead461db7243330f3275ff9ea7ff4607c4f8
tree5a882d2a5bbd6728f98a117b8ad007d02949a7b8
parent856ffe000e79a1af24ea11301447dd70b8d54ac2
[ena] Allow for out-of-order completions

The ENA data path design has separate submission and completion
queues.  Submission queues must be refilled in strict order (since
there is only a single linear tail pointer used to communicate the
existence of new entries to the hardware), and completion queue
entries include a request identifier copied verbatim from the
submission queue entry.  Once the submission queue doorbell has been
rung, software never again reads from the submission queue entry and
nothing ever needs to write back to the submission queue entry since
completions are reported via the separate completion queue.

This design allows the hardware to complete submission queue entries
out of order, provided that it internally caches at least as many
entries as it leaves gaps.

Record and identify I/O buffers by request identifier (using a
circular ring buffer of unique request identifiers), and remove the
assumption that submission queue entries will be completed in order.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/ena.c
src/drivers/net/ena.h