Subject: [PATCH net-next 0/8] netns: optimize tcp and udp hashtables wrt net namespaces

From: Pavel Emelyanov <[email-masked]>
Date: Mon, 16 Jun 2008 13:35:32 +0400

Currently hash functions to store udp sockets, bind buckets,
listening and established tcp sockets take only ports and/or
addresses into account.

The result is nasty. Consider processes in different namespaces
communicate to each other or the outer world with same ports 
or addresses (e.g. dns server run in each namespace, apache server
listening a 80 port in each ns or communications via lo). All 
these sockets will all be linked in a single hash chain, thus 
producing too long chains.

To avoid this situation the proposal is to add some "salt" to
hash functions taking the namespace into account.

I made this "salt" disappear for CONFIG_NET_NS=n case.

Signed-off-by: Pavel Emelyanov <[email-masked]>