From: Jim Mott Date: Fri, 4 Jan 2008 20:36:50 +0000 (-0800) Subject: SDP - Bug837: executing netperf with TCP_CORK enabled never ends X-Git-Tag: v4.1.12-92~264^2~5^2~325 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d6ee994a7aee3b5ebb7b7e1596d50aa2a75173d0;p=users%2Fjedix%2Flinux-maple.git SDP - Bug837: executing netperf with TCP_CORK enabled never ends Signed-off-by: Jim Mott --- diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index 2263faf77271c..9496a9279bc3d 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -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); }