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)
commitecc7ad2eab35f180588a60adc5c2b76262dc8d71
tree0bb83c7b926b62c17c0fa3e407856a25a3ce0ce7
parentfa5573359aae63d36518e2821f968ff2f5eae02e
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