diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-12-06 10:18:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:43 -0500 |
commit | b84a2189c4e1835c51fd6b974a0497be9bc4ba87 (patch) | |
tree | d488b0a45618ac37c605b10b093f8f03a050a7fc /net/dccp/ccids/ccid3.h | |
parent | 30a0eacd479f1c7c15fe0496585ff29f76de3378 (diff) |
[TFRC]: New rx history code
Credit here goes to Gerrit Renker, that provided the initial implementation for
this new codebase.
I modified it just to try to make it closer to the existing API, renaming some
functions, add namespacing and fix one bug where the tfrc_rx_hist_alloc was not
freeing the allocated ring entries on the error path.
Original changeset comment from Gerrit:
-----------
This provides a new, self-contained and generic RX history service for TFRC
based protocols.
Details:
* new data structure, initialisation and cleanup routines;
* allocation of dccp_rx_hist entries local to packet_history.c,
as a service exported by the dccp_tfrc_lib module.
* interface to automatically track highest-received seqno;
* receiver-based RTT estimation (needed for instance by RFC 3448, 6.3.1);
* a generic function to test for `data packets' as per RFC 4340, sec. 7.7.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/ccid3.h')
-rw-r--r-- | net/dccp/ccids/ccid3.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h index b842a7dd99de..3c33dc670cf9 100644 --- a/net/dccp/ccids/ccid3.h +++ b/net/dccp/ccids/ccid3.h | |||
@@ -1,7 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * net/dccp/ccids/ccid3.h | 2 | * net/dccp/ccids/ccid3.h |
3 | * | 3 | * |
4 | * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand. | 4 | * Copyright (c) 2005-7 The University of Waikato, Hamilton, New Zealand. |
5 | * Copyright (c) 2007 The University of Aberdeen, Scotland, UK | ||
5 | * | 6 | * |
6 | * An implementation of the DCCP protocol | 7 | * An implementation of the DCCP protocol |
7 | * | 8 | * |
@@ -135,9 +136,7 @@ enum ccid3_hc_rx_states { | |||
135 | * @ccid3hcrx_x_recv - Receiver estimate of send rate (RFC 3448 4.3) | 136 | * @ccid3hcrx_x_recv - Receiver estimate of send rate (RFC 3448 4.3) |
136 | * @ccid3hcrx_rtt - Receiver estimate of rtt (non-standard) | 137 | * @ccid3hcrx_rtt - Receiver estimate of rtt (non-standard) |
137 | * @ccid3hcrx_p - current loss event rate (RFC 3448 5.4) | 138 | * @ccid3hcrx_p - current loss event rate (RFC 3448 5.4) |
138 | * @ccid3hcrx_seqno_nonloss - Last received non-loss sequence number | 139 | * @ccid3hcrx_last_counter - Tracks window counter (RFC 4342, 8.1) |
139 | * @ccid3hcrx_ccval_nonloss - Last received non-loss Window CCVal | ||
140 | * @ccid3hcrx_ccval_last_counter - Tracks window counter (RFC 4342, 8.1) | ||
141 | * @ccid3hcrx_state - receiver state, one of %ccid3_hc_rx_states | 140 | * @ccid3hcrx_state - receiver state, one of %ccid3_hc_rx_states |
142 | * @ccid3hcrx_bytes_recv - Total sum of DCCP payload bytes | 141 | * @ccid3hcrx_bytes_recv - Total sum of DCCP payload bytes |
143 | * @ccid3hcrx_tstamp_last_feedback - Time at which last feedback was sent | 142 | * @ccid3hcrx_tstamp_last_feedback - Time at which last feedback was sent |
@@ -152,14 +151,11 @@ struct ccid3_hc_rx_sock { | |||
152 | #define ccid3hcrx_x_recv ccid3hcrx_tfrc.tfrcrx_x_recv | 151 | #define ccid3hcrx_x_recv ccid3hcrx_tfrc.tfrcrx_x_recv |
153 | #define ccid3hcrx_rtt ccid3hcrx_tfrc.tfrcrx_rtt | 152 | #define ccid3hcrx_rtt ccid3hcrx_tfrc.tfrcrx_rtt |
154 | #define ccid3hcrx_p ccid3hcrx_tfrc.tfrcrx_p | 153 | #define ccid3hcrx_p ccid3hcrx_tfrc.tfrcrx_p |
155 | u64 ccid3hcrx_seqno_nonloss:48, | 154 | u8 ccid3hcrx_last_counter:4; |
156 | ccid3hcrx_ccval_nonloss:4, | ||
157 | ccid3hcrx_ccval_last_counter:4; | ||
158 | enum ccid3_hc_rx_states ccid3hcrx_state:8; | 155 | enum ccid3_hc_rx_states ccid3hcrx_state:8; |
159 | u32 ccid3hcrx_bytes_recv; | 156 | u32 ccid3hcrx_bytes_recv; |
160 | ktime_t ccid3hcrx_tstamp_last_feedback; | 157 | ktime_t ccid3hcrx_tstamp_last_feedback; |
161 | ktime_t ccid3hcrx_tstamp_last_ack; | 158 | struct tfrc_rx_hist ccid3hcrx_hist; |
162 | struct list_head ccid3hcrx_hist; | ||
163 | struct list_head ccid3hcrx_li_hist; | 159 | struct list_head ccid3hcrx_li_hist; |
164 | u16 ccid3hcrx_s; | 160 | u16 ccid3hcrx_s; |
165 | u32 ccid3hcrx_pinv; | 161 | u32 ccid3hcrx_pinv; |