diff options
Diffstat (limited to 'net/dccp/ccids/ccid2.h')
-rw-r--r-- | net/dccp/ccids/ccid2.h | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/net/dccp/ccids/ccid2.h b/net/dccp/ccids/ccid2.h index 1ec6a30103bb..9731c2dc1487 100644 --- a/net/dccp/ccids/ccid2.h +++ b/net/dccp/ccids/ccid2.h | |||
@@ -18,18 +18,23 @@ | |||
18 | #ifndef _DCCP_CCID2_H_ | 18 | #ifndef _DCCP_CCID2_H_ |
19 | #define _DCCP_CCID2_H_ | 19 | #define _DCCP_CCID2_H_ |
20 | 20 | ||
21 | #include <linux/dccp.h> | ||
22 | #include <linux/timer.h> | 21 | #include <linux/timer.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include "../ccid.h" | 23 | #include "../ccid.h" |
24 | #include "../dccp.h" | ||
25 | |||
26 | /* | ||
27 | * CCID-2 timestamping faces the same issues as TCP timestamping. | ||
28 | * Hence we reuse/share as much of the code as possible. | ||
29 | */ | ||
30 | #define ccid2_time_stamp tcp_time_stamp | ||
31 | |||
25 | /* NUMDUPACK parameter from RFC 4341, p. 6 */ | 32 | /* NUMDUPACK parameter from RFC 4341, p. 6 */ |
26 | #define NUMDUPACK 3 | 33 | #define NUMDUPACK 3 |
27 | 34 | ||
28 | struct sock; | ||
29 | |||
30 | struct ccid2_seq { | 35 | struct ccid2_seq { |
31 | u64 ccid2s_seq; | 36 | u64 ccid2s_seq; |
32 | unsigned long ccid2s_sent; | 37 | u32 ccid2s_sent; |
33 | int ccid2s_acked; | 38 | int ccid2s_acked; |
34 | struct ccid2_seq *ccid2s_prev; | 39 | struct ccid2_seq *ccid2s_prev; |
35 | struct ccid2_seq *ccid2s_next; | 40 | struct ccid2_seq *ccid2s_next; |
@@ -42,7 +47,12 @@ struct ccid2_seq { | |||
42 | * struct ccid2_hc_tx_sock - CCID2 TX half connection | 47 | * struct ccid2_hc_tx_sock - CCID2 TX half connection |
43 | * @tx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5 | 48 | * @tx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5 |
44 | * @tx_packets_acked: Ack counter for deriving cwnd growth (RFC 3465) | 49 | * @tx_packets_acked: Ack counter for deriving cwnd growth (RFC 3465) |
45 | * @tx_lastrtt: time RTT was last measured | 50 | * @tx_srtt: smoothed RTT estimate, scaled by 2^3 |
51 | * @tx_mdev: smoothed RTT variation, scaled by 2^2 | ||
52 | * @tx_mdev_max: maximum of @mdev during one flight | ||
53 | * @tx_rttvar: moving average/maximum of @mdev_max | ||
54 | * @tx_rto: RTO value deriving from SRTT and RTTVAR (RFC 2988) | ||
55 | * @tx_rtt_seq: to decay RTTVAR at most once per flight | ||
46 | * @tx_rpseq: last consecutive seqno | 56 | * @tx_rpseq: last consecutive seqno |
47 | * @tx_rpdupack: dupacks since rpseq | 57 | * @tx_rpdupack: dupacks since rpseq |
48 | */ | 58 | */ |
@@ -55,14 +65,19 @@ struct ccid2_hc_tx_sock { | |||
55 | int tx_seqbufc; | 65 | int tx_seqbufc; |
56 | struct ccid2_seq *tx_seqh; | 66 | struct ccid2_seq *tx_seqh; |
57 | struct ccid2_seq *tx_seqt; | 67 | struct ccid2_seq *tx_seqt; |
58 | long tx_rto; | 68 | |
59 | long tx_srtt; | 69 | /* RTT measurement: variables/principles are the same as in TCP */ |
60 | long tx_rttvar; | 70 | u32 tx_srtt, |
61 | unsigned long tx_lastrtt; | 71 | tx_mdev, |
72 | tx_mdev_max, | ||
73 | tx_rttvar, | ||
74 | tx_rto; | ||
75 | u64 tx_rtt_seq:48; | ||
62 | struct timer_list tx_rtotimer; | 76 | struct timer_list tx_rtotimer; |
77 | |||
63 | u64 tx_rpseq; | 78 | u64 tx_rpseq; |
64 | int tx_rpdupack; | 79 | int tx_rpdupack; |
65 | unsigned long tx_last_cong; | 80 | u32 tx_last_cong; |
66 | u64 tx_high_ack; | 81 | u64 tx_high_ack; |
67 | }; | 82 | }; |
68 | 83 | ||