Commit 4f552e3b9a21df7d04850dcd58da505eec197b00
1 parent
773f2cdd
do not delay TCP acks (Ed Swierk)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1882 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
21 deletions
slirp/tcp_input.c
| ... | ... | @@ -580,28 +580,11 @@ findso: |
| 580 | 580 | * congestion avoidance sender won't send more until |
| 581 | 581 | * he gets an ACK. |
| 582 | 582 | * |
| 583 | - * Here are 3 interpretations of what should happen. | |
| 584 | - * The best (for me) is to delay-ack everything except | |
| 585 | - * if it's a one-byte packet containing an ESC | |
| 586 | - * (this means it's an arrow key (or similar) sent using | |
| 587 | - * Nagel, hence there will be no echo) | |
| 588 | - * The first of these is the original, the second is the | |
| 589 | - * middle ground between the other 2 | |
| 583 | + * It is better to not delay acks at all to maximize | |
| 584 | + * TCP throughput. See RFC 2581. | |
| 590 | 585 | */ |
| 591 | -/* if (((unsigned)ti->ti_len < tp->t_maxseg)) { | |
| 592 | - */ | |
| 593 | -/* if (((unsigned)ti->ti_len < tp->t_maxseg && | |
| 594 | - * (so->so_iptos & IPTOS_LOWDELAY) == 0) || | |
| 595 | - * ((so->so_iptos & IPTOS_LOWDELAY) && | |
| 596 | - * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { | |
| 597 | - */ | |
| 598 | - if ((unsigned)ti->ti_len == 1 && | |
| 599 | - ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { | |
| 600 | - tp->t_flags |= TF_ACKNOW; | |
| 601 | - tcp_output(tp); | |
| 602 | - } else { | |
| 603 | - tp->t_flags |= TF_DELACK; | |
| 604 | - } | |
| 586 | + tp->t_flags |= TF_ACKNOW; | |
| 587 | + tcp_output(tp); | |
| 605 | 588 | return; |
| 606 | 589 | } |
| 607 | 590 | } /* header prediction */ | ... | ... |