Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2010 12:34: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: r211874 - head/sys/netinet
Message-ID:  <201008271234.o7RCYrl3077943@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andre
Date: Fri Aug 27 12:34:53 2010
New Revision: 211874
URL: http://svn.freebsd.org/changeset/base/211874

Log:
  Use timestamp modulo comparison macro for automatic receive buffer
  scaling to correctly handle wrapping of ticks value.
  
  MFC after:	1 week

Modified:
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Fri Aug 27 11:08:11 2010	(r211873)
+++ head/sys/netinet/tcp_input.c	Fri Aug 27 12:34:53 2010	(r211874)
@@ -1441,7 +1441,7 @@ tcp_do_segment(struct mbuf *m, struct tc
 			if (V_tcp_do_autorcvbuf &&
 			    to.to_tsecr &&
 			    (so->so_rcv.sb_flags & SB_AUTOSIZE)) {
-				if (to.to_tsecr > tp->rfbuf_ts &&
+				if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) &&
 				    to.to_tsecr - tp->rfbuf_ts < hz) {
 					if (tp->rfbuf_cnt >
 					    (so->so_rcv.sb_hiwat / 8 * 7) &&



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