diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2010-12-31 13:59:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-01 16:57:47 -0500 |
commit | 51f98a8d70583b18cb08b19353aeed5efb0244af (patch) | |
tree | 96253d3cb394202b442e65f4d169bbf49b94c327 /net/tipc/net.c | |
parent | aa6027cacdd912ce884953714fcc7392b6155bc6 (diff) |
tipc: Remove prototype code for supporting multiple zones
Eliminates routines, data structures, and files that were intended
to allows TIPC to support a network containing multiple zones.
Currently, TIPC supports only networks consisting of a single cluster
within a single zone, so this code is unnecessary.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r-- | net/tipc/net.c | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c index c2b4b86c2e6a..a25f8bb1e1d9 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -36,7 +36,6 @@ | |||
36 | 36 | ||
37 | #include "core.h" | 37 | #include "core.h" |
38 | #include "net.h" | 38 | #include "net.h" |
39 | #include "zone.h" | ||
40 | #include "name_table.h" | 39 | #include "name_table.h" |
41 | #include "name_distr.h" | 40 | #include "name_distr.h" |
42 | #include "subscr.h" | 41 | #include "subscr.h" |
@@ -111,46 +110,56 @@ | |||
111 | */ | 110 | */ |
112 | 111 | ||
113 | DEFINE_RWLOCK(tipc_net_lock); | 112 | DEFINE_RWLOCK(tipc_net_lock); |
114 | static struct _zone *tipc_zones[256] = { NULL, }; | 113 | struct network tipc_net; |
115 | struct network tipc_net = { tipc_zones }; | ||
116 | 114 | ||
117 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) | 115 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) |
118 | { | 116 | { |
119 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); | 117 | struct cluster *c_ptr; |
118 | |||
119 | c_ptr = tipc_net.clusters[1]; | ||
120 | if (!c_ptr) | ||
121 | return NULL; | ||
122 | return tipc_cltr_select_node(c_ptr, ref); | ||
120 | } | 123 | } |
121 | 124 | ||
122 | u32 tipc_net_select_router(u32 addr, u32 ref) | 125 | u32 tipc_net_select_router(u32 addr, u32 ref) |
123 | { | 126 | { |
124 | return tipc_zone_select_router(tipc_net.zones[tipc_zone(addr)], addr, ref); | 127 | struct cluster *c_ptr; |
128 | |||
129 | c_ptr = tipc_net.clusters[1]; | ||
130 | if (!c_ptr) | ||
131 | return 0; | ||
132 | return tipc_cltr_select_router(c_ptr, ref); | ||
125 | } | 133 | } |
126 | 134 | ||
127 | void tipc_net_remove_as_router(u32 router) | 135 | void tipc_net_remove_as_router(u32 router) |
128 | { | 136 | { |
129 | u32 z_num; | 137 | u32 c_num; |
130 | 138 | ||
131 | for (z_num = 1; z_num <= tipc_max_zones; z_num++) { | 139 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { |
132 | if (!tipc_net.zones[z_num]) | 140 | if (!tipc_net.clusters[c_num]) |
133 | continue; | 141 | continue; |
134 | tipc_zone_remove_as_router(tipc_net.zones[z_num], router); | 142 | tipc_cltr_remove_as_router(tipc_net.clusters[c_num], router); |
135 | } | 143 | } |
136 | } | 144 | } |
137 | 145 | ||
138 | void tipc_net_send_external_routes(u32 dest) | 146 | void tipc_net_send_external_routes(u32 dest) |
139 | { | 147 | { |
140 | u32 z_num; | 148 | u32 c_num; |
141 | 149 | ||
142 | for (z_num = 1; z_num <= tipc_max_zones; z_num++) { | 150 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) { |
143 | if (tipc_net.zones[z_num]) | 151 | if (tipc_net.clusters[c_num]) |
144 | tipc_zone_send_external_routes(tipc_net.zones[z_num], dest); | 152 | tipc_cltr_send_ext_routes(tipc_net.clusters[c_num], |
153 | dest); | ||
145 | } | 154 | } |
146 | } | 155 | } |
147 | 156 | ||
148 | static void net_stop(void) | 157 | static void net_stop(void) |
149 | { | 158 | { |
150 | u32 z_num; | 159 | u32 c_num; |
151 | 160 | ||
152 | for (z_num = 1; z_num <= tipc_max_zones; z_num++) | 161 | for (c_num = 1; c_num <= tipc_max_clusters; c_num++) |
153 | tipc_zone_delete(tipc_net.zones[z_num]); | 162 | tipc_cltr_delete(tipc_net.clusters[c_num]); |
154 | } | 163 | } |
155 | 164 | ||
156 | static void net_route_named_msg(struct sk_buff *buf) | 165 | static void net_route_named_msg(struct sk_buff *buf) |