From owner-freebsd-bugs Mon May 27 12:10:12 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 82C0B37B409 for ; Mon, 27 May 2002 12:10:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4RJA2f08313; Mon, 27 May 2002 12:10:02 -0700 (PDT) (envelope-from gnats) Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117]) by hub.freebsd.org (Postfix) with ESMTP id 2550637B409 for ; Mon, 27 May 2002 12:09:45 -0700 (PDT) Received: from www.freebsd.org (localhost [127.0.0.1]) by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g4RJ9ihG048861 for ; Mon, 27 May 2002 12:09:44 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.2/8.12.2/Submit) id g4RJ9ip4048860; Mon, 27 May 2002 12:09:44 -0700 (PDT) Message-Id: <200205271909.g4RJ9ip4048860@www.freebsd.org> Date: Mon, 27 May 2002 12:09:44 -0700 (PDT) From: Christian Wittenhorst To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/38626: dummynet/traffic shaper: RED: max_th and min_th are limited to 32kbyes Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 38626 >Category: kern >Synopsis: dummynet/traffic shaper: RED: max_th and min_th are limited to 32kbyes >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 27 12:10:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Christian Wittenhorst >Release: 4.6RC >Organization: progon network engineering >Environment: FreeBSD gandalf.kanti-zug.ch 4.6-RC FreeBSD 4.6-RC #14: Mon May 27 19:41:38 CEST 2002 wiwi@gandalf.kanti-zug.ch:/usr/src/sys/compile/yag i386 >Description: The max_th&min_th parameters are limited to 32kbytes. dummynet scaled these values with 2**16 internally, so only 15 bits are significant (1 bit is lost for sign). This leads to the restriction to 2*15 bytes (32kb). The values handled to ipfw are NOT range checked, so if you use 80kb as an example you will even get a negative value for max_th or min_th. >How-To-Repeat: ipfw queue 9999 config queue 80kbytes pipe 10000 weight 4 mask dst-ip 0x000000ff red 0.002/16kbytes/48kbytes/0.1 ipfw queue list q09999: weight 4 pipe 10000 80 KB 0 queues (1024 buckets) RED w_q 0.001999 min_th 16384 max_th ***-16384*** max_p 0.099991 >Fix: NOT A FIX, JUST A WORKAROUND (will allow 512kb for RED queues, which seems to be quite enough) in /usr/src/sys/netinet/ip_dummynet.h replace #define SCALE_RED 16 by #define SCALE_RED 12 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message