From owner-freebsd-current Thu Apr 23 22:17:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA24091 for freebsd-current-outgoing; Thu, 23 Apr 1998 22:17:27 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA24082 for ; Thu, 23 Apr 1998 22:17:25 -0700 (PDT) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id WAA07510; Thu, 23 Apr 1998 22:10:55 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd007508; Fri Apr 24 05:10:51 1998 Message-ID: <35401D98.6201DD56@whistle.com> Date: Thu, 23 Apr 1998 22:05:28 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2.5-RELEASE i386) MIME-Version: 1.0 To: Luigi Rizzo CC: kjc@csl.sony.co.jp, current@FreeBSD.ORG Subject: Re: Bandwidth throttling etc. References: <199804240305.FAA20329@labinfo.iet.unipi.it> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Luigi Rizzo wrote: [...] > On this issue: i am looking at the integration of my dummynet stuff > within the ipfw code (mainly to use the classifier and ipfw control > routines already there). > > looking at the ip_fw_chk routine, it returns a 32-bit identifier which > is currently 0, -1, or the port number (extended to 32-bit) for divert. > This value is used in case of divert also to avoid that the same rule > is applied twice. yep, I've just been looking at that.. > > I was thinking to change the return value from the divert port number > to the pointer (index ?) to the matching rule in the firewall check > (and since this is a 16-bit number, the remaining bits can be used > as flags for keep, discard, ...). I think I would rather make it a pointer to the rule.. Index is somehow depending on the storage form of the rules.. I was thinking at one stage of making it the rule number of where to restart processing :-) > > This would have a number of advantages in my opinion, including > the ability to do more complex processing since the rule can contain > specific info on what to do on the packet, and maybe even faster/better > processing when a packet has to do multiple pass through the classifier > (as in the case of the divert, but also dummynet, or bandwith limiters). I've been looking at making the stored line-number in the SKIPTO rules be actual pointers to the rule to skip to. this would require reference counting rules, but it would make it much more efficient to break the rulesets into smaller subgroups, as you wouldn't have to step through every rule. > > > What I wnat to do is to add a field to the mbuf pkhdr field that > > can hold a reference to a flow label or a CBQ class (as a > > specific example) so that the classification of a packet is > > available at any time once made. I then want to add code to > > the IPFW classifier to allow it to make that classification. > > could you use the pointer to the rule as flow label ? of course, then the rule could hold a pointer to whatever you had assigned to it.. :-) > > And how hard (i.e. impact to the rest of the code) would it be to > put the flow label in the mbuf header ? > no real impact.. M_FREE would need to be tought how to free it if it were present.. that's about all. > > Incoming flow control will only really work for TCP, but that is enough > > should you rather say "will only really work for responsive flows" ? yeah I'm presently doing it slightly differently, with a natd-like daemon. I just read your paper/code on the round-robin queueing.. I guess you and kenjiro chen have been working on similar things.. :-) Even thugh I'm not doing input bandwidth control with embedded flows I still thing that a flow capabilty in freeBSD, associated with the packet filter(s) is something that should be investigated. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message