]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
eth: bnxt: adjust the fill level of agg queues with larger buffers
authorJakub Kicinski <kuba@kernel.org>
Mon, 21 Apr 2025 22:28:21 +0000 (15:28 -0700)
committerPavel Begunkov <asml.silence@gmail.com>
Wed, 14 Jan 2026 02:13:37 +0000 (02:13 +0000)
commitc55bf90a2112d7a831d8427034b71ff9fbb78285
treee98474cf1eeee92f8305d8db52cf1f34a420b498
parentf57efb32aae1da5c0a25acf473ef4ab559894adf
eth: bnxt: adjust the fill level of agg queues with larger buffers

The driver tries to provision more agg buffers than header buffers
since multiple agg segments can reuse the same header. The calculation
/ heuristic tries to provide enough pages for 65k of data for each header
(or 4 frags per header if the result is too big). This calculation is
currently global to the adapter. If we increase the buffer sizes 8x
we don't want 8x the amount of memory sitting on the rings.
Luckily we don't have to fill the rings completely, adjust
the fill level dynamically in case particular queue has buffers
larger than the global size.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[pavel: rebase on top of agg_size_fac]
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c