summaryrefslogtreecommitdiffstats
path: root/net/tipc/link.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-03-13 21:08:10 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-14 19:38:32 +0100
commit05dcc5aa4dcced4f59f925625cea669e82b75519 (patch)
tree0a516e1012ee7e9b7eee037d8e31278a425e7d68 /net/tipc/link.h
parenttipc: eliminate unnecessary call to broadcast ack function (diff)
downloadlinux-05dcc5aa4dcced4f59f925625cea669e82b75519.tar.xz
linux-05dcc5aa4dcced4f59f925625cea669e82b75519.zip
tipc: split link outqueue
struct tipc_link contains one single queue for outgoing packets, where both transmitted and waiting packets are queued. This infrastructure is hard to maintain, because we need to keep a number of fields to keep track of which packets are sent or unsent, and the number of packets in each category. A lot of code becomes simpler if we split this queue into a transmission queue, where sent/unacknowledged packets are kept, and a backlog queue, where we keep the not yet sent packets. In this commit we do this separation. Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.h')
-rw-r--r--net/tipc/link.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h
index 7aeb52092bf3..eec3ecf2d450 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -124,7 +124,8 @@ struct tipc_stats {
* @max_pkt: current maximum packet size for this link
* @max_pkt_target: desired maximum packet size for this link
* @max_pkt_probes: # of probes based on current (max_pkt, max_pkt_target)
- * @outqueue: outbound message queue
+ * @transmitq: queue for sent, non-acked messages
+ * @backlogq: queue for messages waiting to be sent
* @next_out_no: next sequence number to use for outbound messages
* @last_retransmitted: sequence number of most recently retransmitted message
* @stale_count: # of identical retransmit requests made by peer
@@ -177,20 +178,21 @@ struct tipc_link {
u32 max_pkt_probes;
/* Sending */
- struct sk_buff_head outqueue;
+ struct sk_buff_head transmq;
+ struct sk_buff_head backlogq;
u32 next_out_no;
+ u32 window;
u32 last_retransmitted;
u32 stale_count;
/* Reception */
u32 next_in_no;
- struct sk_buff_head deferred_queue;
- u32 unacked_window;
+ u32 rcv_unacked;
+ struct sk_buff_head deferdq;
struct sk_buff_head inputq;
struct sk_buff_head namedq;
/* Congestion handling */
- struct sk_buff *next_out;
struct sk_buff_head wakeupq;
/* Fragmentation/reassembly */
@@ -302,9 +304,4 @@ static inline int link_reset_reset(struct tipc_link *l_ptr)
return l_ptr->state == RESET_RESET;
}
-static inline int link_congested(struct tipc_link *l_ptr)
-{
- return skb_queue_len(&l_ptr->outqueue) >= l_ptr->queue_limit[0];
-}
-
#endif