From owner-freebsd-ipfw@FreeBSD.ORG Tue Dec 1 19:37:12 2009 Return-Path: Delivered-To: freebsd-ipfw@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58FEA106566C; Tue, 1 Dec 2009 19:37:12 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from mail.wanderview.com (mail.wanderview.com [66.92.166.102]) by mx1.freebsd.org (Postfix) with ESMTP id D22AE8FC16; Tue, 1 Dec 2009 19:37:11 +0000 (UTC) Received: from xykon.in.wanderview.com (xykon.in.wanderview.com [10.76.10.152]) (authenticated bits=0) by mail.wanderview.com (8.14.3/8.14.3) with ESMTP id nB1Jb97D024834 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 1 Dec 2009 19:37:09 GMT (envelope-from ben@wanderview.com) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Ben Kelly In-Reply-To: <4B156F92.6020500@gmail.com> Date: Tue, 1 Dec 2009 14:37:09 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4B129960.9030107@gmail.com> <4B12B6B9.3030106@bsd.com.br> <4B12C32F.3060709@gmail.com> <4B12C543.2070204@mgwigglesworth.net> <4B141A77.4030102@gmail.com> <20091130201222.GC72710@lath.rinet.ru> <20091130234537.GA78185@lath.rinet.ru> <20091201173411.GA3637@lath.rinet.ru> <4B156F92.6020500@gmail.com> To: Kevin Smith X-Mailer: Apple Mail (2.1077) X-Spam-Score: -1.44 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.67 on 10.76.20.1 Cc: freebsd-ipfw@FreeBSD.org, freebsd-current@FreeBSD.org, Oleg Bulyzhin Subject: Re: dummynet issues X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 19:37:12 -0000 On Dec 1, 2009, at 2:33 PM, Kevin Smith wrote: > Oleg Bulyzhin wrote: >> On Mon, Nov 30, 2009 at 11:58:55PM -0500, Ben Kelly wrote: >>> I actually have not measured my bandwidth to validate dummynet. I = have simply observed these messages repeating in my log: >>>=20 >>> dummynet: OUCH! pipe should have been idle! >>>=20 >>> Under normal conditions I don't really need the dummynet rules to = shape traffic for my configuration to work, so it has not been a high = priority for me yet. Do you see the log messages? >>>=20 >>> Thanks. >>>=20 >>> - Ben >>=20 >> It seems i've found the problem. Please test attached patch (it's for = R8.0 >> sources and include r198845). I'm interested in some feedback: >> 1) does it solve 'OUCH' messages problem? >> 2) does it solve bandwidth problem (if there was any)? >>=20 >>=20 > The patch fixes the problem: now it seems all ok, no more "OUCH" > messages and pipe bandwidth limiting works again. > Thank you very much, Oleg!! > Best regards, I just verified that it got rid of the log messages for me as well. I = still haven't actually measured the dummynet bandwidth, though. For reference, I used only this part of the patch against 9-CURRENT = since the rest seemed to already be applied: Index: sys/netinet/ipfw/ip_dummynet.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/netinet/ipfw/ip_dummynet.c (revision 252) +++ sys/netinet/ipfw/ip_dummynet.c (working copy) @@ -1426,7 +1426,9 @@ q->numbytes +=3D pipe->bandwidth; } } else { /* WF2Q. */ - if (pipe->idle_time < curr_time) { + if (pipe->idle_time < curr_time && + pipe->scheduler_heap.elements =3D=3D 0 && + pipe->not_eligible_heap.elements =3D=3D 0) { /* Calculate available burst size. */ pipe->numbytes +=3D (curr_time - pipe->idle_time - 1) * = pipe->bandwidth; Thanks for the quick fix Oleg! - Ben=