From: Amir Vadai Date: Sun, 20 Mar 2011 13:34:33 +0000 (+0200) Subject: sdp: Bad behaviour when setting low rcvbuf size X-Git-Tag: v4.1.12-92~264^2~5^2~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=63ffd4dbd4276205504510545f7954294dbe94a8;p=users%2Fjedix%2Flinux-maple.git sdp: Bad behaviour when setting low rcvbuf size Signed-off-by: Amir Vadai --- diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index 2bb01b2e1c7d..d9d8ca8a717f 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -2301,15 +2301,17 @@ sdp_mid_data: if (poll_recv_cq(sk)) { sdp_dbg_data(sk, "sk_wait_data %ld\n", timeo); - if (remote_credits(ssk) <= SDP_MIN_TX_CREDITS) { + if (remote_credits(ssk) < SDP_MIN_TX_CREDITS) { /* Remote host can not send, so there is no * point of waiting for data. * This situation is possible if current host * can not send credits-update due to lack of * memory. */ - if (!copied) + if (!copied) { copied = -ENOMEM; + sdp_warn(sk, "out of credits\n"); + } break; }