bnxt: fill data page pool with frags if PAGE_SIZE > BNXT_RX_PAGE_SIZE
authorDavid Wei <dw@davidwei.uk>
Tue, 12 Aug 2025 18:29:07 +0000 (11:29 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 Aug 2025 00:27:23 +0000 (17:27 -0700)
commit39f8fcda2088382a4aa70b258d6f7225aa386f11
treeaa874985656f4d2be4c4124bcf8d856df782edef
parentb2cafefaf0473bafb0c3502a8530167d35e06113
bnxt: fill data page pool with frags if PAGE_SIZE > BNXT_RX_PAGE_SIZE

The data page pool always fills the HW rx ring with pages. On arm64 with
64K pages, this will waste _at least_ 32K of memory per entry in the rx
ring.

Fix by fragmenting the pages if PAGE_SIZE > BNXT_RX_PAGE_SIZE. This
makes the data page pool the same as the header pool.

Tested with iperf3 with a small (64 entries) rx ring to encourage buffer
circulation.

Fixes: cd1fafe7da1f ("eth: bnxt: add support rx side device memory TCP")
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://patch.msgid.link/20250812182907.1540755-1-dw@davidwei.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c