]> asedeno.scripts.mit.edu Git - linux.git/commit
IB/rxe: fixes for rdma read retry
authorVijay Immanuel <vijayi@attalasystems.com>
Thu, 14 Jun 2018 01:48:07 +0000 (18:48 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 30 Aug 2018 21:27:15 +0000 (17:27 -0400)
commit030e46e495af855a13964a0aab9753ea82a96edc
treec9988a792080a61b69d4b391378d6f25e6690a7b
parent4e4c53df567714b3d08b2b5d8ccb1d175fc9be01
IB/rxe: fixes for rdma read retry

When a read request is retried for the remaining partial
data, the response may restart from read response first
or read response only. So support those cases.

Do not advance the comp psn beyond the current wqe's last_psn
as that could skip over an entire read wqe and will cause the
req_retry() logic to set an incorrect req psn.
An example sequence is as follows:
Write        PSN 40 -- this is the current WQE.
Read request PSN 41
Write        PSN 42
Receive ACK  PSN 42 -- this will complete the current WQE
for PSN 40, and set the comp psn to 42 which is a problem
because the read request at PSN 41 has been skipped over.
So when req_retry() tries to retransmit the read request,
it sets the req psn to 42 which is incorrect.

When retrying a read request, calculate the number of psns
completed based on the dma resid instead of the wqe first_psn.
The wqe first_psn could have moved if the read request was
retried multiple times.

Set the reth length to the dma resid to handle read retries for
the remaining partial data.

Signed-off-by: Vijay Immanuel <vijayi@attalasystems.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_comp.c
drivers/infiniband/sw/rxe/rxe_req.c