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