Date: Tue, 28 Dec 2010 11:34:59 +0000 (UTC) From: Oleg Bulyzhin <oleg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r216757 - stable/8/sys/netinet/ipfw Message-ID: <201012281134.oBSBYxW0060558@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012281134.oBSBYxW0060558>