Re: [PATCH 1/2] RDMA/rxe: copy send WQE to kernel buffer before processing

Tristan Madani <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.stable
Message-ID <[email protected]>
Hi Yanjun,

Thank you for the review.

Regarding concern 2: unless I am mistaken, rxe_sender() calls
rxe_requester() then rxe_completer() sequentially in the same
work item (rxe_req.c:836), and do_task() prevents re-entry, so
the requester and completer should not run concurrently on the
same QP. But please correct me if there is a scheduling path
I missed.

Either way, using WRITE_ONCE() for the state and status fields
instead of a bulk memcpy() is cleaner and eliminates any concern
about tearing from concurrent userspace writes (concern 1). I
will send v2 with targeted WRITE_ONCE() writebacks for just the
fields that need to be visible, dropping the bulk memcpy.

Best regards,
Tristan Madani
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.