summaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 18:59:17 +0000
committerDavid S. Miller <davem@davemloft.net>2011-01-01 13:57:48 -0800
commit08c80e9a031df0a8f0269477a32f5eae47d7a146 (patch)
tree87a20adf19603edfafabc0b138a2992a0cbe6481 /net/tipc/node.c
parent51f98a8d70583b18cb08b19353aeed5efb0244af (diff)
downloadblackbird-op-linux-08c80e9a031df0a8f0269477a32f5eae47d7a146.tar.gz
blackbird-op-linux-08c80e9a031df0a8f0269477a32f5eae47d7a146.zip
tipc: Remove prototype code for supporting slave nodes
Simplifies routines and data structures that were intended to allow TIPC to support slave nodes (i.e. nodes that did not have links to all of the other nodes in its cluster, forcing TIPC to route messages that it could not deliver directly through a non-slave node). Currently, TIPC supports only networks containing non-slave nodes, so this code is unnecessary. Note: The latest edition of the TIPC 2.0 Specification has eliminated the concept of slave nodes entirely. 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/node.c')
-rw-r--r--net/tipc/node.c59
1 files changed, 14 insertions, 45 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index c20bd851a44a..8ffbdb33b2cb 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -333,8 +333,6 @@ static void node_established_contact(struct tipc_node *n_ptr)
/* Syncronize broadcast acks */
n_ptr->bclink.acked = tipc_bclink_get_last_sent();
- if (is_slave(tipc_own_addr))
- return;
if (!in_own_cluster(n_ptr->addr)) {
/* Usage case 1 (see above) */
c_ptr = tipc_cltr_find(tipc_own_addr);
@@ -347,13 +345,6 @@ static void node_established_contact(struct tipc_node *n_ptr)
}
c_ptr = n_ptr->owner;
- if (is_slave(n_ptr->addr)) {
- /* Usage case 2 (see above) */
- tipc_cltr_bcast_new_route(c_ptr, n_ptr->addr, 1, tipc_max_nodes);
- tipc_cltr_send_local_routes(c_ptr, n_ptr->addr);
- return;
- }
-
if (n_ptr->bclink.supported) {
tipc_nmap_add(&tipc_cltr_bcast_nodes, n_ptr->addr);
if (n_ptr->addr < tipc_own_addr)
@@ -362,9 +353,6 @@ static void node_established_contact(struct tipc_node *n_ptr)
/* Case 3 (see above) */
tipc_net_send_external_routes(n_ptr->addr);
- tipc_cltr_send_slave_routes(c_ptr, n_ptr->addr);
- tipc_cltr_bcast_new_route(c_ptr, n_ptr->addr, LOWEST_SLAVE,
- tipc_highest_allowed_slave);
}
static void node_cleanup_finished(unsigned long node_addr)
@@ -404,33 +392,20 @@ static void node_lost_contact(struct tipc_node *n_ptr)
}
/* Update routing tables */
- if (is_slave(tipc_own_addr)) {
- tipc_net_remove_as_router(n_ptr->addr);
+ if (!in_own_cluster(n_ptr->addr)) {
+ /* Case 4 (see above) */
+ c_ptr = tipc_cltr_find(tipc_own_addr);
+ tipc_cltr_bcast_lost_route(c_ptr, n_ptr->addr, 1,
+ tipc_max_nodes);
} else {
- if (!in_own_cluster(n_ptr->addr)) {
- /* Case 4 (see above) */
- c_ptr = tipc_cltr_find(tipc_own_addr);
- tipc_cltr_bcast_lost_route(c_ptr, n_ptr->addr, 1,
- tipc_max_nodes);
- } else {
- /* Case 5 (see above) */
- c_ptr = tipc_cltr_find(n_ptr->addr);
- if (is_slave(n_ptr->addr)) {
- tipc_cltr_bcast_lost_route(c_ptr, n_ptr->addr, 1,
- tipc_max_nodes);
- } else {
- if (n_ptr->bclink.supported) {
- tipc_nmap_remove(&tipc_cltr_bcast_nodes,
- n_ptr->addr);
- if (n_ptr->addr < tipc_own_addr)
- tipc_own_tag--;
- }
- tipc_net_remove_as_router(n_ptr->addr);
- tipc_cltr_bcast_lost_route(c_ptr, n_ptr->addr,
- LOWEST_SLAVE,
- tipc_highest_allowed_slave);
- }
+ /* Case 5 (see above) */
+ c_ptr = tipc_cltr_find(n_ptr->addr);
+ if (n_ptr->bclink.supported) {
+ tipc_nmap_remove(&tipc_cltr_bcast_nodes, n_ptr->addr);
+ if (n_ptr->addr < tipc_own_addr)
+ tipc_own_tag--;
}
+ tipc_net_remove_as_router(n_ptr->addr);
}
if (tipc_node_has_active_routes(n_ptr))
return;
@@ -482,7 +457,7 @@ struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector)
return n_ptr;
/* Cluster local system nodes *must* have direct links */
- if (!is_slave(addr) && in_own_cluster(addr))
+ if (in_own_cluster(addr))
return NULL;
/* Look for cluster local router with direct link to node */
@@ -490,11 +465,6 @@ struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector)
if (router_addr)
return tipc_node_select(router_addr, selector);
- /* Slave nodes can only be accessed within own cluster via a
- known router with direct link -- if no router was found,give up */
- if (is_slave(addr))
- return NULL;
-
/* Inter zone/cluster -- find any direct link to remote cluster */
addr = tipc_addr(tipc_zone(addr), tipc_cluster(addr), 0);
n_ptr = tipc_net_select_remote_node(addr, selector);
@@ -603,8 +573,7 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space)
return tipc_cfg_reply_none();
}
- /* For now, get space for all other nodes
- (will need to modify this when slave nodes are supported */
+ /* For now, get space for all other nodes */
payload_size = TLV_SPACE(sizeof(node_info)) * (tipc_max_nodes - 1);
if (payload_size > 32768u) {
OpenPOWER on IntegriCloud