diff options
author | Ying Xue <ying.xue@windriver.com> | 2015-01-09 02:27:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-12 16:24:33 -0500 |
commit | 347475395434abb2b61bf59c2952470f37072567 (patch) | |
tree | 71a5f63547edecee31f557d0bacbf993b953a099 /net/tipc/core.c | |
parent | 4ac1c8d0ee9faf3a4be185cc4db1381fa0d81280 (diff) |
tipc: make tipc node address support net namespace
If net namespace is supported in tipc, each namespace will be treated
as a separate tipc node. Therefore, every namespace must own its
private tipc node address. This means the "tipc_own_addr" global
variable of node address must be moved to tipc_net structure to
satisfy the requirement. It's turned out that users also can assign
node address for every namespace.
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>
Diffstat (limited to 'net/tipc/core.c')
-rw-r--r-- | net/tipc/core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index 63cde8148aaf..7c09670120eb 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
@@ -48,7 +48,6 @@ | |||
48 | int tipc_random __read_mostly; | 48 | int tipc_random __read_mostly; |
49 | 49 | ||
50 | /* configurable TIPC parameters */ | 50 | /* configurable TIPC parameters */ |
51 | u32 tipc_own_addr __read_mostly; | ||
52 | int tipc_net_id __read_mostly; | 51 | int tipc_net_id __read_mostly; |
53 | int sysctl_tipc_rmem[3] __read_mostly; /* min/default/max */ | 52 | int sysctl_tipc_rmem[3] __read_mostly; /* min/default/max */ |
54 | 53 | ||
@@ -58,6 +57,7 @@ static int __net_init tipc_init_net(struct net *net) | |||
58 | int err; | 57 | int err; |
59 | 58 | ||
60 | tn->net_id = 4711; | 59 | tn->net_id = 4711; |
60 | tn->own_addr = 0; | ||
61 | INIT_LIST_HEAD(&tn->node_list); | 61 | INIT_LIST_HEAD(&tn->node_list); |
62 | spin_lock_init(&tn->node_list_lock); | 62 | spin_lock_init(&tn->node_list_lock); |
63 | 63 | ||
@@ -96,8 +96,6 @@ static int __init tipc_init(void) | |||
96 | 96 | ||
97 | pr_info("Activated (version " TIPC_MOD_VER ")\n"); | 97 | pr_info("Activated (version " TIPC_MOD_VER ")\n"); |
98 | 98 | ||
99 | tipc_own_addr = 0; | ||
100 | |||
101 | sysctl_tipc_rmem[0] = TIPC_CONN_OVERLOAD_LIMIT >> 4 << | 99 | sysctl_tipc_rmem[0] = TIPC_CONN_OVERLOAD_LIMIT >> 4 << |
102 | TIPC_LOW_IMPORTANCE; | 100 | TIPC_LOW_IMPORTANCE; |
103 | sysctl_tipc_rmem[1] = TIPC_CONN_OVERLOAD_LIMIT >> 4 << | 101 | sysctl_tipc_rmem[1] = TIPC_CONN_OVERLOAD_LIMIT >> 4 << |