From owner-freebsd-ipfw@FreeBSD.ORG Tue Sep 20 16:47:53 2005 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org 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 EDEEB16A41F for ; Tue, 20 Sep 2005 16:47:53 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A4BB43D48 for ; Tue, 20 Sep 2005 16:47:53 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j8KGlr0Z088695; Tue, 20 Sep 2005 09:47:53 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j8KGlrh3088694; Tue, 20 Sep 2005 09:47:53 -0700 (PDT) (envelope-from rizzo) Date: Tue, 20 Sep 2005 09:47:53 -0700 From: Luigi Rizzo To: vladone Message-ID: <20050920094753.A88575@xorpc.icir.org> References: <97663975.20050917141303@spaingsm.com> <20050919122154.GM51142@obiwan.tataz.chchile.org> <477488950.20050920130453@spaingsm.com> <20050920152714.GF24643@obiwan.tataz.chchile.org> <1135123196.20050920192026@spaingsm.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: <1135123196.20050920192026@spaingsm.com>; from vladone@spaingsm.com on Tue, Sep 20, 2005 at 07:20:26PM +0300 Cc: freebsd-ipfw@freebsd.org Subject: Re: dummynet patch X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2005 16:47:54 -0000 On Tue, Sep 20, 2005 at 07:20:26PM +0300, vladone wrote: > I know what is WF2Q, but still dont see what is the problem for wich > dont't exist a possibility to limit bandwidth that is given to a > queue, with queue settings. it not implemented because there is an equivalently efficient mechanism which is first pass packets through a shaper and then to the WF2Q "queue". say you want to select on src-ip: sysctl net.inet.ip.fw.one_pass=0 // misc stuff that sends your traffic to rule 4500 (1) ipfw add 4500 pipe 1 ip from any to any ipfw add 4501 queue 2 ip from any to any ipfw add 4502 allow ip from any to any (2) ipfw pipe 1 config bw 300kbit/s mask src-ip 0xffffffff ipfw queue 2 config weight 10 pipe 3 mask src-ip 0xffffffff ipfw pipe 3 config bw 1Mbit/s and there you have 1mbit total, 300k max per flow. if you think your proposed scheme (which saves lines 1 and 2 from the configuration, but part of line 2 must be folded back into the next line) is more efficient, implement it and measure it. My take is that it saves maybe 5-10us/packet on 500MHz class boxes. To me, it is not worth the effort in terms of added code complexity. cheers luigi > And exist a precedent, "queue" paramater that exist for pipe and > queue. > For example, if a "bw" parameter is not used for queue, then bandwidth > is given only acording with they weight, so use this option who want, > like anothers parameters ("dst-ip, mask, queue, even weight"). > And my suggestion isn't a caprice. > For example: if i have multiple users, that acces internet throught an > freebsd gateway. How split bandwidth? > I have two clear solutions: > 1. assign for each host an pipe. But i dont know if in this mode, in > conditions of heavy traffic, bandwidth is well splited. Is possibil > for an user to take more bandwidth (according with his pipe), and > another user remain without bandwidth. > 2. share total bandwidth, to different hosts, with queue. This is more > efficient but have a little problem. If an user is alone on traffic > can get all bandwith. For this reason, i want (and i think many > admins) an possibility to limit bandwidth that is given to a queue. > > I don't think that passing packets to multiple pipe and queue is e > efficiently for traffic flow. > My sugestion about "bw" parameter for queue is only for convenience. U > can named how you want, so i dont see problem about "... pipes and queues are two distinct objects which have > different semantics." > > _______________________________________________ > 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"