Re: [PATCH rdma-next v1 1/2] RDMA: Enable Relaxed Ordering by default for kernel ULPs

From: Christoph Hellwig
Date: Thu May 27 2021 - 06:28:36 EST


The way this is implemented looks confusing and error prone to me.

I'd like to suggest the following:

1) add a prep patch that entirely untangles IB_ACCESS_* from
IB_UVERBS_ACCESS. Maybe even add a __bitwise type for IB_ACCESS_*
to allow sparse based type checking. Preferably ib_check_mr_access
could be changed into a function that does this translation as it
needs to be called anyway.
2) then just invert IB_ACCESS_RELAXED_ORDERING while keeping
IB_UVERBS_ACCESS_REMOTE_ATOMIC as-is, and enable
IB_ACCESS_STRICT_ORDERING if IB_UVERBS_ACCESS_REMOTE_ATOMIC is not
set in ib_check_mr_access.