]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[ena] Add support for low latency transmit queues
authorMichael Brown <mcb30@ipxe.org>
Thu, 16 Oct 2025 14:58:23 +0000 (15:58 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 16 Oct 2025 15:36:29 +0000 (16:36 +0100)
commitc1badf71ca22f94277873ebc6171bfa41a50e378
tree50f0ff8b3581eb902792e25629b09700d1cfbe7d
parent0d15d7f0a52341cf75245d45a7e71cf03500034c
[ena] Add support for low latency transmit queues

Newer generations of the ENA hardware require the use of low latency
transmit queues, where the submission queues and the initial portion
of the transmitted packet are written to on-device memory via BAR2
instead of being read from host memory.

Detect support for low latency queues and set the placement policy
appropriately.  We attempt the use of low latency queues only if the
device reports that it supports inline headers, 128-byte entries, and
two descriptors prior to the inlined header, on the basis that we
don't care about using low latency queues on older versions of the
hardware since those versions will support normal host memory
submission queues anyway.

We reuse the redundant memory allocated for the submission queue as
the bounce buffer for constructing the descriptors and inlined packet
data, since this avoids needing a separate allocation just for the
bounce buffer.

We construct a metadata submission queue entry prior to the actual
submission queue entry, since experimentation suggests that newer
generations of the hardware require this to be present even though it
conveys no information beyond its own existence.

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