Skip to contentSkip to conversation

gve: unlink old napi when stopping a queue using queue API

PATCH Applied Harshitha Ramamurthy 3 participants 3 messages Feb 26, 2025 – Feb 27, 2025

Subsystems (4)
lore
Share & tools
lore

Harshitha Ramamurthy

author maintainer
#0 lore raw

PATCH 1/1 gve: unlink old napi when stopping a queue using queue API

When a queue is stopped using the ndo queue API, before destroying its page pool, the associated NAPI instance needs to be unlinked to avoid warnings.

Handle this by calling page_pool_disable_direct_recycling() when stopping a queue.

Fixes ebdfae0d377b ("gve: adopt page pool for DQ RDA mode")
---
 drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/google/gve/gve_rx_dqo.c +2 -0
index 8ac0047f1ada..f0674a443567 100644
@@ -109,10 +109,12 @@ static void gve_rx_reset_ring_dqo(struct gve_priv *priv, int idx)
 void gve_rx_stop_ring_dqo(struct gve_priv *priv, int idx)
 {
 	int ntfy_idx = gve_rx_idx_to_ntfy(priv, idx);
+	struct gve_rx_ring *rx = &priv->rx[idx];
 
 	if (!gve_rx_was_added_to_block(priv, idx))
 		return;
 
+	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);
Signature · 1 line
2.48.1.658.g4767266eb4-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Harshitha Ramamurthy

When a queue is stopped using the ndo queue API, before destroying its page pool, the associated NAPI instance needs to be unlinked to avoid warnings.

Quoted 8 lines

Handle this by calling page_pool_disable_direct_recycling() when stopping a queue.

Fixes ebdfae0d377b ("gve: adopt page pool for DQ RDA mode")

---

Quoted 20 lines
 drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/google/gve/gve_rx_dqo.c +2 -0
index 8ac0047f1ada..f0674a443567 100644
@@ -109,10 +109,12 @@ static void gve_rx_reset_ring_dqo(struct gve_priv *priv, int idx)
 void gve_rx_stop_ring_dqo(struct gve_priv *priv, int idx)
 {
 	int ntfy_idx = gve_rx_idx_to_ntfy(priv, idx);
+	struct gve_rx_ring *rx = &priv->rx[idx];
 
 	if (!gve_rx_was_added_to_block(priv, idx))
 		return;
 
+	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 lore raw
In reply to Harshitha Ramamurthy
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 26 Feb 2025 00:35:26 +0000 you wrote:

When a queue is stopped using the ndo queue API, before destroying its page pool, the associated NAPI instance needs to be unlinked to avoid warnings.

Handle this by calling page_pool_disable_direct_recycling() when stopping a queue.

[...]

Here is the summary with links:
- [net] gve: unlink old napi when stopping a queue using queue API

    https://git.kernel.org/netdev/net/c/de70981f295e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html