tipc: make tipc socket support net namespace
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>
Showing
- net/tipc/config.c 1 addition, 1 deletionnet/tipc/config.c
- net/tipc/core.c 4 additions, 8 deletionsnet/tipc/core.c
- net/tipc/core.h 4 additions, 0 deletionsnet/tipc/core.h
- net/tipc/net.c 1 addition, 1 deletionnet/tipc/net.c
- net/tipc/socket.c 29 additions, 19 deletionsnet/tipc/socket.c
- net/tipc/socket.h 4 additions, 4 deletionsnet/tipc/socket.h
Loading
Please register or sign in to comment