diff options
author | andre <andre@FreeBSD.org> | 2010-07-30 21:45:53 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2010-07-30 21:45:53 +0000 |
commit | 92e9dbc518d786fa997ba14119d40ef0169b9cca (patch) | |
tree | 68aa1473bb3ff07326d184768b99e12f3a7dce74 /sys/netinet/tcp_syncache.c | |
parent | 67a2e7219ef654d05e0561ef15ef4f8a09d448d2 (diff) | |
download | FreeBSD-src-92e9dbc518d786fa997ba14119d40ef0169b9cca.zip FreeBSD-src-92e9dbc518d786fa997ba14119d40ef0169b9cca.tar.gz |
Fix a bug in syncache where the initial CWND for new incoming connections
was limited to one segment under the faulty assumption of a retransmit.
Due to this the opportunity to initialize the increased congestion window
according to RFC3390 was missed.
Support for RFC3465 introduced in r187289 uncovered the bug as the ACK
to SYN/ACK no longer caused snd_cwnd increase by MSS (actually, this
increase shouldn't happen as it's explicitly forbidden by RFC3390, but
it's another issue). Snd_cwnd remains really small (1*MSS + 1) and this
causes really bad interaction with delayed acks on other side.
The variable name sc_rxmits is a bit misleading as it counts all transmits,
not just retransmits.
Submitted by: Maxim Dounin <mdounin-at-mdounin-dot-ru>
MFC after: 10 days
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index c47493c..2d05760 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -804,8 +804,9 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) /* * If the SYN,ACK was retransmitted, reset cwnd to 1 segment. + * NB: sc_rxmits counts all SYN,ACK transmits, not just retransmits. */ - if (sc->sc_rxmits) + if (sc->sc_rxmits > 1) tp->snd_cwnd = tp->t_maxseg; tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); |