net/mlx5e: Use runtime page_shift for striding RQ
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Thu, 29 Sep 2022 07:21:42 +0000 (00:21 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Sep 2022 14:55:45 +0000 (07:55 -0700)
commite5a3cc83d54019a90119ce0cf17b5e21729b79bf
tree0b19b6f34dcdd767163ebdd5496d77c844bc3de5
parent9ca66afe73da16cd2c529e6770cc5aea0c4454df
net/mlx5e: Use runtime page_shift for striding RQ

This commit allows striding RQ to determine MTT page size at runtime,
instead of sticking to the compile-time PAGE_SIZE. This functionality
will be used by a following commit that adjusts the MTT page size to the
XSK frame size.

Stick with PAGE_SIZE for XSK on legacy RQ, as frag_stride is not used in
data path, it only helps calculate how pages are partitioned into
fragments, and PAGE_SIZE will ensure each fragment starts at the
beginning of a new allocation unit (XSK frame).

Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@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/params.c
drivers/net/ethernet/mellanox/mlx5/core/en/params.h
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
include/linux/mlx5/qp.h