]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: handle failed RDMA read
authorAmir Vadai <amirv@mellanox.co.il>
Tue, 7 Dec 2010 07:32:50 +0000 (09:32 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:35 +0000 (05:05 -0700)
When RDMA read is failed, do not report those bytes as read, and
return error code to user.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_tx.c
drivers/infiniband/ulp/sdp/sdp_zcopy.c

index 08437398857e45fdcde2396e1567b0950df276d9..3e17b96f82ff87ba6568f409880764b65f7a38d8 100644 (file)
@@ -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);
index bf2adef4646f97e816e64c566085f128342180a5..df8607d8cd6c99141c58cd5b0805f2846a65ce01 100644 (file)
@@ -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;
                }