diff options
author | oleg <oleg@FreeBSD.org> | 2009-12-05 23:27:21 +0000 |
---|---|---|
committer | oleg <oleg@FreeBSD.org> | 2009-12-05 23:27:21 +0000 |
commit | 9bb92ae41af45cc801f28a880e08648aad72e241 (patch) | |
tree | 1e15741f60f3953d9e28998511ffcc60ee733ffe /sys/netinet | |
parent | a59fbebfcac9d7955a4bc741520ccf240e60f015 (diff) | |
download | FreeBSD-src-9bb92ae41af45cc801f28a880e08648aad72e241.zip FreeBSD-src-9bb92ae41af45cc801f28a880e08648aad72e241.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ipfw/ip_dummynet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ipfw/ip_dummynet.c b/sys/netinet/ipfw/ip_dummynet.c index 2b01fa6..f012a1e 100644 --- a/sys/netinet/ipfw/ip_dummynet.c +++ b/sys/netinet/ipfw/ip_dummynet.c @@ -1447,7 +1447,9 @@ dummynet_io(struct mbuf **m0, int dir, struct ip_fw_args *fwa) 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; |