diff options
author | Patrick McHardy <kaber@trash.net> | 2011-01-14 08:12:37 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-01-14 08:12:37 -0500 |
commit | 0134e89c7bcc9fde1da962c82a120691e185619f (patch) | |
tree | 3e03335cf001019a2687d161e956de4f73379984 /net/tipc/node.h | |
parent | c7066f70d9610df0b9406cc635fc09e86136e714 (diff) | |
parent | 6faee60a4e82075853a437831768cc9e2e563e4e (diff) |
Merge branch 'master' of git://1984.lsi.us.es/net-next-2.6
Conflicts:
net/ipv4/route.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/tipc/node.h')
-rw-r--r-- | net/tipc/node.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h index fff331b2d26c..206a8efa410e 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
@@ -39,14 +39,13 @@ | |||
39 | 39 | ||
40 | #include "node_subscr.h" | 40 | #include "node_subscr.h" |
41 | #include "addr.h" | 41 | #include "addr.h" |
42 | #include "cluster.h" | 42 | #include "net.h" |
43 | #include "bearer.h" | 43 | #include "bearer.h" |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * struct tipc_node - TIPC node structure | 46 | * struct tipc_node - TIPC node structure |
47 | * @addr: network address of node | 47 | * @addr: network address of node |
48 | * @lock: spinlock governing access to structure | 48 | * @lock: spinlock governing access to structure |
49 | * @owner: pointer to cluster that node belongs to | ||
50 | * @next: pointer to next node in sorted list of cluster's nodes | 49 | * @next: pointer to next node in sorted list of cluster's nodes |
51 | * @nsub: list of "node down" subscriptions monitoring node | 50 | * @nsub: list of "node down" subscriptions monitoring node |
52 | * @active_links: pointers to active links to node | 51 | * @active_links: pointers to active links to node |
@@ -55,8 +54,6 @@ | |||
55 | * @cleanup_required: non-zero if cleaning up after a prior loss of contact | 54 | * @cleanup_required: non-zero if cleaning up after a prior loss of contact |
56 | * @link_cnt: number of links to node | 55 | * @link_cnt: number of links to node |
57 | * @permit_changeover: non-zero if node has redundant links to this system | 56 | * @permit_changeover: non-zero if node has redundant links to this system |
58 | * @routers: bitmap (used for multicluster communication) | ||
59 | * @last_router: (used for multicluster communication) | ||
60 | * @bclink: broadcast-related info | 57 | * @bclink: broadcast-related info |
61 | * @supported: non-zero if node supports TIPC b'cast capability | 58 | * @supported: non-zero if node supports TIPC b'cast capability |
62 | * @acked: sequence # of last outbound b'cast message acknowledged by node | 59 | * @acked: sequence # of last outbound b'cast message acknowledged by node |
@@ -72,7 +69,6 @@ | |||
72 | struct tipc_node { | 69 | struct tipc_node { |
73 | u32 addr; | 70 | u32 addr; |
74 | spinlock_t lock; | 71 | spinlock_t lock; |
75 | struct cluster *owner; | ||
76 | struct tipc_node *next; | 72 | struct tipc_node *next; |
77 | struct list_head nsub; | 73 | struct list_head nsub; |
78 | struct link *active_links[2]; | 74 | struct link *active_links[2]; |
@@ -81,8 +77,6 @@ struct tipc_node { | |||
81 | int working_links; | 77 | int working_links; |
82 | int cleanup_required; | 78 | int cleanup_required; |
83 | int permit_changeover; | 79 | int permit_changeover; |
84 | u32 routers[512/32]; | ||
85 | int last_router; | ||
86 | struct { | 80 | struct { |
87 | int supported; | 81 | int supported; |
88 | u32 acked; | 82 | u32 acked; |
@@ -106,34 +100,17 @@ void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr); | |||
106 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); | 100 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); |
107 | int tipc_node_has_active_links(struct tipc_node *n_ptr); | 101 | int tipc_node_has_active_links(struct tipc_node *n_ptr); |
108 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr); | 102 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr); |
109 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref); | ||
110 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector); | ||
111 | int tipc_node_is_up(struct tipc_node *n_ptr); | 103 | int tipc_node_is_up(struct tipc_node *n_ptr); |
112 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router); | ||
113 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router); | ||
114 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); | 104 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); |
115 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); | 105 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); |
116 | 106 | ||
117 | static inline struct tipc_node *tipc_node_find(u32 addr) | 107 | static inline struct tipc_node *tipc_node_find(u32 addr) |
118 | { | 108 | { |
119 | if (likely(in_own_cluster(addr))) | 109 | if (likely(in_own_cluster(addr))) |
120 | return tipc_local_nodes[tipc_node(addr)]; | 110 | return tipc_net.nodes[tipc_node(addr)]; |
121 | else if (tipc_addr_domain_valid(addr)) { | ||
122 | struct cluster *c_ptr = tipc_cltr_find(addr); | ||
123 | |||
124 | if (c_ptr) | ||
125 | return c_ptr->nodes[tipc_node(addr)]; | ||
126 | } | ||
127 | return NULL; | 111 | return NULL; |
128 | } | 112 | } |
129 | 113 | ||
130 | static inline struct tipc_node *tipc_node_select(u32 addr, u32 selector) | ||
131 | { | ||
132 | if (likely(in_own_cluster(addr))) | ||
133 | return tipc_local_nodes[tipc_node(addr)]; | ||
134 | return tipc_node_select_next_hop(addr, selector); | ||
135 | } | ||
136 | |||
137 | static inline void tipc_node_lock(struct tipc_node *n_ptr) | 114 | static inline void tipc_node_lock(struct tipc_node *n_ptr) |
138 | { | 115 | { |
139 | spin_lock_bh(&n_ptr->lock); | 116 | spin_lock_bh(&n_ptr->lock); |