Message ID | 1479479809-10798-3-git-send-email-andrew.boyer@dell.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On 11/18/2016 4:36 PM, Andrew Boyer wrote: > A client might post a read followed by a send. The partner receives > and acknowledges both transactions, posting an RCQ entry for the > send, but something goes wrong with the read ACK. When the client > retries the read, the partner's responder processes the duplicate > read but incorrectly resets the PSN to the value preceding the > original send. When the duplicate send arrives, the responder cannot > tell that it is a duplicate, so the responder generates a duplicate > RCQ entry, confusing the client. > > Signed-off-by: Andrew Boyer <andrew.boyer@dell.com> > --- > drivers/infiniband/sw/rxe/rxe_resp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c > index dd3d88a..cb3fd4c 100644 > --- a/drivers/infiniband/sw/rxe/rxe_resp.c > +++ b/drivers/infiniband/sw/rxe/rxe_resp.c > @@ -742,7 +742,8 @@ static enum resp_states read_reply(struct rxe_qp *qp, > } else { > qp->resp.res = NULL; > qp->resp.opcode = -1; > - qp->resp.psn = res->cur_psn; > + if (psn_compare(res->cur_psn, qp->resp.psn) >= 0) > + qp->resp.psn = res->cur_psn; > state = RESPST_CLEANUP; > } > > Reviewed-by: Yonatan Cohen <yonatanc@mallenox.com> Nice catch. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index dd3d88a..cb3fd4c 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -742,7 +742,8 @@ static enum resp_states read_reply(struct rxe_qp *qp, } else { qp->resp.res = NULL; qp->resp.opcode = -1; - qp->resp.psn = res->cur_psn; + if (psn_compare(res->cur_psn, qp->resp.psn) >= 0) + qp->resp.psn = res->cur_psn; state = RESPST_CLEANUP; }
A client might post a read followed by a send. The partner receives and acknowledges both transactions, posting an RCQ entry for the send, but something goes wrong with the read ACK. When the client retries the read, the partner's responder processes the duplicate read but incorrectly resets the PSN to the value preceding the original send. When the duplicate send arrives, the responder cannot tell that it is a duplicate, so the responder generates a duplicate RCQ entry, confusing the client. Signed-off-by: Andrew Boyer <andrew.boyer@dell.com> --- drivers/infiniband/sw/rxe/rxe_resp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)