diff options
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r-- | net/tipc/bearer.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index ca5734892713..a850b389663e 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h | |||
@@ -114,7 +114,7 @@ struct bearer_name { | |||
114 | 114 | ||
115 | struct link; | 115 | struct link; |
116 | 116 | ||
117 | extern struct bearer *tipc_bearers; | 117 | extern struct bearer tipc_bearers[]; |
118 | 118 | ||
119 | void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a); | 119 | void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a); |
120 | struct sk_buff *tipc_media_get_names(void); | 120 | struct sk_buff *tipc_media_get_names(void); |
@@ -125,6 +125,7 @@ void tipc_bearer_remove_dest(struct bearer *b_ptr, u32 dest); | |||
125 | void tipc_bearer_schedule(struct bearer *b_ptr, struct link *l_ptr); | 125 | void tipc_bearer_schedule(struct bearer *b_ptr, struct link *l_ptr); |
126 | struct bearer *tipc_bearer_find_interface(const char *if_name); | 126 | struct bearer *tipc_bearer_find_interface(const char *if_name); |
127 | int tipc_bearer_resolve_congestion(struct bearer *b_ptr, struct link *l_ptr); | 127 | int tipc_bearer_resolve_congestion(struct bearer *b_ptr, struct link *l_ptr); |
128 | int tipc_bearer_congested(struct bearer *b_ptr, struct link *l_ptr); | ||
128 | int tipc_bearer_init(void); | 129 | int tipc_bearer_init(void); |
129 | void tipc_bearer_stop(void); | 130 | void tipc_bearer_stop(void); |
130 | void tipc_bearer_lock_push(struct bearer *b_ptr); | 131 | void tipc_bearer_lock_push(struct bearer *b_ptr); |
@@ -154,17 +155,4 @@ static inline int tipc_bearer_send(struct bearer *b_ptr, struct sk_buff *buf, | |||
154 | return !b_ptr->media->send_msg(buf, &b_ptr->publ, dest); | 155 | return !b_ptr->media->send_msg(buf, &b_ptr->publ, dest); |
155 | } | 156 | } |
156 | 157 | ||
157 | /** | 158 | #endif /* _TIPC_BEARER_H */ |
158 | * tipc_bearer_congested - determines if bearer is currently congested | ||
159 | */ | ||
160 | |||
161 | static inline int tipc_bearer_congested(struct bearer *b_ptr, struct link *l_ptr) | ||
162 | { | ||
163 | if (unlikely(b_ptr->publ.blocked)) | ||
164 | return 1; | ||
165 | if (likely(list_empty(&b_ptr->cong_links))) | ||
166 | return 0; | ||
167 | return !tipc_bearer_resolve_congestion(b_ptr, l_ptr); | ||
168 | } | ||
169 | |||
170 | #endif | ||