diff options
Diffstat (limited to 'include/linux/tfrc.h')
-rw-r--r-- | include/linux/tfrc.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/include/linux/tfrc.h b/include/linux/tfrc.h index 7dab7831c3c..8a8462b4a4d 100644 --- a/include/linux/tfrc.h +++ b/include/linux/tfrc.h | |||
@@ -1,7 +1,8 @@ | |||
1 | #ifndef _LINUX_TFRC_H_ | 1 | #ifndef _LINUX_TFRC_H_ |
2 | #define _LINUX_TFRC_H_ | 2 | #define _LINUX_TFRC_H_ |
3 | /* | 3 | /* |
4 | * include/linux/tfrc.h | 4 | * TFRC - Data Structures for the TCP-Friendly Rate Control congestion |
5 | * control mechanism as specified in RFC 3448. | ||
5 | * | 6 | * |
6 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 7 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
7 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 8 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> |
@@ -13,18 +14,37 @@ | |||
13 | * the Free Software Foundation; either version 2 of the License, or | 14 | * the Free Software Foundation; either version 2 of the License, or |
14 | * (at your option) any later version. | 15 | * (at your option) any later version. |
15 | */ | 16 | */ |
16 | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | 18 | ||
19 | /** tfrc_rx_info - TFRC Receiver Data Structure | ||
20 | * | ||
21 | * @tfrcrx_x_recv: receiver estimate of sending rate (3.2.2) | ||
22 | * @tfrcrx_rtt: round-trip-time (communicated by sender) | ||
23 | * @tfrcrx_p: current estimate of loss event rate (3.2.2) | ||
24 | */ | ||
19 | struct tfrc_rx_info { | 25 | struct tfrc_rx_info { |
20 | __u32 tfrcrx_x_recv; | 26 | __u32 tfrcrx_x_recv; |
21 | __u32 tfrcrx_rtt; | 27 | __u32 tfrcrx_rtt; |
22 | __u32 tfrcrx_p; | 28 | __u32 tfrcrx_p; |
23 | }; | 29 | }; |
24 | 30 | ||
31 | /** tfrc_tx_info - TFRC Sender Data Structure | ||
32 | * | ||
33 | * @tfrctx_x: computed transmit rate (4.3 (4)) | ||
34 | * @tfrctx_x_recv: receiver estimate of send rate (4.3) | ||
35 | * @tfrctx_x_calc: return value of throughput equation (3.1) | ||
36 | * @tfrctx_rtt: (moving average) estimate of RTT (4.3) | ||
37 | * @tfrctx_p: current loss event rate (5.4) | ||
38 | * @tfrctx_rto: estimate of RTO, equals 4*RTT (4.3) | ||
39 | * @tfrctx_ipi: inter-packet interval (4.6) | ||
40 | * | ||
41 | * Note: X and X_recv are both maintained in units of 64 * bytes/second. This | ||
42 | * enables a finer resolution of sending rates and avoids problems with | ||
43 | * integer arithmetic; u32 is not sufficient as scaling consumes 6 bits. | ||
44 | */ | ||
25 | struct tfrc_tx_info { | 45 | struct tfrc_tx_info { |
26 | __u32 tfrctx_x; | 46 | __u64 tfrctx_x; |
27 | __u32 tfrctx_x_recv; | 47 | __u64 tfrctx_x_recv; |
28 | __u32 tfrctx_x_calc; | 48 | __u32 tfrctx_x_calc; |
29 | __u32 tfrctx_rtt; | 49 | __u32 tfrctx_rtt; |
30 | __u32 tfrctx_p; | 50 | __u32 tfrctx_p; |