Date: Tue, 07 Oct 2008 21:29:52 +0800 From: Ganbold <ganbold@micom.mng.net> To: freebsd-ipfw@freebsd.org Cc: freebsd-net@freebsd.org Subject: Re: ipfw port lookup table patch for review Message-ID: <48EB6450.9050004@micom.mng.net> In-Reply-To: <48DA1B65.8030106@micom.mng.net> References: <48DA1B65.8030106@micom.mng.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I have just made the patches that use arrays for port entries. It is under the same directory: http://people.freebsd.org/~ganbold/ipfw_port_table/ Array version (each array can have IPFW_TABLES_MAX entries): http://people.freebsd.org/~ganbold/ipfw_port_table/ipfw_port_table_array_unsorted/ List version is still at: http://people.freebsd.org/~ganbold/ipfw_port_table/ipfw_port_table_list_unsorted/ thanks, Ganbold Ganbold wrote: > Hi, > > I thought it might be useful to have port lookup table similar to > existing IP lookup table > in ipfw and I have made patch for that. > > The downside of the patch so far I'm seeing is the port entries are in > linked list > (no limitation yet, memory overhead), not sorted and it uses linear > search > to match (could be slow when lot of entries). > > Just after I've made the patch I saw > http://www.freebsd.org/cgi/query-pr.cgi?pr=121807&cat= . :( > > I agree with PR's reply however for small number of port entries I > thought > this functionality is quite useful. It gives benefit like no need to > modify existing rule, > adding/deleting port entries is easy. > > I did some small tests and it seems like working. > > Patches are at: > http://people.freebsd.org/~ganbold/ipfw_port_table/ > > The output of some usage samples is at: > http://people.freebsd.org/~ganbold/ipfw_port_table/ipfw_port_table_usage_sample.txt > > > Patches can be successfully applied to CURRENT. Didn't test RELENG_7 > due to > no RELENG_7 PC :) > Please let me know your thoughts. I'm happy to discuss to improve the > patch. > Correct me if I'm doing something wrong here. > > thanks, > > Ganbold > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48EB6450.9050004>