]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/rxe: For invalidate compare according to set keys in mr
authorMd Haris Iqbal <haris.phnx@gmail.com>
Thu, 7 Jul 2022 07:30:06 +0000 (09:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:57 +0000 (14:23 +0200)
commit284fb6b796afb4d2bc68b66b84f8fa7cfdaab159
treec8ff0329355d76aae122c53c2e1866758bf3e75f
parentfaf219a664ba3cda4c28de7bde08f635bbd5569b
RDMA/rxe: For invalidate compare according to set keys in mr

[ Upstream commit b19a91d7697bf0266fba211aa3ec36f5c33927f3 ]

The 'rkey' input can be an lkey or rkey, and in rxe the lkey or rkey have
the same value, including the variant bits.

So, if mr->rkey is set, compare the invalidate key with it, otherwise
compare with the mr->lkey.

Since we already did a lookup on the non-varient bits to get this far, the
check's only purpose is to confirm that the wqe has the correct variant
bits.

Fixes: a6815f7b3d97 ("RDMA/rxe: Separate HW and SW l/rkeys")
Link: https://lore.kernel.org/r/20220707073006.328737-1-haris.phnx@gmail.com
Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com>
Reviewed-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_mr.c