]> www.infradead.org Git - users/jedix/linux-maple.git/commit
page_pool: export page_pool_disable_direct_recycling()
authorDavid Wei <dw@davidwei.uk>
Thu, 27 Jun 2024 03:01:59 +0000 (20:01 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 2 Jul 2024 13:00:11 +0000 (15:00 +0200)
commitd7f39aee79f04eeaa42085728423501b33ac5be5
tree7926a7f07708adb12c5b7f2965ff094ddf108949
parente2dd0d0593c17f32c7263e9d6f7554ecaabb0baf
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>
include/net/page_pool/types.h
net/core/page_pool.c