From owner-svn-src-head@FreeBSD.ORG Sat Dec 5 23:27:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BEC5106566C; Sat, 5 Dec 2009 23:27:21 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AE508FC18; Sat, 5 Dec 2009 23:27:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5NRLuh003223; Sat, 5 Dec 2009 23:27:21 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5NRLOr003221; Sat, 5 Dec 2009 23:27:21 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <200912052327.nB5NRLOr003221@svn.freebsd.org> From: Oleg Bulyzhin Date: Sat, 5 Dec 2009 23:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200170 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 23:27:21 -0000 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;