Date: Mon, 11 Jan 2010 09:10:55 +0100 From: Luigi Rizzo <rizzo@iet.unipi.it> To: Julian Elischer <julian@elischer.org> Cc: Maxim Ignatenko <gelraen.ua@gmail.com>, ipfw@freebsd.org Subject: Re: RFC: new ipfw options Message-ID: <20100111081055.GA37788@onelab2.iet.unipi.it> In-Reply-To: <4B4AD98A.2080508@elischer.org> References: <20091209183821.GA40814@onelab2.iet.unipi.it> <ac42db051001101342p30f0c016nd2dd6868108ff202@mail.gmail.com> <4B4AD98A.2080508@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 10, 2010 at 11:55:54PM -0800, Julian Elischer wrote: > Maxim Ignatenko wrote: > >2009/12/9 Luigi Rizzo <rizzo@iet.unipi.it>: > >>3. a hash version of 'table's > >> > >> Right now ipfw tables are implented as routing tables, which is > >> great if you have to lookup a longest matching prefix, but a > >> bit overkill if you care only for ports or jail ids, and > >> totally uninteresting if you want to lookup flow ids, > >> or generic sequence of bytes. My plan here is to reuse the > >> ipfw hash tables to make them available for 'ipfw table ...' > >> commands. To avoid code and syntax bloat, I'd use the number > >> 0..TABLE_MAX-1 for the existing prefix tables, and > >> TABLE_MAX..2TABLE_MAX-1 for the new hash tables. > >> > >>comments welcome > >> > > > >I think better use another name ('htable' for example) instead of > >overloading the old one. > >And thanks for great ideas. > >_______________________________________________ > >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" > > please keep teh current tables for IP addresses, longes prefix > matching is really hard to do right on other schemes with > the same behaviour. I know, I've tried :-) > > the answer id to have different types of tabels I guess, but don't > try combine when things should remain different. for the time being i am not touching tables -- for my immediate needs (matching ports and uid/jails) the radix tree is almost as good as hash tables, so i am using them (code is already in HEAD -- see the "lookup XXX" option). cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100111081055.GA37788>