tipc: make tipc socket support net namespace
authorYing Xue <ying.xue@windriver.com>
Fri, 9 Jan 2015 07:27:08 +0000 (15:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Jan 2015 21:24:33 +0000 (16:24 -0500)
Now tipc socket table is statically allocated as a global variable.
Through it, we can look up one socket instance with port ID, insert
a new socket instance to the table, and delete a socket from the
table. But when tipc supports net namespace, each namespace must own
its specific socket table. So the global variable of socket table
must be redefined in tipc_net structure. As a concequence, a new
socket table will be allocated when a new namespace is created, and
a socket table will be deallocated when namespace is destroyed.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Tested-by: Tero Aho <Tero.Aho@coriant.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/config.c
net/tipc/core.c
net/tipc/core.h
net/tipc/net.c
net/tipc/socket.c
net/tipc/socket.h

Simple merge
diff --cc net/tipc/core.c
Simple merge
diff --cc net/tipc/core.h
Simple merge
diff --cc net/tipc/net.c
Simple merge
Simple merge
Simple merge