Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2002 12:09:44 -0700 (PDT)
From:      Christian Wittenhorst <wiwi@progon.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/38626: dummynet/traffic shaper: RED: max_th and min_th are limited to 32kbyes
Message-ID:  <200205271909.g4RJ9ip4048860@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205271909.g4RJ9ip4048860>