diff options
author | dg <dg@FreeBSD.org> | 1995-03-27 07:12:24 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-03-27 07:12:24 +0000 |
commit | b8b34df69c1cffc2d2ff84bc3310dfe0244e395b (patch) | |
tree | bf15ffb78a5f2e459694d61c33f08d0f047bf835 /sys/netinet/tcp_input.c | |
parent | f42021043a8bacb4267627bb7f2796b7cc2fb847 (diff) | |
download | FreeBSD-src-b8b34df69c1cffc2d2ff84bc3310dfe0244e395b.zip FreeBSD-src-b8b34df69c1cffc2d2ff84bc3310dfe0244e395b.tar.gz |
Re-apply my "breakage" to the Nagel congestion avoidence. This version
differs slightly in the logic from the previous version; packets are now
acked immediately if the sender set PUSH.
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index bc34836..c35f038 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)tcp_input.c 8.5 (Berkeley) 4/10/94 - * $Id: tcp_input.c,v 1.15 1995/02/16 01:39:19 wollman Exp $ + * $Id: tcp_input.c,v 1.16 1995/03/16 18:15:04 bde Exp $ */ #ifndef TUBA_INCLUDE @@ -522,7 +522,17 @@ findpcb: m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); sbappend(&so->so_rcv, m); sorwakeup(so); - tp->t_flags |= TF_DELACK; + /* + * If this is a short packet, then ACK now - with Nagel + * congestion avoidance sender won't send more until + * he gets an ACK. + */ + if (ti->ti_flags & TH_PUSH) { + tp->t_flags |= TF_ACKNOW; + tcp_output(tp); + } else { + tp->t_flags |= TF_DELACK; + } return; } } @@ -1558,6 +1568,14 @@ dodata: /* XXX */ #endif /* + * If this is a short packet, then ACK now - with Nagel + * congestion avoidance sender won't send more until + * he gets an ACK. + */ + if (ti->ti_flags & TH_PUSH) + tp->t_flags |= TF_ACKNOW; + + /* * Return any desired output. */ if (needoutput || (tp->t_flags & TF_ACKNOW)) |