Date: Fri, 22 Oct 2004 00:32:48 GMT From: John Engelhart <johne@zang.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/72987: ipfw/dummynet pipe/queue 'queue [BYTES]KBytes (red|gred) [FLOAT]/[BYTES]/[BYTES]/[FLOAT]' parameter problem Message-ID: <200410220032.i9M0WmRT096215@www.freebsd.org> Resent-Message-ID: <200410220040.i9M0eUIH022724@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72987 >Category: kern >Synopsis: ipfw/dummynet pipe/queue 'queue [BYTES]KBytes (red|gred) [FLOAT]/[BYTES]/[BYTES]/[FLOAT]' parameter problem >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: Fri Oct 22 00:40:29 GMT 2004 >Closed-Date: >Last-Modified: >Originator: John Engelhart >Release: 5.3-BETA7 >Organization: >Environment: FreeBSD new.zang.com 5.3-BETA7 FreeBSD 5.3-BETA7 #0: Sun Oct 17 00:32:33 EDT 2004 johne@new.zang.com:/usr/src/sys/i386/compile/new i386 >Description: While testing some ipfw/dummynet configurations, I ran in to a problem with the "queue #KBytes" with either red or gred MIN and MAX specification parameter. I'm not sure if this is a display only bug, or if the display artifact is due to a more fundamental problem. In summary, there are four parameters passed to either red or gred, ie "red 1.0/2/3/4.0". Of concern is parameters 2 and 3. When the "queue" parameter is specified, it can be specified in one of two ways: in "slots" (packets), or in total number of bytes (#KBytes). The #2 and #3 RED parameters are either the min/max specified in number of slots, or the min/max specified in number of bytes. This only happens when the queue parameter is specified in KBytes. If you specify more than 2^15 as a value for red/gred MIN or MAX, no error is given that a parameter maximum has been exceeded. However, when checking the pipe configuration with an "ipfw pipe show", the value displayed is not the value specified. Thus, specifying a red/gred MIN or MAX > 32767 results in a "ipfw pipe show" as if the parameter were a signed 16 bit value, and not the value entered. I haven't dug in to the code, nor done any exhastive tests, but watching some of the results I got the impression that the values being used by the kernel to do at least the MAX calculations were the truncated values, and not the specified ones. >How-To-Repeat: # ipfw pipe 10 config bw 320Kbit/sec queue 512KBytes gred 0.1/4096/131072/0.1 # ipfw pipe 10 show 00010: 320.000 Kbit/s 0 ms 512 KB 1 queues (1 buckets) GRED w_q 0.099991 min_th 4096 max_th 0 max_p 0.099991 mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 Note the "max_th 0" is not 131072. Wrapped value: # ipfw pipe 10 config bw 320Kbit/sec queue 512Kbytes gred 0.1/4096/32768/0.1 # ipfw pipe 10 show 00010: 320.000 Kbit/s 0 ms 512 KB 1 queues (1 buckets) GRED w_q 0.099991 min_th 4096 max_th -32768 max_p 0.099991 mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp "max_th" now at -32768. >Fix: Unknown. Not sure if this is display only, or a bigger problem. Wanted to get it logged first, and I figure an ipfw maintainer can make a faster pass at what the real problem is than I can since it's a pretty obvious bug. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410220032.i9M0WmRT096215>