]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx5e: SHAMPO, Drop info array
authorDragos Tatulea <dtatulea@nvidia.com>
Thu, 7 Nov 2024 19:43:56 +0000 (21:43 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Nov 2024 03:28:18 +0000 (19:28 -0800)
commit945ca432bfd0788b960f8f721594dae4fc3c02c1
tree3f7141f06d67f5efaca02fc97ea8972f2deb1a39
parent4f56868b7132bb3c7e5a2c1930b6402718248a35
net/mlx5e: SHAMPO, Drop info array

The info array is used to store a pointer to the
dma address of the header and to the frag page. However,
this array is not really required:
- The frag page can be calculated from the header index
  frag page index = header index / headers per page.
- The dma address can be calculated through a formula:
  dma page address + header offset.

This series gets rid of the info array and uses the above
formulas instead.

The current_page_index was used in conjunction with the info array to
store page fragment indices. This variable is dropped as well.

There was no performance regression observed.

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