]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Keep a separate MKey for striding RQ
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Thu, 29 Sep 2022 07:21:44 +0000 (00:21 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Sep 2022 14:55:45 +0000 (07:55 -0700)
commite07fb44727553562c85aaafa4a34dcaa9c49c34c
tree0bb83c7b926b62c17c0fa3e407856a25a3ce0ce7
parentfc02d9424cb970a9b4ac8fe415c5b3e20479551f
net/mlx5e: Keep a separate MKey for striding RQ

Currently, rq->mkey_be keeps a big-endian value of either the PA MKey
(for legacy RQ, no address translation) or MTT MKey (for striding RQ,
direct address translation). Striding RQ stores the same value in
rq->umr_mkey in the native endianness.

The next commit will make striding RQ use KSM MKey (indirect address
translation) for the unaligned mode of XSK, which will require storing
both KSM MKey and PA MKey in the RQ struct. This commit optimizes fields
of mlx5e_rq: umr_mkey is removed (it's redundant), mkey_be always points
to the PA MKey, and mpwqe.umr_mkey_be points to the MTT MKey (or to the
KSM MKey, starting from the next commit).

Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@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_main.c