Re: [Masq-dev] Use daddr and dport as hash keys for faster masq redirector!

Juanjo Ciarlante (irriga@impsat1.com.ar)
Thu, 10 Jun 1999 11:24:10 -0300


On Wed, Jun 09, 1999 at 07:27:44PM -0700, John D. Hardin wrote:
> On Wed, 9 Jun 1999, Julian Anastasov wrote:
> Would making the masq lists doubly-linked be too hideous to
> contemplate? It would eliminate searching the list in
> ip_masq_unhash(), and there's minimal impact on ip_masq_hash() if it
> always inserts at the head of the list.
For the numbers seen, I think that we should double link (unhashing
will become fast and *deterministic*)

>
> > - remove entry (slow - search 65000 entries)
>
> Unhash for masq_expire() doesn't need to be fast since nothing is
> waiting for it to complete,
> but ip_masq_unhash() gets called from
> a few places in packet processing as well, so making it faster would
> be a good thing.
actually the timer (bh) is waiting for masq_expire(), so IT IS critical also.

-- 
-- Juanjo       http://juanjox.kernelnotes.org/
            ... because there IS an OS that CAN follow your power 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/