Quellcode durchsuchen

[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>
tags/v0.9.7
Michael Brown vor 16 Jahren
Ursprung
Commit
cf53998901
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      src/net/tcp.c

+ 1
- 1
src/net/tcp.c Datei anzeigen

@@ -478,7 +478,7 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
478 478
 	tcphdr->seq = htonl ( tcp->snd_seq );
479 479
 	tcphdr->ack = htonl ( tcp->rcv_ack );
480 480
 	tcphdr->hlen = ( ( payload - iobuf->data ) << 2 );
481
-	tcphdr->flags = flags;
481
+	tcphdr->flags = ( flags | TCP_PSH );
482 482
 	tcphdr->win = htons ( tcp->rcv_win );
483 483
 	tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );
484 484
 

Laden…
Abbrechen
Speichern