aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 76565c9916a..d4fd341e6e0 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -66,7 +66,6 @@ static unsigned int tipc_hashfn(u32 addr)
66/* 66/*
67 * tipc_node_find - locate specified node object, if it exists 67 * tipc_node_find - locate specified node object, if it exists
68 */ 68 */
69
70struct tipc_node *tipc_node_find(u32 addr) 69struct tipc_node *tipc_node_find(u32 addr)
71{ 70{
72 struct tipc_node *node; 71 struct tipc_node *node;
@@ -91,7 +90,6 @@ struct tipc_node *tipc_node_find(u32 addr)
91 * time. (It would be preferable to switch to holding net_lock in write mode, 90 * time. (It would be preferable to switch to holding net_lock in write mode,
92 * but this is a non-trivial change.) 91 * but this is a non-trivial change.)
93 */ 92 */
94
95struct tipc_node *tipc_node_create(u32 addr) 93struct tipc_node *tipc_node_create(u32 addr)
96{ 94{
97 struct tipc_node *n_ptr, *temp_node; 95 struct tipc_node *n_ptr, *temp_node;
@@ -142,13 +140,11 @@ void tipc_node_delete(struct tipc_node *n_ptr)
142 tipc_num_nodes--; 140 tipc_num_nodes--;
143} 141}
144 142
145
146/** 143/**
147 * tipc_node_link_up - handle addition of link 144 * tipc_node_link_up - handle addition of link
148 * 145 *
149 * Link becomes active (alone or shared) or standby, depending on its priority. 146 * Link becomes active (alone or shared) or standby, depending on its priority.
150 */ 147 */
151
152void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr) 148void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
153{ 149{
154 struct tipc_link **active = &n_ptr->active_links[0]; 150 struct tipc_link **active = &n_ptr->active_links[0];
@@ -181,7 +177,6 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
181/** 177/**
182 * node_select_active_links - select active link 178 * node_select_active_links - select active link
183 */ 179 */
184
185static void node_select_active_links(struct tipc_node *n_ptr) 180static void node_select_active_links(struct tipc_node *n_ptr)
186{ 181{
187 struct tipc_link **active = &n_ptr->active_links[0]; 182 struct tipc_link **active = &n_ptr->active_links[0];
@@ -209,7 +204,6 @@ static void node_select_active_links(struct tipc_node *n_ptr)
209/** 204/**
210 * tipc_node_link_down - handle loss of link 205 * tipc_node_link_down - handle loss of link
211 */ 206 */
212
213void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr) 207void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
214{ 208{
215 struct tipc_link **active; 209 struct tipc_link **active;
@@ -300,7 +294,6 @@ static void node_lost_contact(struct tipc_node *n_ptr)
300 tipc_addr_string_fill(addr_string, n_ptr->addr)); 294 tipc_addr_string_fill(addr_string, n_ptr->addr));
301 295
302 /* Flush broadcast link info associated with lost node */ 296 /* Flush broadcast link info associated with lost node */
303
304 if (n_ptr->bclink.supported) { 297 if (n_ptr->bclink.supported) {
305 while (n_ptr->bclink.deferred_head) { 298 while (n_ptr->bclink.deferred_head) {
306 struct sk_buff *buf = n_ptr->bclink.deferred_head; 299 struct sk_buff *buf = n_ptr->bclink.deferred_head;
@@ -334,7 +327,6 @@ static void node_lost_contact(struct tipc_node *n_ptr)
334 tipc_nodesub_notify(n_ptr); 327 tipc_nodesub_notify(n_ptr);
335 328
336 /* Prevent re-contact with node until cleanup is done */ 329 /* Prevent re-contact with node until cleanup is done */
337
338 n_ptr->block_setup = WAIT_PEER_DOWN | WAIT_NAMES_GONE; 330 n_ptr->block_setup = WAIT_PEER_DOWN | WAIT_NAMES_GONE;
339 tipc_k_signal((Handler)node_name_purge_complete, n_ptr->addr); 331 tipc_k_signal((Handler)node_name_purge_complete, n_ptr->addr);
340} 332}
@@ -362,7 +354,6 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space)
362 } 354 }
363 355
364 /* For now, get space for all other nodes */ 356 /* For now, get space for all other nodes */
365
366 payload_size = TLV_SPACE(sizeof(node_info)) * tipc_num_nodes; 357 payload_size = TLV_SPACE(sizeof(node_info)) * tipc_num_nodes;
367 if (payload_size > 32768u) { 358 if (payload_size > 32768u) {
368 read_unlock_bh(&tipc_net_lock); 359 read_unlock_bh(&tipc_net_lock);
@@ -376,7 +367,6 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space)
376 } 367 }
377 368
378 /* Add TLVs for all nodes in scope */ 369 /* Add TLVs for all nodes in scope */
379
380 list_for_each_entry(n_ptr, &tipc_node_list, list) { 370 list_for_each_entry(n_ptr, &tipc_node_list, list) {
381 if (!tipc_in_scope(domain, n_ptr->addr)) 371 if (!tipc_in_scope(domain, n_ptr->addr))
382 continue; 372 continue;
@@ -412,7 +402,6 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space)
412 read_lock_bh(&tipc_net_lock); 402 read_lock_bh(&tipc_net_lock);
413 403
414 /* Get space for all unicast links + broadcast link */ 404 /* Get space for all unicast links + broadcast link */
415
416 payload_size = TLV_SPACE(sizeof(link_info)) * 405 payload_size = TLV_SPACE(sizeof(link_info)) *
417 (atomic_read(&tipc_num_links) + 1); 406 (atomic_read(&tipc_num_links) + 1);
418 if (payload_size > 32768u) { 407 if (payload_size > 32768u) {
@@ -427,14 +416,12 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space)
427 } 416 }
428 417
429 /* Add TLV for broadcast link */ 418 /* Add TLV for broadcast link */
430
431 link_info.dest = htonl(tipc_cluster_mask(tipc_own_addr)); 419 link_info.dest = htonl(tipc_cluster_mask(tipc_own_addr));
432 link_info.up = htonl(1); 420 link_info.up = htonl(1);
433 strlcpy(link_info.str, tipc_bclink_name, TIPC_MAX_LINK_NAME); 421 strlcpy(link_info.str, tipc_bclink_name, TIPC_MAX_LINK_NAME);
434 tipc_cfg_append_tlv(buf, TIPC_TLV_LINK_INFO, &link_info, sizeof(link_info)); 422 tipc_cfg_append_tlv(buf, TIPC_TLV_LINK_INFO, &link_info, sizeof(link_info));
435 423
436 /* Add TLVs for any other links in scope */ 424 /* Add TLVs for any other links in scope */
437
438 list_for_each_entry(n_ptr, &tipc_node_list, list) { 425 list_for_each_entry(n_ptr, &tipc_node_list, list) {
439 u32 i; 426 u32 i;
440 427