diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-05-01 11:18:01 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-05-01 11:18:01 +0000 |
commit | 4f552e3b9a21df7d04850dcd58da505eec197b00 (patch) | |
tree | e5a8b2c9480e16cba5b86b3c3581a29d3ebc4509 /slirp | |
parent | set TCP_MSS to 1460 (Ed Swierk) (diff) | |
download | qemu-kvm-4f552e3b9a21df7d04850dcd58da505eec197b00.tar.gz qemu-kvm-4f552e3b9a21df7d04850dcd58da505eec197b00.tar.bz2 qemu-kvm-4f552e3b9a21df7d04850dcd58da505eec197b00.zip |
do not delay TCP acks (Ed Swierk)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1882 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/tcp_input.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c index 8729d76a7..c01516101 100644 --- a/slirp/tcp_input.c +++ b/slirp/tcp_input.c @@ -580,28 +580,11 @@ findso: * congestion avoidance sender won't send more until * he gets an ACK. * - * Here are 3 interpretations of what should happen. - * The best (for me) is to delay-ack everything except - * if it's a one-byte packet containing an ESC - * (this means it's an arrow key (or similar) sent using - * Nagel, hence there will be no echo) - * The first of these is the original, the second is the - * middle ground between the other 2 + * It is better to not delay acks at all to maximize + * TCP throughput. See RFC 2581. */ -/* if (((unsigned)ti->ti_len < tp->t_maxseg)) { - */ -/* if (((unsigned)ti->ti_len < tp->t_maxseg && - * (so->so_iptos & IPTOS_LOWDELAY) == 0) || - * ((so->so_iptos & IPTOS_LOWDELAY) && - * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { - */ - if ((unsigned)ti->ti_len == 1 && - ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { - tp->t_flags |= TF_ACKNOW; - tcp_output(tp); - } else { - tp->t_flags |= TF_DELACK; - } + tp->t_flags |= TF_ACKNOW; + tcp_output(tp); return; } } /* header prediction */ |