aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/link.h')
-rw-r--r--net/tipc/link.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h
index 7aeb52092bf3..b5b4e3554d4e 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -58,8 +58,10 @@
58 58
59/* Link endpoint execution states 59/* Link endpoint execution states
60 */ 60 */
61#define LINK_STARTED 0x0001 61#define LINK_STARTED 0x0001
62#define LINK_STOPPED 0x0002 62#define LINK_STOPPED 0x0002
63#define LINK_SYNCHING 0x0004
64#define LINK_FAILINGOVER 0x0008
63 65
64/* Starting value for maximum packet size negotiation on unicast links 66/* Starting value for maximum packet size negotiation on unicast links
65 * (unless bearer MTU is less) 67 * (unless bearer MTU is less)
@@ -118,13 +120,13 @@ struct tipc_stats {
118 * @pmsg: convenience pointer to "proto_msg" field 120 * @pmsg: convenience pointer to "proto_msg" field
119 * @priority: current link priority 121 * @priority: current link priority
120 * @net_plane: current link network plane ('A' through 'H') 122 * @net_plane: current link network plane ('A' through 'H')
121 * @queue_limit: outbound message queue congestion thresholds (indexed by user) 123 * @backlog_limit: backlog queue congestion thresholds (indexed by importance)
122 * @exp_msg_count: # of tunnelled messages expected during link changeover 124 * @exp_msg_count: # of tunnelled messages expected during link changeover
123 * @reset_checkpoint: seq # of last acknowledged message at time of link reset 125 * @reset_checkpoint: seq # of last acknowledged message at time of link reset
124 * @max_pkt: current maximum packet size for this link 126 * @mtu: current maximum packet size for this link
125 * @max_pkt_target: desired maximum packet size for this link 127 * @advertised_mtu: advertised own mtu when link is being established
126 * @max_pkt_probes: # of probes based on current (max_pkt, max_pkt_target) 128 * @transmitq: queue for sent, non-acked messages
127 * @outqueue: outbound message queue 129 * @backlogq: queue for messages waiting to be sent
128 * @next_out_no: next sequence number to use for outbound messages 130 * @next_out_no: next sequence number to use for outbound messages
129 * @last_retransmitted: sequence number of most recently retransmitted message 131 * @last_retransmitted: sequence number of most recently retransmitted message
130 * @stale_count: # of identical retransmit requests made by peer 132 * @stale_count: # of identical retransmit requests made by peer
@@ -165,36 +167,40 @@ struct tipc_link {
165 struct tipc_msg *pmsg; 167 struct tipc_msg *pmsg;
166 u32 priority; 168 u32 priority;
167 char net_plane; 169 char net_plane;
168 u32 queue_limit[15]; /* queue_limit[0]==window limit */ 170 u16 synch_point;
169 171
170 /* Changeover */ 172 /* Failover */
171 u32 exp_msg_count; 173 u16 failover_pkts;
172 u32 reset_checkpoint; 174 u16 failover_checkpt;
175 struct sk_buff *failover_skb;
173 176
174 /* Max packet negotiation */ 177 /* Max packet negotiation */
175 u32 max_pkt; 178 u16 mtu;
176 u32 max_pkt_target; 179 u16 advertised_mtu;
177 u32 max_pkt_probes;
178 180
179 /* Sending */ 181 /* Sending */
180 struct sk_buff_head outqueue; 182 struct sk_buff_head transmq;
183 struct sk_buff_head backlogq;
184 struct {
185 u16 len;
186 u16 limit;
187 } backlog[5];
181 u32 next_out_no; 188 u32 next_out_no;
189 u32 window;
182 u32 last_retransmitted; 190 u32 last_retransmitted;
183 u32 stale_count; 191 u32 stale_count;
184 192
185 /* Reception */ 193 /* Reception */
186 u32 next_in_no; 194 u32 next_in_no;
187 struct sk_buff_head deferred_queue; 195 u32 rcv_unacked;
188 u32 unacked_window; 196 struct sk_buff_head deferdq;
189 struct sk_buff_head inputq; 197 struct sk_buff_head inputq;
190 struct sk_buff_head namedq; 198 struct sk_buff_head namedq;
191 199
192 /* Congestion handling */ 200 /* Congestion handling */
193 struct sk_buff *next_out;
194 struct sk_buff_head wakeupq; 201 struct sk_buff_head wakeupq;
195 202
196 /* Fragmentation/reassembly */ 203 /* Fragmentation/reassembly */
197 u32 long_msg_seq_no;
198 struct sk_buff *reasm_buf; 204 struct sk_buff *reasm_buf;
199 205
200 /* Statistics */ 206 /* Statistics */
@@ -225,7 +231,7 @@ int tipc_link_xmit(struct net *net, struct sk_buff_head *list, u32 dest,
225int __tipc_link_xmit(struct net *net, struct tipc_link *link, 231int __tipc_link_xmit(struct net *net, struct tipc_link *link,
226 struct sk_buff_head *list); 232 struct sk_buff_head *list);
227void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob, 233void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob,
228 u32 gap, u32 tolerance, u32 priority, u32 acked_mtu); 234 u32 gap, u32 tolerance, u32 priority);
229void tipc_link_push_packets(struct tipc_link *l_ptr); 235void tipc_link_push_packets(struct tipc_link *l_ptr);
230u32 tipc_link_defer_pkt(struct sk_buff_head *list, struct sk_buff *buf); 236u32 tipc_link_defer_pkt(struct sk_buff_head *list, struct sk_buff *buf);
231void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window); 237void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window);
@@ -302,9 +308,4 @@ static inline int link_reset_reset(struct tipc_link *l_ptr)
302 return l_ptr->state == RESET_RESET; 308 return l_ptr->state == RESET_RESET;
303} 309}
304 310
305static inline int link_congested(struct tipc_link *l_ptr)
306{
307 return skb_queue_len(&l_ptr->outqueue) >= l_ptr->queue_limit[0];
308}
309
310#endif 311#endif