Skip to content

Commit f637040

Browse files
committed
RDMA/mlx5: Follow rb_key.ats when creating new mkeys
When a cache ent already exists but doesn't have any mkeys in it the cache will automatically create a new one based on the specification in the ent->rb_key. ent->ats was missed when creating the new key and so ma_translation_mode was not being set even though the ent requires it. Cc: stable@vger.kernel.org Fixes: 73d09b2 ("RDMA/mlx5: Introduce mlx5r_cache_rb_key") Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Michael Guralnik <michaelgur@nvidia.com> Link: https://lore.kernel.org/r/7c5613458ecb89fbe5606b7aa4c8d990bdea5b9a.1716900410.git.leon@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent c1eb251 commit f637040

File tree

1 file changed

+1
-0
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-0
lines changed

drivers/infiniband/hw/mlx5/mr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ static void set_cache_mkc(struct mlx5_cache_ent *ent, void *mkc)
246246
MLX5_SET(mkc, mkc, access_mode_1_0, ent->rb_key.access_mode & 0x3);
247247
MLX5_SET(mkc, mkc, access_mode_4_2,
248248
(ent->rb_key.access_mode >> 2) & 0x7);
249+
MLX5_SET(mkc, mkc, ma_translation_mode, !!ent->rb_key.ats);
249250

250251
MLX5_SET(mkc, mkc, translations_octword_size,
251252
get_mkc_octo_size(ent->rb_key.access_mode,

0 commit comments

Comments
 (0)