]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[gve] Add concept of operating mode
authorMichael Brown <mcb30@ipxe.org>
Mon, 29 Sep 2025 10:46:15 +0000 (11:46 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 29 Sep 2025 14:13:55 +0000 (15:13 +0100)
commit048a3467052d00c42041231e11127fe147f6e7c5
treebf7f270f7621508e0c45dd795f358e0d51fe4038
parent610089b98e52c26d8590f9ace9bb8fbc3ff5dcff
[gve] Add concept of operating mode

The GVE family supports two incompatible descriptor queue formats:

  * GQI: in-order descriptor queues
  * DQO: out-of-order descriptor queues

and two addressing modes:

  * QPL: pre-registered queue page list addressing
  * RDA: raw DMA addressing

All four combinations (GQI-QPL, GQI-RDA, DQO-QPL, and DQO-RDA) are
theoretically supported by the Linux driver, which is essentially the
only public reference provided by Google.  The original versions of
the GVE NIC supported only GQI-QPL mode, and so the iPXE driver is
written to target this mode, on the assumption that it would continue
to be supported by all models of the GVE NIC.

This assumption turns out to be incorrect: Google does not deem it
necessary to retain backwards compatibility.  Some newer machine types
(such as a4-highgpu-8g) support only the DQO-RDA operating mode.

Add a definition of operating mode, and pass this as an explicit
parameter to the "configure device resources" admin queue command.  We
choose a representation that subtracts one from the value passed in
this command, since this happens to allow us to decompose the mode
into two independent bits (one representing the use of DQO descriptor
format, one representing the use of QPL addressing).

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