]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gve: unlink old napi when stopping a queue using queue API
authorHarshitha Ramamurthy <hramamurthy@google.com>
Wed, 26 Feb 2025 00:35:26 +0000 (00:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Feb 2025 02:10:28 +0000 (18:10 -0800)
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>
Link: https://patch.msgid.link/20250226003526.1546854-1-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve_rx_dqo.c

index 8ac0047f1ada11fc6ae451a9b03b418999b6a924..f0674a4435670851feb64e5f3e407ccc87dd3be1 100644 (file)
@@ -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);