git: 620a12371c62 - stable/15 - gve: Page-align DQO descriptor and completion rings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Nov 2026 14:20:19 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=620a12371c627e86a4656d9fd2bf8a76bb954dce
commit 620a12371c627e86a4656d9fd2bf8a76bb954dce
Author: Tim Hostetler <thostet@google.com>
AuthorDate: 2026-11-04 23:25:00 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-11-26 14:20:03 +0000
gve: Page-align DQO descriptor and completion rings
Currently, gve_rx_alloc_ring_dqo() and gve_tx_alloc_ring_dqo() request
CACHE_LINE_SIZE alignment when allocating DMA memory for the DQO TX/RX
descriptor and completion rings. The device requires stronger alignment
than cache line alignment, which was incidentally being met due to how
the kernel allocates memory. Explicitly meet this requirement by
requesting page aligned memory.
Signed-off-by: Tim Hostetler <thostet@google.com>
Reviewed by: markj, Jasper Tran O'Leary <jtranoleary@google.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61211
(cherry picked from commit 9d48e88e023634e12530bf9db4a2e85d022b93db)
---
sys/dev/gve/gve_rx_dqo.c | 4 ++--
sys/dev/gve/gve_tx_dqo.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/dev/gve/gve_rx_dqo.c b/sys/dev/gve/gve_rx_dqo.c
index cf914913da09..0d1c0eb149db 100644
--- a/sys/dev/gve/gve_rx_dqo.c
+++ b/sys/dev/gve/gve_rx_dqo.c
@@ -103,7 +103,7 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i)
err = gve_dma_alloc_coherent(priv,
sizeof(struct gve_rx_desc_dqo) * priv->rx_desc_cnt,
- CACHE_LINE_SIZE, &rx->desc_ring_mem);
+ PAGE_SIZE, &rx->desc_ring_mem);
if (err != 0) {
device_printf(priv->dev,
"Failed to alloc desc ring for rx ring %d", i);
@@ -114,7 +114,7 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i)
err = gve_dma_alloc_coherent(priv,
sizeof(struct gve_rx_compl_desc_dqo) * priv->rx_desc_cnt,
- CACHE_LINE_SIZE, &rx->dqo.compl_ring_mem);
+ PAGE_SIZE, &rx->dqo.compl_ring_mem);
if (err != 0) {
device_printf(priv->dev,
"Failed to alloc compl ring for rx ring %d", i);
diff --git a/sys/dev/gve/gve_tx_dqo.c b/sys/dev/gve/gve_tx_dqo.c
index 551a7e308d19..a4e61e5df782 100644
--- a/sys/dev/gve/gve_tx_dqo.c
+++ b/sys/dev/gve/gve_tx_dqo.c
@@ -173,7 +173,7 @@ gve_tx_alloc_ring_dqo(struct gve_priv *priv, int i)
/* Descriptor ring */
err = gve_dma_alloc_coherent(priv,
sizeof(union gve_tx_desc_dqo) * priv->tx_desc_cnt,
- CACHE_LINE_SIZE, &tx->desc_ring_mem);
+ PAGE_SIZE, &tx->desc_ring_mem);
if (err != 0) {
device_printf(priv->dev,
"Failed to alloc desc ring for tx ring %d", i);
@@ -184,7 +184,7 @@ gve_tx_alloc_ring_dqo(struct gve_priv *priv, int i)
/* Completion ring */
err = gve_dma_alloc_coherent(priv,
sizeof(struct gve_tx_compl_desc_dqo) * priv->tx_desc_cnt,
- CACHE_LINE_SIZE, &tx->dqo.compl_ring_mem);
+ PAGE_SIZE, &tx->dqo.compl_ring_mem);
if (err != 0) {
device_printf(priv->dev,
"Failed to alloc compl ring for tx ring %d", i);