]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5e: RX, Make page frag bias more robust
authorDragos Tatulea <dtatulea@nvidia.com>
Mon, 23 Feb 2026 20:41:51 +0000 (22:41 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 26 Feb 2026 09:54:23 +0000 (10:54 +0100)
commit8611660778bf5db9f5f063c9bd58d41012801cb8
treec218f089b570a6609cad10ebee348390678e2fbb
parent0285cc3dac1b4ceb3dacdfce43627d41d649cf47
net/mlx5e: RX, Make page frag bias more robust

The formula uses the system page size but does not account
for high order pages.

One way to fix this would be to adapt the formula to take
into account the pool order. This would require calculating it
for every allocation or adding an additional rq struct member to
hold the bias max.

However, the above is not really needed as the driver doesn't
check the bias value. It has other means to calculate the expected
number of fragments based on context.

This patch simply sets the value to the max possible value. A sanity
check is added during queue init phase to avoid having really big pages
from using more fragments than the type can fit.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260223204155.1783580-12-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c