RDMA/rxe: Add a type flag to rxe_queue structs
authorBob Pearson <rpearsonhpe@gmail.com>
Thu, 27 May 2021 19:47:46 +0000 (14:47 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 3 Jun 2021 18:53:01 +0000 (15:53 -0300)
commit59daff49f25fbb3197c03c879e23a31ddd23d98f
tree280429a279bac368f0982e47b01c33da32f9bb7c
parent50971e39154de296185b81a61eca25b3e2f55f3e
RDMA/rxe: Add a type flag to rxe_queue structs

To create optimal code only want to use smp_load_acquire() and
smp_store_release() for user indices in rxe_queue APIs since kernel
indices are protected by locks which also act as memory barriers. By
adding a type to the queues we can determine which indices need to be
protected.

Link: https://lore.kernel.org/r/20210527194748.662636-2-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_cq.c
drivers/infiniband/sw/rxe/rxe_qp.c
drivers/infiniband/sw/rxe/rxe_queue.c
drivers/infiniband/sw/rxe/rxe_queue.h
drivers/infiniband/sw/rxe/rxe_srq.c