.. | .. |
---|
93 | 93 | * @raw2addr: convert from raw addr format to media addr format |
---|
94 | 94 | * @priority: default link (and bearer) priority |
---|
95 | 95 | * @tolerance: default time (in ms) before declaring link failure |
---|
96 | | - * @window: default window (in packets) before declaring link congestion |
---|
| 96 | + * @min_win: minimum window (in packets) before declaring link congestion |
---|
| 97 | + * @max_win: maximum window (in packets) before declaring link congestion |
---|
97 | 98 | * @mtu: max packet size bearer can support for media type not dependent on |
---|
98 | 99 | * underlying device MTU |
---|
99 | 100 | * @type_id: TIPC media identifier |
---|
.. | .. |
---|
119 | 120 | char *raw); |
---|
120 | 121 | u32 priority; |
---|
121 | 122 | u32 tolerance; |
---|
122 | | - u32 window; |
---|
| 123 | + u32 min_win; |
---|
| 124 | + u32 max_win; |
---|
123 | 125 | u32 mtu; |
---|
124 | 126 | u32 type_id; |
---|
125 | 127 | u32 hwaddr_len; |
---|
.. | .. |
---|
137 | 139 | * @pt: packet type for bearer |
---|
138 | 140 | * @rcu: rcu struct for tipc_bearer |
---|
139 | 141 | * @priority: default link priority for bearer |
---|
140 | | - * @window: default window size for bearer |
---|
| 142 | + * @min_win: minimum window (in packets) before declaring link congestion |
---|
| 143 | + * @max_win: maximum window (in packets) before declaring link congestion |
---|
141 | 144 | * @tolerance: default link tolerance for bearer |
---|
142 | 145 | * @domain: network domain to which links can be established |
---|
143 | 146 | * @identity: array index of this bearer within TIPC bearer array |
---|
144 | | - * @link_req: ptr to (optional) structure making periodic link setup requests |
---|
| 147 | + * @disc: ptr to link setup request |
---|
145 | 148 | * @net_plane: network plane ('A' through 'H') currently associated with bearer |
---|
| 149 | + * @up: bearer up flag (bit 0) |
---|
| 150 | + * @refcnt: tipc_bearer reference counter |
---|
146 | 151 | * |
---|
147 | 152 | * Note: media-specific code is responsible for initialization of the fields |
---|
148 | 153 | * indicated below when a bearer is enabled; TIPC's generic bearer code takes |
---|
.. | .. |
---|
158 | 163 | struct packet_type pt; |
---|
159 | 164 | struct rcu_head rcu; |
---|
160 | 165 | u32 priority; |
---|
161 | | - u32 window; |
---|
| 166 | + u32 min_win; |
---|
| 167 | + u32 max_win; |
---|
162 | 168 | u32 tolerance; |
---|
163 | 169 | u32 domain; |
---|
164 | 170 | u32 identity; |
---|
165 | 171 | struct tipc_discoverer *disc; |
---|
166 | 172 | char net_plane; |
---|
167 | 173 | unsigned long up; |
---|
| 174 | + refcount_t refcnt; |
---|
168 | 175 | }; |
---|
169 | 176 | |
---|
170 | 177 | struct tipc_bearer_names { |
---|
.. | .. |
---|
207 | 214 | |
---|
208 | 215 | int tipc_media_set_priority(const char *name, u32 new_value); |
---|
209 | 216 | int tipc_media_set_window(const char *name, u32 new_value); |
---|
210 | | -void tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a); |
---|
| 217 | +int tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a); |
---|
211 | 218 | int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b, |
---|
212 | 219 | struct nlattr *attrs[]); |
---|
| 220 | +bool tipc_bearer_hold(struct tipc_bearer *b); |
---|
| 221 | +void tipc_bearer_put(struct tipc_bearer *b); |
---|
213 | 222 | void tipc_disable_l2_media(struct tipc_bearer *b); |
---|
214 | 223 | int tipc_l2_send_msg(struct net *net, struct sk_buff *buf, |
---|
215 | 224 | struct tipc_bearer *b, struct tipc_media_addr *dest); |
---|
.. | .. |
---|
229 | 238 | struct tipc_media_addr *dest); |
---|
230 | 239 | void tipc_bearer_xmit(struct net *net, u32 bearer_id, |
---|
231 | 240 | struct sk_buff_head *xmitq, |
---|
232 | | - struct tipc_media_addr *dst); |
---|
| 241 | + struct tipc_media_addr *dst, |
---|
| 242 | + struct tipc_node *__dnode); |
---|
233 | 243 | void tipc_bearer_bc_xmit(struct net *net, u32 bearer_id, |
---|
234 | 244 | struct sk_buff_head *xmitq); |
---|
| 245 | +void tipc_clone_to_loopback(struct net *net, struct sk_buff_head *pkts); |
---|
| 246 | +int tipc_attach_loopback(struct net *net); |
---|
| 247 | +void tipc_detach_loopback(struct net *net); |
---|
| 248 | + |
---|
| 249 | +static inline void tipc_loopback_trace(struct net *net, |
---|
| 250 | + struct sk_buff_head *pkts) |
---|
| 251 | +{ |
---|
| 252 | + if (unlikely(dev_nit_active(net->loopback_dev))) |
---|
| 253 | + tipc_clone_to_loopback(net, pkts); |
---|
| 254 | +} |
---|
235 | 255 | |
---|
236 | 256 | /* check if device MTU is too low for tipc headers */ |
---|
237 | 257 | static inline bool tipc_mtu_bad(struct net_device *dev, unsigned int reserve) |
---|