Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jul 2010 21:45:53 +0000 (UTC)
From:      Andre Oppermann <andre@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210666 - head/sys/netinet
Message-ID:  <201007302145.o6ULjr3k083665@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andre
Date: Fri Jul 30 21:45:53 2010
New Revision: 210666
URL: http://svn.freebsd.org/changeset/base/210666

Log:
  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

Modified:
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c	Fri Jul 30 21:39:28 2010	(r210665)
+++ head/sys/netinet/tcp_syncache.c	Fri Jul 30 21:45:53 2010	(r210666)
@@ -804,8 +804,9 @@ syncache_socket(struct syncache *sc, str
 
 	/*
 	 * 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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007302145.o6ULjr3k083665>