netdev
[Top] [All Lists]

Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLU

To: laforge@xxxxxxxxxxxxx (Harald Welte)
Subject: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target)
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Oct 2004 07:31:07 +1000
Cc: lmb@xxxxxxx, ahu@xxxxxxx, hch@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, davem@xxxxxxxxxxxxx
In-reply-to: <20041021142527.GG3551@sunbeam.de.gnumonks.org>
Organization: Core
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686))
Harald Welte <laforge@xxxxxxxxxxxxx> wrote:
>
> For supporting two primitive operation, adding a new netlink address
> family also isn't worthwhile, especially since we're short of netlink
> families.

That's something I'm looking into as well.  The current strategy of
either creating a new family or tacking random things into RTNETLINK
is simply not going to scale.

Initially I considered an interface where kernel users can register
themselves using a string as the key.  But I soon realised that we
could simply allow the netlink_family field to be an arbitrary integer
that is used as a key to a hash table.

The CPU cost of the hash table isn't too bad since you'll only be
looking it up when the socket is created.

Comments anyone?
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>