Author: oleg
Date: Sat Dec  5 23:27:21 2009
New Revision: 200170
URL: http://svn.freebsd.org/changeset/base/200170

Log:
  Fix burst processing for WF2Q pipes - do not increase available burst size
  unless pipe is idle. This should fix follwing issues:
  - 'dummynet: OUCH! pipe should have been idle!' log messages.
  - exceeding configured pipe bandwidth.
  
  MFC after:    1 week

Modified:
  head/sys/netinet/ipfw/ip_dummynet.c

Modified: head/sys/netinet/ipfw/ip_dummynet.c
==============================================================================
--- head/sys/netinet/ipfw/ip_dummynet.c Sat Dec  5 23:23:46 2009        
(r200169)
+++ head/sys/netinet/ipfw/ip_dummynet.c Sat Dec  5 23:27:21 2009        
(r200170)
@@ -1447,7 +1447,9 @@ dummynet_io(struct mbuf **m0, int dir, s
                                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;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to