git: b9dca399ce35 - main - gve: Fix return value in gve_tx_has_desc_room_dqo()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Nov 2026 19:24:57 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=b9dca399ce35a2f50316187f8a6567bb94da53c9
commit b9dca399ce35a2f50316187f8a6567bb94da53c9
Author: Tim Hostetler <thostet@google.com>
AuthorDate: 2026-11-18 14:22:55 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-11-18 19:24:35 +0000
gve: Fix return value in gve_tx_has_desc_room_dqo()
When the cached tx->dqo.desc_head does not show enough available
descriptor ring slots, gve_tx_has_desc_room_dqo() reloads desc_head from
tx->dqo.hw_tx_head and re-checks availability. If the refreshed
desc_head provides sufficient space, the function mistakenly returns 0
(false) instead of true, causing callers to treat a successful
descriptor head refresh as ENOBUFS, stop the TX queue, and retry or
abort packet transmission (including unloading already-mapped DMA
segments) unnecessarily.
Return true when sufficient descriptor space is available after
refreshing desc_head.
In 60s iperf benchmarks between two FreeBSD 14.4 c4-standard-192
instances, this eliminates spurious tx->stopped transitions across all
workloads:
- TCP 1-stream: 54,859 -> 13 (-99.98%)
- TCP 16-stream: 9,623,851 -> 6,324,299 (-34.3%, -3.30M spurious stops)
- UDP 1-stream: 71,626 -> 0 (-100%)
- UDP 16-stream: 608,585 -> 3,622 (-99.4%)
Signed-off-by: Tim Hostetler <thostet@google.com>
Fixes: d438b4ef0cfc ("gve: Add DQO RDA support")
Reviewed by: markj, Jasper Tran O'Leary <jtranoleary@google.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61232
---
sys/dev/gve/gve_tx_dqo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/gve/gve_tx_dqo.c b/sys/dev/gve/gve_tx_dqo.c
index 95490eb1de4c..e2dcedb43bbb 100644
--- a/sys/dev/gve/gve_tx_dqo.c
+++ b/sys/dev/gve/gve_tx_dqo.c
@@ -574,7 +574,7 @@ gve_tx_has_desc_room_dqo(struct gve_tx_ring *tx, int needed_descs)
return (false);
}
- return (0);
+ return (true);
}
static void