diff options
author | David Wei <dw@davidwei.uk> | 2024-06-27 06:01:59 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-07-02 16:00:11 +0300 |
commit | d7f39aee79f04eeaa42085728423501b33ac5be5 (patch) | |
tree | 7926a7f07708adb12c5b7f2965ff094ddf108949 /include/net/page_pool | |
parent | e2dd0d0593c17f32c7263e9d6f7554ecaabb0baf (diff) | |
download | linux-d7f39aee79f04eeaa42085728423501b33ac5be5.tar.xz |
page_pool: export page_pool_disable_direct_recycling()
56ef27e3 unexported page_pool_unlink_napi() and renamed it to
page_pool_disable_direct_recycling(). This is because there was no
in-tree user of page_pool_unlink_napi().
Since then Rx queue API and an implementation in bnxt got merged. In the
bnxt implementation, it broadly follows the following steps: allocate
new queue memory + page pool, stop old rx queue, swap, then destroy old
queue memory + page pool.
The existing NAPI instance is re-used so when the old page pool that is
no longer used but still linked to this shared NAPI instance is
destroyed, it will trigger warnings.
In my initial patches I unlinked a page pool from a NAPI instance
directly. Instead, export page_pool_disable_direct_recycling() and call
that instead to avoid having a driver touch a core struct.
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David Wei <dw@davidwei.uk>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net/page_pool')
-rw-r--r-- | include/net/page_pool/types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h index 7e8477057f3d..9093a964fc33 100644 --- a/include/net/page_pool/types.h +++ b/include/net/page_pool/types.h @@ -229,6 +229,7 @@ struct page_pool *page_pool_create_percpu(const struct page_pool_params *params, struct xdp_mem_info; #ifdef CONFIG_PAGE_POOL +void page_pool_disable_direct_recycling(struct page_pool *pool); void page_pool_destroy(struct page_pool *pool); void page_pool_use_xdp_mem(struct page_pool *pool, void (*disconnect)(void *), const struct xdp_mem_info *mem); |