diff options
Diffstat (limited to 'net/dccp/ccids/ccid2.h')
-rw-r--r-- | net/dccp/ccids/ccid2.h | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/net/dccp/ccids/ccid2.h b/net/dccp/ccids/ccid2.h index 2c94ca029010..8b7a2dee2f6d 100644 --- a/net/dccp/ccids/ccid2.h +++ b/net/dccp/ccids/ccid2.h | |||
@@ -42,34 +42,49 @@ struct ccid2_seq { | |||
42 | 42 | ||
43 | /** struct ccid2_hc_tx_sock - CCID2 TX half connection | 43 | /** struct ccid2_hc_tx_sock - CCID2 TX half connection |
44 | * | 44 | * |
45 | * @ccid2hctx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5 | 45 | * @{cwnd,ssthresh,pipe}: as per RFC 4341, section 5 |
46 | * @ccid2hctx_packets_acked - Ack counter for deriving cwnd growth (RFC 3465) | 46 | * @packets_acked: Ack counter for deriving cwnd growth (RFC 3465) |
47 | * @ccid2hctx_lastrtt -time RTT was last measured | 47 | * @srtt: smoothed RTT estimate, scaled by 2^3 |
48 | * @ccid2hctx_rpseq - last consecutive seqno | 48 | * @mdev: smoothed RTT variation, scaled by 2^2 |
49 | * @ccid2hctx_rpdupack - dupacks since rpseq | 49 | * @mdev_max: maximum of @mdev during one flight |
50 | */ | 50 | * @rttvar: moving average/maximum of @mdev_max |
51 | * @rto: RTO value deriving from SRTT and RTTVAR (RFC 2988) | ||
52 | * @rtt_seq: to decay RTTVAR at most once per flight | ||
53 | * @rpseq: last consecutive seqno | ||
54 | * @rpdupack: dupacks since rpseq | ||
55 | * @av_chunks: list of Ack Vectors received on current skb | ||
56 | */ | ||
51 | struct ccid2_hc_tx_sock { | 57 | struct ccid2_hc_tx_sock { |
52 | u32 ccid2hctx_cwnd; | 58 | u32 cwnd; |
53 | u32 ccid2hctx_ssthresh; | 59 | u32 ssthresh; |
54 | u32 ccid2hctx_pipe; | 60 | u32 pipe; |
55 | u32 ccid2hctx_packets_acked; | 61 | u32 packets_acked; |
56 | struct ccid2_seq *ccid2hctx_seqbuf[CCID2_SEQBUF_MAX]; | 62 | struct ccid2_seq *seqbuf[CCID2_SEQBUF_MAX]; |
57 | int ccid2hctx_seqbufc; | 63 | int seqbufc; |
58 | struct ccid2_seq *ccid2hctx_seqh; | 64 | struct ccid2_seq *seqh; |
59 | struct ccid2_seq *ccid2hctx_seqt; | 65 | struct ccid2_seq *seqt; |
60 | long ccid2hctx_rto; | 66 | /* RTT measurement: variables/principles are the same as in TCP */ |
61 | long ccid2hctx_srtt; | 67 | u32 srtt, |
62 | long ccid2hctx_rttvar; | 68 | mdev, |
63 | unsigned long ccid2hctx_lastrtt; | 69 | mdev_max, |
64 | struct timer_list ccid2hctx_rtotimer; | 70 | rttvar, |
65 | u64 ccid2hctx_rpseq; | 71 | rto; |
66 | int ccid2hctx_rpdupack; | 72 | u64 rtt_seq:48; |
67 | unsigned long ccid2hctx_last_cong; | 73 | struct timer_list rtotimer; |
68 | u64 ccid2hctx_high_ack; | 74 | u64 rpseq; |
75 | int rpdupack; | ||
76 | unsigned long last_cong; | ||
77 | u64 high_ack; | ||
78 | struct list_head av_chunks; | ||
69 | }; | 79 | }; |
70 | 80 | ||
81 | static inline bool ccid2_cwnd_network_limited(struct ccid2_hc_tx_sock *hctx) | ||
82 | { | ||
83 | return (hctx->pipe >= hctx->cwnd); | ||
84 | } | ||
85 | |||
71 | struct ccid2_hc_rx_sock { | 86 | struct ccid2_hc_rx_sock { |
72 | int ccid2hcrx_data; | 87 | int data; |
73 | }; | 88 | }; |
74 | 89 | ||
75 | static inline struct ccid2_hc_tx_sock *ccid2_hc_tx_sk(const struct sock *sk) | 90 | static inline struct ccid2_hc_tx_sock *ccid2_hc_tx_sk(const struct sock *sk) |