From owner-freebsd-ipfw@FreeBSD.ORG Sat Sep 6 08:24:17 2003 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61FF616A4C0 for ; Sat, 6 Sep 2003 08:24:17 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D28A43FE9 for ; Sat, 6 Sep 2003 08:24:13 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.8p1/8.12.3) with ESMTP id h86FO6kN002985; Sat, 6 Sep 2003 08:24:06 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.8p1/8.12.3/Submit) id h86FO6T9002984; Sat, 6 Sep 2003 08:24:06 -0700 (PDT) (envelope-from rizzo) Date: Sat, 6 Sep 2003 08:24:06 -0700 From: Luigi Rizzo To: Ivo Vachkov Message-ID: <20030906082406.A1562@xorpc.icir.org> References: <20030906150245.30662.qmail@bsdmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030906150245.30662.qmail@bsdmail.com>; from ivo@bsdmail.org on Sat, Sep 06, 2003 at 05:02:45PM +0200 cc: freebsd-ipfw@freebsd.org Subject: Re: Burst X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2003 15:24:17 -0000 [similar msg on -net, so i will respond here...] On Sat, Sep 06, 2003 at 05:02:45PM +0200, Ivo Vachkov wrote: > Hi all, > > I've been doing some research on traffic shaping features on several platforms and I coudn't find is there a way to implement *burst* on FreeBSD. I know Cisco has it and Linux (iproute2/tc + TBF) has it, but none of the BSD seems to have similar feature (at least I couldn't find ...). it depends on what you want "burst" for. Dummynet works as what i call a "shaper": it releases traffic at the desired rate (with two constraints -- packets cannot be split, and all events are rounded to the closest clock tick). If packets arrive at a dummynet pipe faster than the output rate, they are buffered in a queue, whose size (in packets or bytes) you can configure as a parameter of the pipe. As a consequence, the pipe is able to absorb a burst as large as the queue size (and release it with the desired rate). In this respect, a "burst" means allowing packets to be released in advance with respect to their correct time (but then of course remember what you did so you never exceed the programmed bandwidth by more than the burst size). Effectively, dummynet has a burst of 0 bytes. Now, I believe you can change the behaviour of dummynet to implement a burst by changing, near line 555 in ip_dummynet:ready_event() - if (len_scaled > q->numbytes ) + if (len_scaled > q->numbytes + q->burst_size) and adding the relevant parameter (burst_size) to the pipe's configuration. You probably need to change the SET_TICKS() macro to account for the burst size too. cheers luigi > So can you point me out a way to implement such using IPFW+Dummynet if one exists. Thank you in advance. > > Ivo Vachkov > > P.S. I wrote some code to implement burst using divert(4) sockets, but it's still too bare. If you can point me documentation, descibing traffic engeneering techniques/algorithms I'll be thankfull too > -- > _______________________________________________ > Get your free email from http://mymail.bsdmail.com > > Powered by Outblaze > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org"