]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
RDMA/rxe: Cleanup page variables in rxe_mr.c
authorBob Pearson <rpearsonhpe@gmail.com>
Thu, 19 Jan 2023 23:59:36 +0000 (17:59 -0600)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:46:59 +0000 (16:46 +0100)
commit18b50bee903951566a01b45c82a7ac98514dd40e
tree3ef75352cdecb8fad162d5cb51e6053f18bdc82c
parente313f42b3b7977bb4c1a7a4b8eb90b3c55c60167
RDMA/rxe: Cleanup page variables in rxe_mr.c

BugLink: https://bugs.launchpad.net/bugs/2011425
[ Upstream commit 325a7eb85199ec9c5b5a7af812f43ea16b735569 ]

Cleanup usage of mr->page_shift and mr->page_mask and introduce
an extractor for mr->ibmr.page_size. Normal usage in the kernel
has page_mask masking out offset in page rather than masking out
the page number. The rxe driver had reversed that which was confusing.
Implicitly there can be a per mr page_size which was not uniformly
supported.

Link: https://lore.kernel.org/r/20230119235936.19728-6-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Stable-dep-of: 5ff31dfcd6d2 ("Subject: RDMA/rxe: Handle zero length rdma")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_verbs.h