diff options
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r-- | net/tipc/bearer.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index dd4c2abf08e7..39f1192d04bf 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h | |||
@@ -120,7 +120,6 @@ struct tipc_media { | |||
120 | * @identity: array index of this bearer within TIPC bearer array | 120 | * @identity: array index of this bearer within TIPC bearer array |
121 | * @link_req: ptr to (optional) structure making periodic link setup requests | 121 | * @link_req: ptr to (optional) structure making periodic link setup requests |
122 | * @links: list of non-congested links associated with bearer | 122 | * @links: list of non-congested links associated with bearer |
123 | * @cong_links: list of congested links associated with bearer | ||
124 | * @active: non-zero if bearer structure is represents a bearer | 123 | * @active: non-zero if bearer structure is represents a bearer |
125 | * @net_plane: network plane ('A' through 'H') currently associated with bearer | 124 | * @net_plane: network plane ('A' through 'H') currently associated with bearer |
126 | * @nodes: indicates which nodes in cluster can be reached through bearer | 125 | * @nodes: indicates which nodes in cluster can be reached through bearer |
@@ -143,7 +142,6 @@ struct tipc_bearer { | |||
143 | u32 identity; | 142 | u32 identity; |
144 | struct tipc_link_req *link_req; | 143 | struct tipc_link_req *link_req; |
145 | struct list_head links; | 144 | struct list_head links; |
146 | struct list_head cong_links; | ||
147 | int active; | 145 | int active; |
148 | char net_plane; | 146 | char net_plane; |
149 | struct tipc_node_map nodes; | 147 | struct tipc_node_map nodes; |
@@ -185,39 +183,23 @@ struct sk_buff *tipc_media_get_names(void); | |||
185 | struct sk_buff *tipc_bearer_get_names(void); | 183 | struct sk_buff *tipc_bearer_get_names(void); |
186 | void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest); | 184 | void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest); |
187 | void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest); | 185 | void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest); |
188 | void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr); | ||
189 | struct tipc_bearer *tipc_bearer_find(const char *name); | 186 | struct tipc_bearer *tipc_bearer_find(const char *name); |
190 | struct tipc_bearer *tipc_bearer_find_interface(const char *if_name); | 187 | struct tipc_bearer *tipc_bearer_find_interface(const char *if_name); |
191 | struct tipc_media *tipc_media_find(const char *name); | 188 | struct tipc_media *tipc_media_find(const char *name); |
192 | int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, | 189 | int tipc_bearer_blocked(struct tipc_bearer *b_ptr); |
193 | struct tipc_link *l_ptr); | ||
194 | int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr); | ||
195 | void tipc_bearer_stop(void); | 190 | void tipc_bearer_stop(void); |
196 | void tipc_bearer_lock_push(struct tipc_bearer *b_ptr); | ||
197 | |||
198 | 191 | ||
199 | /** | 192 | /** |
200 | * tipc_bearer_send- sends buffer to destination over bearer | 193 | * tipc_bearer_send- sends buffer to destination over bearer |
201 | * | 194 | * |
202 | * Returns true (1) if successful, or false (0) if unable to send | ||
203 | * | ||
204 | * IMPORTANT: | 195 | * IMPORTANT: |
205 | * The media send routine must not alter the buffer being passed in | 196 | * The media send routine must not alter the buffer being passed in |
206 | * as it may be needed for later retransmission! | 197 | * as it may be needed for later retransmission! |
207 | * | ||
208 | * If the media send routine returns a non-zero value (indicating that | ||
209 | * it was unable to send the buffer), it must: | ||
210 | * 1) mark the bearer as blocked, | ||
211 | * 2) call tipc_continue() once the bearer is able to send again. | ||
212 | * Media types that are unable to meet these two critera must ensure their | ||
213 | * send routine always returns success -- even if the buffer was not sent -- | ||
214 | * and let TIPC's link code deal with the undelivered message. | ||
215 | */ | 198 | */ |
216 | static inline int tipc_bearer_send(struct tipc_bearer *b_ptr, | 199 | static inline void tipc_bearer_send(struct tipc_bearer *b, struct sk_buff *buf, |
217 | struct sk_buff *buf, | ||
218 | struct tipc_media_addr *dest) | 200 | struct tipc_media_addr *dest) |
219 | { | 201 | { |
220 | return !b_ptr->media->send_msg(buf, b_ptr, dest); | 202 | b->media->send_msg(buf, b, dest); |
221 | } | 203 | } |
222 | 204 | ||
223 | #endif /* _TIPC_BEARER_H */ | 205 | #endif /* _TIPC_BEARER_H */ |