Re: dummynet issues

From: Ben Kelly <ben_at_wanderview.com>
Date: Tue, 1 Dec 2009 14:37:09 -0500
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:
>>> 
>>>  dummynet: OUCH! pipe should have been idle!
>>> 
>>> 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?
>>> 
>>> Thanks.
>>> 
>>> - Ben
>> 
>> 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)?
>> 
>> 
> 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
===================================================================
--- sys/netinet/ipfw/ip_dummynet.c      (revision 252)
+++ sys/netinet/ipfw/ip_dummynet.c      (working copy)
_at__at_ -1426,7 +1426,9 _at__at_
                                q->numbytes += pipe->bandwidth;
                }
        } else {                        /* WF2Q. */
-               if (pipe->idle_time < curr_time) {
+               if (pipe->idle_time < curr_time &&
+                   pipe->scheduler_heap.elements == 0 &&
+                   pipe->not_eligible_heap.elements == 0) {
                        /* Calculate available burst size. */
                        pipe->numbytes +=
                            (curr_time - pipe->idle_time - 1) * pipe->bandwidth;

Thanks for the quick fix Oleg!

- Ben
Received on Tue Dec 01 2009 - 18:37:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:58 UTC