From owner-freebsd-ipfw Wed Nov 7 9:52:30 2001 Delivered-To: freebsd-ipfw@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 82A6C37B419 for ; Wed, 7 Nov 2001 09:52:25 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.3/8.11.1) id fA7HmOI96543; Wed, 7 Nov 2001 09:48:24 -0800 (PST) (envelope-from rizzo) Date: Wed, 7 Nov 2001 09:48:24 -0800 From: Luigi Rizzo To: fbsdlist-ipfw Cc: freebsd-ipfw@FreeBSD.ORG Subject: Re: ipfw with RED Message-ID: <20011107094824.E96033@iguana.aciri.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, i have looked at the source but at least the fix you propose looks strange -- lookup_step is never 0 from userland, and so if you find it set to 0 it means that there is some other problem in initializing the queue descriptor. So I need to look at this code in more detail to find a proper fix. cheers luigi On Mon, Nov 05, 2001 at 09:51:28PM +0300, fbsdlist-ipfw wrote: > Hello! > > I have FreeBSD 4.4-STABLE cvsuped at Nov 4, two ethernet cards (xl and ed) > > The following my ipfw configuration causes kernel panic in > sys/netinet/ip_dummynet.c:red_drops() after ~2 sec (depending of network load) > > ipfw pipe 1 config bw 3000bit/s queue 2kbyte > ipfw queue 2 config pipe 1 queue 100 red 0.008/30/80/0.1 > ipfw add 1 queue 2 ip from any to any out xmit ed0 > > Also any ipfw configuration with RED causes kernel panic. > > I found the following workaround: > > ===== > -+- ip_dummynet.c.orig Sun Nov 4 18:44:49 2001 > +++ ip_dummynet.c Sun Nov 4 21:44:51 2001 > @@ -955,7 +955,7 @@ > * XXX check wraps... > */ > if (q->avg) { > - u_int t = (curr_time - q->q_time) / fs->lookup_step; > + u_int t = (curr_time - q->q_time) / ( fs->lookup_step ? > + fs->lookup_step : (fs->lookup_step=1) ); > > q->avg = (t < fs->lookup_depth) ? > SCALE_MUL(q->avg, fs->w_q_lookup[t]) : 0; > ===== > > > This bug(?) is not related last dummynet changes, it also was in sources > cvsup'ed at Oct 4 > > Does anybody use ipfw with RED or GRED without such troubles? > > > Gennady Proskurin > > email: gpr@nvnpp.vrn.ru > FIDO: 2:5025/151 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-ipfw" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message