From owner-freebsd-current@FreeBSD.ORG Mon Jun 6 06:21:19 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B70A16A41C for ; Mon, 6 Jun 2005 06:21:19 +0000 (GMT) (envelope-from demizu@dd.iij4u.or.jp) Received: from r-dd.iij4u.or.jp (r-dd.iij4u.or.jp [210.130.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA8F443D67 for ; Mon, 6 Jun 2005 06:21:18 +0000 (GMT) (envelope-from demizu@dd.iij4u.or.jp) Received: from localhost (h221.p049.iij4u.or.jp [210.130.49.221]) by r-dd.iij4u.or.jp (4U-MR/r-dd) id j566L2rX023376; Mon, 6 Jun 2005 15:21:15 +0900 (JST) Date: Mon, 06 Jun 2005 15:20:13 +0900 (JST) Message-Id: <20050606.152013.55717574.Noritoshi@Demizu.ORG> From: Noritoshi Demizu To: Jiawei Ye In-Reply-To: References: X-Mailer: Mew version 4.1 on Emacs 21 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Is this the sign of a problem? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2005 06:21:19 -0000 > The following message repeats quite often in /var/log/messages > kernel: tcp_sack_output: Computed sack_bytes_retransmitted (2636) not > the same as cached value (5307) > > Is this a sign of problems? Yes. Thanks for your report. The patch below would fix the problem. It will be committed soon. Regards, Noritoshi Demizu Index: tcp_sack.c =================================================================== RCS file: /home/cvsup/FreeBSD/ncvs/src/sys/netinet/tcp_sack.c,v retrieving revision 1.21 diff -u -r1.21 tcp_sack.c --- tcp_sack.c 4 Jun 2005 08:03:28 -0000 1.21 +++ tcp_sack.c 6 Jun 2005 03:21:26 -0000 @@ -508,8 +508,6 @@ cur->start = sblkp->end; cur->rxmit = SEQ_MAX(cur->rxmit, cur->start); } - /* Go to the previous hole. */ - cur = TAILQ_PREV(cur, sackhole_head, scblink); } else { /* Data acks at least the end of hole */ if (SEQ_GEQ(sblkp->end, cur->end)) { @@ -535,10 +533,17 @@ cur->end); } } - /* Go to the previous sack block. */ - sblkp--; } tp->sackhint.sack_bytes_rexmit += (cur->rxmit - cur->start); + /* + * Testing sblkp->start against cur->start tells us whether + * we're done with the sack block or the sack hole. + * Accordingly, we advance one or the other. + */ + if (SEQ_LEQ(sblkp->start, cur->start)) + cur = TAILQ_PREV(cur, sackhole_head, scblink); + else + sblkp--; } return (0); }