]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
SDP bug646 - Do not send DisConn if there is only 1 credit
authorJim Mott <jim@mellanox.com>
Tue, 23 Oct 2007 17:51:30 +0000 (10:51 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:09 +0000 (05:04 -0700)
Compliance with CA4-82:
  If one credit is available, an implementation shall only send SDP
messages that provide additional credits and also do not contain ULP
payload.

Signed-off-by: Jim Mott <jim@mellanox.com>
drivers/infiniband/ulp/sdp/sdp_bcopy.c

index e8e4673bffab84703ae257fe058b2c742511a638..41ae38e0da8ce8f3634b4a76a3475b2b36288cdf 100644 (file)
@@ -492,7 +492,7 @@ void sdp_post_sends(struct sdp_sock *ssk, int nonagle)
        if (unlikely((1 << ssk->isk.sk.sk_state) &
                        (TCPF_FIN_WAIT1 | TCPF_LAST_ACK)) &&
                !ssk->isk.sk.sk_send_head &&
-               ssk->bufs) {
+               ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
                skb = sk_stream_alloc_skb(&ssk->isk.sk,
                                          sizeof(struct sdp_bsdh),
                                          GFP_KERNEL);