From nobody@www.freebsd.org  Mon May 27 12:09:45 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 2550637B409
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <wiwi@progon.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dummynet/traffic shaper: RED: max_th and min_th are limited to 32kbyes
X-Send-Pr-Version: www-1.0

>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:    luigi
>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:  Sat Jul 13 14:41:43 PDT 2002
>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:
Responsible-Changed-From-To: freebsd-bugs->luigi 
Responsible-Changed-By: luigi 
Responsible-Changed-When: Sat Jul 13 14:41:25 PDT 2002 
Responsible-Changed-Why:  
dummynet stuff 


http://www.freebsd.org/cgi/query-pr.cgi?pr=38626 
>Unformatted:
