Re: in_pcblookup_hash() called multiple times

2002-03-08 Thread Robert Watson
On Thu, 7 Mar 2002, Bill Fumerola wrote: > On Thu, Mar 07, 2002 at 11:03:19PM -0500, Robert Watson wrote: > > A couple of comments: > > > > - You can always cache the pcb the first time it's used, and then have it > > available for future use. I agree with your concerns about generating > >

Re: in_pcblookup_hash() called multiple times

2002-03-08 Thread Terry Lambert
If you want code, go out to the DDJ archive on UUNET; it has all the source code from the DDJ article from 1996 or so... -- Terry Mike Silbersack wrote: > > On Thu, 7 Mar 2002, Alfred Perlstein wrote: > > > Do a web search. It's basically a way to have a linked list that > > you can do nearly

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Mike Silbersack
On Thu, 7 Mar 2002, Alfred Perlstein wrote: > Do a web search. It's basically a way to have a linked list that > you can do nearly a binary search on, however it costs several > additional linkages. It was also the "pool on the roof" trick > we'd do to the new guy at clickarray. Hm, did you g

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Alfred Perlstein
* Mike Silbersack <[EMAIL PROTECTED]> [020307 22:35] wrote: > > On Thu, 7 Mar 2002, Alfred Perlstein wrote: > > > * Terry Lambert <[EMAIL PROTECTED]> [020307 22:24] wrote: > > > > > > If it were just the pcbhash, I think I'd go with a btree... > > > or to make Alfred happy... a skiplist... ;^).

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Mike Silbersack
On Thu, 7 Mar 2002, Alfred Perlstein wrote: > * Terry Lambert <[EMAIL PROTECTED]> [020307 22:24] wrote: > > > > If it were just the pcbhash, I think I'd go with a btree... > > or to make Alfred happy... a skiplist... ;^). > > Argh, someone hand me the firehose, Terry seems really thirsty... > >

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Alfred Perlstein
* Terry Lambert <[EMAIL PROTECTED]> [020307 22:24] wrote: > > If it were just the pcbhash, I think I'd go with a btree... > or to make Alfred happy... a skiplist... ;^). Argh, someone hand me the firehose, Terry seems really thirsty... -- -Alfred Perlstein [[EMAIL PROTECTED]] To Unsubscribe:

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Terry Lambert
Bill Fumerola wrote: > i think that ip_fw_chk() taking _8_ arguments is getting a bit obscene. ip_fw_chk should be obscene and not heard? 8-). > we're talking about an optimization that less then .1% of our userbase > will ever take advantage of v. a pessimization (additional argument in > the

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Terry Lambert
Bill Fumerola wrote: > On Thu, Mar 07, 2002 at 03:51:41AM -0800, Julian Elischer wrote: > > what would be even nicer is if ipfw found the cached entry and passed it > > back to ip_input so it didn't need to :-) > > i think this entire idea of cacheing it in ip_input() is a bad idea, no > offense

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Bill Fumerola
On Thu, Mar 07, 2002 at 11:03:19PM -0500, Robert Watson wrote: > A couple of comments: > > - You can always cache the pcb the first time it's used, and then have it > available for future use. I agree with your concerns about generating > it every time -- that would be a disaster for routers

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Robert Watson
A couple of comments: - You can always cache the pcb the first time it's used, and then have it available for future use. I agree with your concerns about generating it every time -- that would be a disaster for routers where no packets are even delivered locally. :-) - The uid/gid code

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Bill Fumerola
On Thu, Mar 07, 2002 at 03:51:41AM -0800, Julian Elischer wrote: > what would be even nicer is if ipfw found the cached entry and passed it > back to ip_input so it didn't need to :-) i think this entire idea of cacheing it in ip_input() is a bad idea, no offense terry. first, having a uid or g

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Terry Lambert
Julian Elischer wrote: > what would be even nicer is if ipfw found the cached entry and passed it > back to ip_input so it didn't need to :-) This is the approach I intended. The problem is that there are cases where you want the inpcb for additional processing (e.g. ipfw), and cases where ther

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Julian Elischer
what would be even nicer is if ipfw found the cached entry and passed it back to ip_input so it didn't need to :-) On Thu, 7 Mar 2002, Bill Fumerola wrote: > On Wed, Mar 06, 2002 at 05:07:55PM -0800, Terry Lambert wrote: > > > There are redundant calls to the in_pcblookup_hash() in the > > ip_

Re: in_pcblookup_hash() called multiple times

2002-03-07 Thread Bill Fumerola
On Wed, Mar 06, 2002 at 05:07:55PM -0800, Terry Lambert wrote: > There are redundant calls to the in_pcblookup_hash() in the > ip_fw_chk() function called via (*ip_fw_chk_ptr)() in the > ip_input path. in addition to what you're talking about, ipfw will repeat the hash lookup for every rule it g

Re: in_pcblookup_hash() called multiple times

2002-03-06 Thread Julian Elischer
sounds good.. can you send us a patch to look at? On Wed, 6 Mar 2002, Terry Lambert wrote: > There are redundant calls to the in_pcblookup_hash() in the > ip_fw_chk() function called via (*ip_fw_chk_ptr)() in the > ip_input path. > > Would it be useful to modify the (*pr_input) function point

in_pcblookup_hash() called multiple times

2002-03-06 Thread Terry Lambert
There are redundant calls to the in_pcblookup_hash() in the ip_fw_chk() function called via (*ip_fw_chk_ptr)() in the ip_input path. Would it be useful to modify the (*pr_input) function pointer in the struct ipprotosw to take a fourth argument (perhaps it should be cast to a "void *" to keep it