* [PATCH net] gve: unlink old napi when stopping a queue using queue API
@ 2025-02-26 0:35 Harshitha Ramamurthy
2025-02-27 0:44 ` Jacob Keller
2025-02-27 3:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Harshitha Ramamurthy @ 2025-02-26 0:35 UTC (permalink / raw)
To: netdev
Cc: jeroendb, hramamurthy, andrew+netdev, davem, edumazet, kuba,
pabeni, pkaligineedi, shailend, willemb, jacob.e.keller,
linux-kernel, stable
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.
Cc: stable@vger.kernel.org
Fixes: ebdfae0d377b ("gve: adopt page pool for DQ RDA mode")
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
---
drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
index 8ac0047f1ada..f0674a443567 100644
--- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
@@ -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.48.1.658.g4767266eb4-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] gve: unlink old napi when stopping a queue using queue API
2025-02-26 0:35 [PATCH net] gve: unlink old napi when stopping a queue using queue API Harshitha Ramamurthy
@ 2025-02-27 0:44 ` Jacob Keller
2025-02-27 3:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jacob Keller @ 2025-02-27 0:44 UTC (permalink / raw)
To: Harshitha Ramamurthy, netdev
Cc: jeroendb, andrew+netdev, davem, edumazet, kuba, pabeni,
pkaligineedi, shailend, willemb, linux-kernel, stable
On 2/25/2025 4:35 PM, Harshitha Ramamurthy 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.
>
> Cc: stable@vger.kernel.org
> Fixes: ebdfae0d377b ("gve: adopt page pool for DQ RDA mode")
> Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
> Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> index 8ac0047f1ada..f0674a443567 100644
> --- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> +++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> @@ -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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] gve: unlink old napi when stopping a queue using queue API
2025-02-26 0:35 [PATCH net] gve: unlink old napi when stopping a queue using queue API Harshitha Ramamurthy
2025-02-27 0:44 ` Jacob Keller
@ 2025-02-27 3:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-27 3:00 UTC (permalink / raw)
To: Harshitha Ramamurthy
Cc: netdev, jeroendb, andrew+netdev, davem, edumazet, kuba, pabeni,
pkaligineedi, shailend, willemb, jacob.e.keller, linux-kernel,
stable
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-27 2:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-26 0:35 [PATCH net] gve: unlink old napi when stopping a queue using queue API Harshitha Ramamurthy
2025-02-27 0:44 ` Jacob Keller
2025-02-27 3:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox