]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
eth: fbnic: defer page pool recycling activation to queue start
authorJakub Kicinski <kuba@kernel.org>
Mon, 1 Sep 2025 21:12:12 +0000 (14:12 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 4 Sep 2025 08:19:17 +0000 (10:19 +0200)
We need to be more careful about when direct page pool recycling
is enabled in preparation for queue ops support. Don't set the
NAPI pointer, call page_pool_enable_direct_recycling() from
the function that activates the queue (once the config can
no longer fail).

Reviewed-by: Mina Almasry <almasrymina@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250901211214.1027927-13-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c

index 2727cc037663db7f06ad8fb199818414f3677fa0..f5b83b6e1cc36ac3b9fe9afd9faa24b7f302a92b 100644 (file)
@@ -1528,7 +1528,6 @@ fbnic_alloc_qt_page_pools(struct fbnic_net *fbn, struct fbnic_napi_vector *nv,
                .dma_dir = DMA_BIDIRECTIONAL,
                .offset = 0,
                .max_len = PAGE_SIZE,
-               .napi   = &nv->napi,
                .netdev = fbn->netdev,
                .queue_idx = rxq_idx,
        };
@@ -2615,6 +2614,11 @@ static void __fbnic_nv_enable(struct fbnic_napi_vector *nv)
        for (j = 0; j < nv->rxt_count; j++, t++) {
                struct fbnic_q_triad *qt = &nv->qt[t];
 
+               page_pool_enable_direct_recycling(qt->sub0.page_pool,
+                                                 &nv->napi);
+               page_pool_enable_direct_recycling(qt->sub1.page_pool,
+                                                 &nv->napi);
+
                fbnic_enable_bdq(&qt->sub0, &qt->sub1);
                fbnic_config_drop_mode_rcq(nv, &qt->cmpl);
                fbnic_enable_rcq(nv, &qt->cmpl);