Date: Thu, 07 Mar 2002 12:56:45 +0300 From: Gennady Proskurin <gpr@nvnpp.vrn.ru> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/35628: ifpw(8) doesn't set RED parameters for dummynet queue Message-ID: <E16iudh-0003FR-00@fbsd.nvnpp.vrn.ru>
next in thread | raw e-mail | index | archive | help
>Number: 35628 >Category: bin >Synopsis: ifpw(8) doesn't set RED parameters for dummynet queue >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 07 02:00:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Gennady Proskurin >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD gpr.nvnpp.lan 5.0-CURRENT FreeBSD 5.0-CURRENT #17: Wed Mar 6 08:18:48 MSK 2002 gpr@gpr.nvnpp.lan:/usr/obj/usr/src/sys/gpr i386 >Description: ipfw(8) doesn't set RED parameters for dummynet queue with RED queue management because they set only if bandwidth limit exists, but bw limit cannot be in queue config. >How-To-Repeat: 1) Configure dummynet queue with RED, for example: ipfw pipe 1 config bw 3000byte/s queue 5 ipfw queue 2 config pipe 1 queue 50 red 0.008/10/40/0.9 2) Do some traffic via queue 2 to fill its queue ipfw add 1 queue 2 ip from any to any 3) See kernel panic caused by using uninitialized RED parameters >Fix: for ipfw.c rev 1.120 --- ipfw.c.orig Thu Mar 7 08:32:43 2002 +++ ipfw.c Thu Mar 7 12:24:14 2002 @@ -1648,7 +1648,11 @@ pipe.fs.min_th, pipe.fs.max_th); if (pipe.fs.max_th == 0) errx(EX_DATAERR, "max_th must be > 0"); - if (pipe.bandwidth) { + /* + * We need set RED parameters anyway, + * even if no bandwidth limit + */ + { size_t len; int lookup_depth, avg_pkt_size; double s, idle, weight, w_q; @@ -1682,7 +1686,10 @@ "kern.clockrate"); /* ticks needed for sending a medium-sized packet */ - s = clock.hz * avg_pkt_size * 8 / pipe.bandwidth; + if (pipe.bandwidth==0) + s = 0; + else + s = clock.hz * avg_pkt_size * 8 / pipe.bandwidth; /* * max idle time (in ticks) before avg queue size >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E16iudh-0003FR-00>