diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-06 15:30:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-06 15:30:19 -0500 |
commit | abb359450f20c32ae03039d8736f12b1d561caf5 (patch) | |
tree | 6e8723885feb66a138f19f0ff31615dc13a8d859 /net/tipc/node.h | |
parent | cb600d2f83c854ec3d6660063e4466431999489b (diff) | |
parent | 4e3dbdb1392a83bd21a6ff8f6bc785495058d37c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1436 commits)
cassini: Use local-mac-address prom property for Cassini MAC address
net: remove the duplicate #ifdef __KERNEL__
net: bridge: check the length of skb after nf_bridge_maybe_copy_header()
netconsole: clarify stopping message
netconsole: don't announce stopping if nothing happened
cnic: Fix the type field in SPQ messages
netfilter: fix export secctx error handling
netfilter: fix the race when initializing nf_ct_expect_hash_rnd
ipv4: IP defragmentation must be ECN aware
net: r6040: Return proper error for r6040_init_one
dcb: use after free in dcb_flushapp()
dcb: unlock on error in dcbnl_ieee_get()
net: ixp4xx_eth: Return proper error for eth_init_one
include/linux/if_ether.h: Add #define ETH_P_LINK_CTL for HPNA and wlan local tunnel
net: add POLLPRI to sock_def_readable()
af_unix: Avoid socket->sk NULL OOPS in stream connect security hooks.
net_sched: pfifo_head_drop problem
mac80211: remove stray extern
mac80211: implement off-channel TX using hw r-o-c offload
mac80211: implement hardware offload for remain-on-channel
...
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); |