]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
SDP - Bug837: executing netperf with TCP_CORK enabled never ends
authorJim Mott <jim@mellanox.com>
Fri, 4 Jan 2008 20:36:50 +0000 (12:36 -0800)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:14 +0000 (05:04 -0700)
Signed-off-by: Jim Mott <jim@mellanox.com>
drivers/infiniband/ulp/sdp/sdp_main.c

index 2263faf77271c8fa33eaa0b54021e03dfd5e660d..9496a9279bc3d7963fce78e58fa991fe631adc0e 100644 (file)
@@ -899,6 +899,15 @@ static void sdp_shutdown(struct sock *sk, int how)
        else
                return;
 
+       /*
+        * Just turn off CORK here.
+        *   We could check for socket shutting down in main data path,
+        * but this costs no extra cycles there.
+        */
+       ssk->nonagle &= ~TCP_NAGLE_CORK;
+       if (ssk->nonagle & TCP_NAGLE_OFF)
+               ssk->nonagle |= TCP_NAGLE_PUSH;
+
        sdp_post_sends(ssk, 0);
 }