Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 2009 14:37:09 -0500
From:      Ben Kelly <ben@wanderview.com>
To:        Kevin Smith <kerbzo@gmail.com>
Cc:        freebsd-ipfw@FreeBSD.org, freebsd-current@FreeBSD.org, Oleg Bulyzhin <oleg@FreeBSD.org>
Subject:   Re: dummynet issues
Message-ID:  <F3D11277-C957-4A96-84F7-586EDD837411@wanderview.com>
In-Reply-To: <4B156F92.6020500@gmail.com>
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> <A173B0FA-C964-431C-8DAF-AE4159065111@wanderview.com> <20091130234537.GA78185@lath.rinet.ru> <CB8F37F2-3DF6-4548-8131-9B96F49D29D6@wanderview.com> <20091201173411.GA3637@lath.rinet.ru> <4B156F92.6020500@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F3D11277-C957-4A96-84F7-586EDD837411>