From: Amir Vadai Date: Tue, 7 Dec 2010 07:32:50 +0000 (+0200) Subject: sdp: handle failed RDMA read X-Git-Tag: v4.1.12-92~264^2~5^2~59 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6a0fd07ce5da92b3ae13a75f7ece2cd54ce83749;p=users%2Fjedix%2Flinux-maple.git sdp: handle failed RDMA read When RDMA read is failed, do not report those bytes as read, and return error code to user. Signed-off-by: Amir Vadai --- diff --git a/drivers/infiniband/ulp/sdp/sdp_tx.c b/drivers/infiniband/ulp/sdp/sdp_tx.c index 08437398857e4..3e17b96f82ff8 100644 --- a/drivers/infiniband/ulp/sdp/sdp_tx.c +++ b/drivers/infiniband/ulp/sdp/sdp_tx.c @@ -248,7 +248,7 @@ static inline void sdp_process_tx_wc(struct sdp_sock *ssk, struct ib_wc *wc) if (likely(!wc->status) || wc->status == IB_WC_WR_FLUSH_ERR) return; - sdp_dbg_data(sk, "Send completion with error. wr_id 0x%llx Status %d\n", + sdp_warn(sk, "Send completion with error. wr_id 0x%llx Status %d\n", wc->wr_id, wc->status); sdp_set_error(sk, -ECONNRESET); diff --git a/drivers/infiniband/ulp/sdp/sdp_zcopy.c b/drivers/infiniband/ulp/sdp/sdp_zcopy.c index bf2adef4646f9..df8607d8cd6c9 100644 --- a/drivers/infiniband/ulp/sdp/sdp_zcopy.c +++ b/drivers/infiniband/ulp/sdp/sdp_zcopy.c @@ -238,6 +238,8 @@ static int sdp_wait_rdma_wr_finished(struct sdp_sock *ssk) if (!ssk->tx_ring.rdma_inflight->busy) { sdp_dbg_data(sk, "got rdma cqe\n"); + if (sk->sk_err == ECONNRESET) + rc = -EPIPE; break; }