net/mlx5e: xsk: Print a warning in slow configurations
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Sun, 2 Oct 2022 04:56:25 +0000 (21:56 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 3 Oct 2022 23:55:28 +0000 (16:55 -0700)
commitc6f0420468fb2e7bbe006ed492608d63a4ac9e28
tree11aaabc9b8a43ffed81f5f621a815fb000876b98
parent139213451046eb6653a058a8922796f29b267b0f
net/mlx5e: xsk: Print a warning in slow configurations

On striding RQ, when the XSK frame size doesn't match the MKey page
size, KLM is used for memory mappings, which is a slower mechanism than
MTT or KSM. It may happen in two cases:

1. Frame size is not a power of two (only possible in the unaligned mode
of XSK).

2. Frame size is 2048 bytes, and the firmware doesn't support MKey pages
smaller than 4096 bytes.

Depending on the case, print a warning and recommend to disable striding
RQ or upgrade the firmware.

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/xsk/pool.c