From: Michael Brown Date: Wed, 21 Jan 2009 04:22:34 +0000 (+0000) Subject: [tcp] Always set PUSH flag on TCP transmissions X-Git-Tag: v0.9.7~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf539989010741c4e0fb796fc796829b21265193;p=thirdparty%2Fipxe.git [tcp] Always set PUSH flag on TCP transmissions Apparently this can cause a major speedup on some iSCSI targets, which will otherwise wait for a timer to expire before responding. It doesn't seem to hurt other simple TCP test cases (e.g. HTTP downloads). Problem and solution identified by Shiva Shankar <802.11e@gmail.com> --- diff --git a/src/net/tcp.c b/src/net/tcp.c index 0f91bcf9d..094317b3a 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -478,7 +478,7 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) { tcphdr->seq = htonl ( tcp->snd_seq ); tcphdr->ack = htonl ( tcp->rcv_ack ); tcphdr->hlen = ( ( payload - iobuf->data ) << 2 ); - tcphdr->flags = flags; + tcphdr->flags = ( flags | TCP_PSH ); tcphdr->win = htons ( tcp->rcv_win ); tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );