]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/mlx5e: SHAMPO, Fix page_index calculation inconsistency
authorDragos Tatulea <dtatulea@nvidia.com>
Thu, 7 Nov 2024 19:43:54 +0000 (21:43 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Nov 2024 03:28:18 +0000 (19:28 -0800)
commit1a4b5885770401b7e8de6546760686dcd2d9b784
tree31439eb5a6d2725e236f8a56814bc64efac4da25
parent8a0ee54027b1fbccda3f2683dafec9b7216993a4
net/mlx5e: SHAMPO, Fix page_index calculation inconsistency

When calculating the index for the next frag page slot, the divisor is
incorrect: it should be the number of pages per queue not the number of
headers per queue. This is currently harmless because frag pages are not
used directly, but they are intermediated through the info array. But it
needs to be fixed as an upcoming patch will get rid of the info array.

This patch introduces a new pages per queue variable and plugs it in the
formula.

Now that this variable exists, additional code can be simplified in the
SHAMPO initialization code.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241107194357.683732-10-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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