diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-10-22 15:51:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-24 16:56:32 +0300 |
commit | c1ab3f1dea3df566ad38caf98baf69c656679090 (patch) | |
tree | f62e1118dade62d290f0a5cfc418b355194da013 /net/tipc/link.h | |
parent | 323019069e8d96d87e9dba51f897060f94999821 (diff) | |
download | linux-c1ab3f1dea3df566ad38caf98baf69c656679090.tar.xz |
tipc: make struct tipc_link generic to support broadcast
Realizing that unicast is just a special case of broadcast, we also see
that we can go in the other direction, i.e., that modest changes to the
current unicast link can make it generic enough to support broadcast.
The following changes are introduced here:
- A new counter ("ackers") in struct tipc_link, to indicate how many
peers need to ack a packet before it can be released.
- A corresponding counter in the skb user area, to keep track of how
many peers a are left to ack before a buffer can be released.
- A new counter ("acked"), to keep persistent track of how far a peer
has acked at the moment, i.e., where in the transmission queue to
start updating buffers when the next ack arrives. This is to avoid
double acknowledgements from a peer, with inadvertent relase of
packets as a result.
- A more generic tipc_link_retrans() function, where retransmit starts
from a given sequence number, instead of the first packet in the
transmision queue. This is to minimize the number of retransmitted
packets on the broadcast media.
When the new functionality is taken into use in the next commits,
we expect it to have minimal effect on unicast mode performance.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.h')
-rw-r--r-- | net/tipc/link.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h index 9e4e3673da76..be24d1fd5132 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h @@ -134,6 +134,8 @@ struct tipc_stats { * @snt_nxt: 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 + * @ackers: # of peers that needs to ack each packet before it can be released + * @acked: # last packet acked by a certain peer. Used for broadcast. * @rcv_nxt: next sequence number to expect for inbound messages * @deferred_queue: deferred queue saved OOS b'cast message received from node * @unacked_window: # of inbound messages rx'd without ack'ing back to peer @@ -143,6 +145,7 @@ struct tipc_stats { * @wakeupq: linked list of wakeup msgs waiting for link congestion to abate * @long_msg_seq_no: next identifier to use for outbound fragmented messages * @reasm_buf: head of partially reassembled inbound message fragments + * @bc_rcvr: marks that this is a broadcast receiver link * @stats: collects statistics regarding link activity */ struct tipc_link { @@ -201,6 +204,10 @@ struct tipc_link { /* Fragmentation/reassembly */ struct sk_buff *reasm_buf; + /* Broadcast */ + u16 ackers; + u16 acked; + /* Statistics */ struct tipc_stats stats; }; |