From owner-svn-src-all@FreeBSD.ORG Tue Dec 28 11:34:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8BB01065672; Tue, 28 Dec 2010 11:34:59 +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 A7AC68FC0C; Tue, 28 Dec 2010 11:34:59 +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 oBSBYxln060560; Tue, 28 Dec 2010 11:34:59 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBSBYxW0060558; Tue, 28 Dec 2010 11:34:59 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <201012281134.oBSBYxW0060558@svn.freebsd.org> From: Oleg Bulyzhin Date: Tue, 28 Dec 2010 11:34:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216757 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2010 11:34:59 -0000 Author: oleg Date: Tue Dec 28 11:34:59 2010 New Revision: 216757 URL: http://svn.freebsd.org/changeset/base/216757 Log: MFC r213265: Fix handling of initial credit for an idle pipe. This fixes the bug where setting bw > 1 MTU/tick resulted in infinite bandwidth if io_fast=1 PR: kern/147245, kern/148429 Obtained from: Riccardo Panicucci Modified: stable/8/sys/netinet/ipfw/ip_dn_io.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dn_io.c Tue Dec 28 10:08:50 2010 (r216756) +++ stable/8/sys/netinet/ipfw/ip_dn_io.c Tue Dec 28 11:34:59 2010 (r216757) @@ -742,8 +742,11 @@ dummynet_io(struct mbuf **m0, int dir, s } /* compute the initial allowance */ - { + if (si->idle_time < dn_cfg.curr_time) { + /* Do this only on the first packet on an idle pipe */ struct dn_link *p = &fs->sched->link; + + si->sched_time = dn_cfg.curr_time; si->credit = dn_cfg.io_fast ? p->bandwidth : 0; if (p->burst) { uint64_t burst = (dn_cfg.curr_time - si->idle_time) * p->bandwidth;