]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[gve] Use raw DMA addresses in descriptors in DQO-QPL mode
authorMichael Brown <mcb30@ipxe.org>
Fri, 10 Oct 2025 11:44:01 +0000 (12:44 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 10 Oct 2025 11:49:26 +0000 (12:49 +0100)
The DQO-QPL operating mode uses registered queue page lists but still
requires the raw DMA address (rather than the linear offset within the
QPL) to be provided in transmit and receive descriptors.

Set the queue page list base device address appropriately.

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

index 3c45b92fa171d3739f2a72b950be9efd68366af6..c25f1d452f0369dbd042723eb2f9f6669d106d4d 100644 (file)
@@ -938,7 +938,7 @@ static int gve_alloc_qpl ( struct gve_nic *gve, struct gve_qpl *qpl,
        qpl->data = dma_umalloc ( gve->dma, &qpl->map, len, GVE_ALIGN );
        if ( ! qpl->data )
                return -ENOMEM;
-       qpl->base = ( ( gve->mode & GVE_MODE_QPL ) ?
+       qpl->base = ( ( gve->mode == GVE_MODE_QPL ) ?
                      0 : dma ( &qpl->map, qpl->data ) );
 
        DBGC ( gve, "GVE %p QPL %#08x at [%08lx,%08lx)\n",
index 9cef01a02f635768d3b45666e579e2a2b5a49048..d352306efd75aedeea8042540eda630c7769e3af 100644 (file)
@@ -530,9 +530,10 @@ struct gve_qpl {
        unsigned int id;
        /** Queue page list base device address
         *
-        * This will be zero if queue page list addressing is in use,
-        * or the DMA address of the first page if raw DMA addressing
-        * is in use.
+        * This will be zero in the GQI-QPL operating mode, or the DMA
+        * address of the first page in any other operating mode.
+        * (Despite its name, DQO-QPL still requires the use of raw
+        * DMA addresses in transmit and receive descriptors.)
         */
        physaddr_t base;
 };