dummynet issues
Ben Kelly
ben at wanderview.com
Tue Dec 1 19:37:12 UTC 2009
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)
@@ -1426,7 +1426,9 @@
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
More information about the freebsd-ipfw
mailing list