Re: [RESEND PATCH v5 1/2] RDMA/rxe: Support RDMA Atomic Write operation

Yang, Xiao/杨 晓
2022-09-29T05:37:02Z

On 2022/9/29 11:58, Yang, Xiao/杨 晓 wrote:
> On 2022/9/27 21:17, Jason Gunthorpe wrote:
>> On Tue, Sep 27, 2022 at 04:18:52PM +0800, Li Zhijian wrote:
>>> Hi Yang
>>>
>>> I wonder if you need to do something if a user register MR with
>>> ATOMIC_WRITE to non-rxe device, something like in my flush:
>>
>> This makes sense..
>
> Hi Zhijian, Jason
>
> Agreed. I will add the check in ib_check_mr_access().

Hi Zhijian, Jason,

Sorry for the rough reply.

After reading the IBTA Spec A19.4.5.3 again, it seems not suitable for
Atomic Write to do the similar check in ib_check_mr_access().

Atomic Write uses the original IB_ACCESS_REMOTE_WRITE flag during memory
registration. (In other words, it doesn't introduce a new
IB_ACCESS_REMOTE_ATOMIC_WRITE flag)

In this case, we should not return -EINVAL when IB_ACCESS_REMOTE_WRITE
is specified and ib_dev->attrs.device_cap_flags doesn't support
IB_DEVICE_ATOMIC_WRITE.

Best Regards,
Xiao Yang

>
> Best Regards,
> Xiao Yang
>>
>> Jason