From owner-svn-src-all@FreeBSD.ORG Fri Aug 27 12:34:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEADD1065694; Fri, 27 Aug 2010 12:34:53 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE9578FC1A; Fri, 27 Aug 2010 12:34:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RCYra2077945; Fri, 27 Aug 2010 12:34:53 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RCYrl3077943; Fri, 27 Aug 2010 12:34:53 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008271234.o7RCYrl3077943@svn.freebsd.org> From: Andre Oppermann Date: Fri, 27 Aug 2010 12:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211874 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 12:34:53 -0000 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) &&