[SRU][P][PATCH 1/1] gve: unlink old napi only if page pool exists

Tim Whisonant tim.whisonant at canonical.com
Tue Apr 8 00:13:37 UTC 2025


From: Harshitha Ramamurthy <hramamurthy at google.com>

BugLink: https://bugs.launchpad.net/bugs/2106281

Commit de70981f295e ("gve: unlink old napi when stopping a queue using
queue API") unlinks the old napi when stopping a queue. But this breaks
QPL mode of the driver which does not use page pool. Fix this by checking
that there's a page pool associated with the ring.

Cc: stable at vger.kernel.org
Fixes: de70981f295e ("gve: unlink old napi when stopping a queue using queue API")
Reviewed-by: Joshua Washington <joshwash at google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy at google.com>
Reviewed-by: Simon Horman <horms at kernel.org>
Link: https://patch.msgid.link/20250317214141.286854-1-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
(cherry picked from commit 81273eb87af86d4a43244b553762348e364b2df7)
Signed-off-by: Tim Whisonant <tim.whisonant at canonical.com>
---
 drivers/net/ethernet/google/gve/gve_rx_dqo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
index f0674a4435670..b5be2c18858a0 100644
--- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
@@ -114,7 +114,8 @@ void gve_rx_stop_ring_dqo(struct gve_priv *priv, int idx)
 	if (!gve_rx_was_added_to_block(priv, idx))
 		return;
 
-	page_pool_disable_direct_recycling(rx->dqo.page_pool);
+	if (rx->dqo.page_pool)
+		page_pool_disable_direct_recycling(rx->dqo.page_pool);
 	gve_remove_napi(priv, ntfy_idx);
 	gve_rx_remove_from_block(priv, idx);
 	gve_rx_reset_ring_dqo(priv, idx);
-- 
2.43.0




More information about the kernel-team mailing list