Date: Mon, 27 Apr 1998 10:09:40 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: kjc@csl.sony.co.jp (Kenjiro Cho) Cc: julian@whistle.com, current@FreeBSD.ORG Subject: Re: Bandwidth throttling etc. Message-ID: <199804270809.KAA24661@labinfo.iet.unipi.it> In-Reply-To: <199804221213.VAA28109@hotaka.csl.sony.co.jp> from "Kenjiro Cho" at Apr 22, 98 09:13:22 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> It would be nice if we could write an ipfw line like:
>
> # Allow incoming http up to 64kbps
> $fwcmd add pass tcp from any to ${ip} 80 bandwidth 64k
this is exactly what i plan to build with the integration of dummynet
into the ipfw stuff, only with a slightly different syntax:
$fwcmd add pipe 4 tcp from any to ${ip} 80
$fwcmd add pipe 5 tcp from ${ip} 80 to any
$fwcmd pipe 4 configure bandwidth 64k buffers 10 delay 400ms
$fwcmd pipe 5 configure bandwidth 128k buffers 10 delay 200ms
i.e. the "pipe X" option acts much like a divert, only difference
is that packets are passed to the specified "pipe" which is
configurable in bandwidth, buffers and delay.
> You suggested to add a field to mbuf structure but it's a moot point.
> - many network programs are optimized for the current mbuf size :-(
> (many people want to modify mbuf, or even want to rewrite the
> entire mbuf code but ...)
one can still bring mbufs up to 256 bytes.
> - if we are going to add a new field, it must be generic; it should
> be usable by other mechanisms (e.g., routing, multicast, IPv6).
i called it flow_id and it is a void *, currently pointing to the
ipfw rule that matched for the packet (note that using a pointer to the
rule requires a lot of care when case rules are deleted,
to avoid dangling pointers).
cheers
luigi
-----------------------------+--------------------------------------
Luigi Rizzo | Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it | Universita' di Pisa
tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804270809.KAA24661>
