eth: bnxt: use page pool for head frags
authorJakub Kicinski <kuba@kernel.org>
Sat, 9 Nov 2024 03:51:19 +0000 (19:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Nov 2024 02:26:38 +0000 (18:26 -0800)
commit7ed816be35abc3d5bed39d3edc5f2efed2ca5216
tree6bc238310ebb10e8b70607a082c0a7ae2b27cb16
parent078e0d596f7b5952dad8662ace8f20ed2165e2ce
eth: bnxt: use page pool for head frags

Testing small size RPCs (300B-400B) on a large AMD system suggests
that page pool recycling is very useful even for just the head frags.
With this patch (and copy break disabled) I see a 30% performance
improvement (82Gbps -> 106Gbps).

Convert bnxt from normal page frags to page pool frags for head buffers.

On systems with small page size we can use the same pool as for TPA
pages. On systems with large pages the frag allocation logic of the
page pool is already used to split a large page into TPA chunks.
TPA chunks are much larger than heads (8k or 64k, AFAICT vs 1kB)
and we always allocate the same sized chunks. Mixing allocation
of TPA and head pages would lead to sub-optimal memory use.
Plus Taehee's work on zero-copy / devmem will need to differentiate
between TPA and non-TPA page pool, anyway. Conditionally allocate
a new page pool for heads.

Link: https://patch.msgid.link/20241109035119.3391864-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h