diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:30:19 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:45:33 -0400 |
commit | 842d1ef14ff37e9611eab479f31a0d74c1a5c4c0 (patch) | |
tree | c6b6a6a26bb20ad0f167bb65915bfd6590b1aae8 /net/dccp/ccids/ccid3.h | |
parent | 1fb87509606cb19f5f603e54c28af7da149049f3 (diff) |
dccp ccid-3: Remove ccid3hc{tx,rx}_ prefixes
This patch does the same for CCID-3 as the previous patch for CCID-2:
s#ccid3hctx_##g;
s#ccid3hcrx_##g;
plus manual editing to retain consistency.
Please note: expanded the fields of the `struct tfrc_tx_info' in the hc_tx_sock,
since using short #define identifiers is not a good idea. The only place where
this embedded struct was used is ccid3_hc_tx_getsockopt().
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/ccids/ccid3.h')
-rw-r--r-- | net/dccp/ccids/ccid3.h | 119 |
1 files changed, 59 insertions, 60 deletions
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h index 49ca32bd7e79..0cfcfff8f5fb 100644 --- a/net/dccp/ccids/ccid3.h +++ b/net/dccp/ccids/ccid3.h | |||
@@ -77,44 +77,43 @@ enum ccid3_hc_tx_states { | |||
77 | 77 | ||
78 | /** struct ccid3_hc_tx_sock - CCID3 sender half-connection socket | 78 | /** struct ccid3_hc_tx_sock - CCID3 sender half-connection socket |
79 | * | 79 | * |
80 | * @ccid3hctx_x - Current sending rate in 64 * bytes per second | 80 | * @x - Current sending rate in 64 * bytes per second |
81 | * @ccid3hctx_x_recv - Receive rate in 64 * bytes per second | 81 | * @x_recv - Receive rate in 64 * bytes per second |
82 | * @ccid3hctx_x_calc - Calculated rate in bytes per second | 82 | * @x_calc - Calculated rate in bytes per second |
83 | * @ccid3hctx_rtt - Estimate of current round trip time in usecs | 83 | * @rtt - Estimate of current round trip time in usecs |
84 | * @ccid3hctx_p - Current loss event rate (0-1) scaled by 1000000 | 84 | * @p - Current loss event rate (0-1) scaled by 1000000 |
85 | * @ccid3hctx_s - Packet size in bytes | 85 | * @s - Packet size in bytes |
86 | * @ccid3hctx_t_rto - Nofeedback Timer setting in usecs | 86 | * @t_rto - Nofeedback Timer setting in usecs |
87 | * @ccid3hctx_t_ipi - Interpacket (send) interval (RFC 3448, 4.6) in usecs | 87 | * @t_ipi - Interpacket (send) interval (RFC 3448, 4.6) in usecs |
88 | * @ccid3hctx_state - Sender state, one of %ccid3_hc_tx_states | 88 | * @state - Sender state, one of %ccid3_hc_tx_states |
89 | * @ccid3hctx_last_win_count - Last window counter sent | 89 | * @last_win_count - Last window counter sent |
90 | * @ccid3hctx_t_last_win_count - Timestamp of earliest packet | 90 | * @t_last_win_count - Timestamp of earliest packet with |
91 | * with last_win_count value sent | 91 | * last_win_count value sent |
92 | * @ccid3hctx_no_feedback_timer - Handle to no feedback timer | 92 | * @no_feedback_timer - Handle to no feedback timer |
93 | * @ccid3hctx_t_ld - Time last doubled during slow start | 93 | * @t_ld - Time last doubled during slow start |
94 | * @ccid3hctx_t_nom - Nominal send time of next packet | 94 | * @t_nom - Nominal send time of next packet |
95 | * @ccid3hctx_delta - Send timer delta (RFC 3448, 4.6) in usecs | 95 | * @delta - Send timer delta (RFC 3448, 4.6) in usecs |
96 | * @ccid3hctx_hist - Packet history | 96 | * @hist - Packet history |
97 | * @ccid3hctx_options_received - Parsed set of retrieved options | 97 | * @options_received - Parsed set of retrieved options |
98 | */ | 98 | */ |
99 | struct ccid3_hc_tx_sock { | 99 | struct ccid3_hc_tx_sock { |
100 | struct tfrc_tx_info ccid3hctx_tfrc; | 100 | u64 x; |
101 | #define ccid3hctx_x ccid3hctx_tfrc.tfrctx_x | 101 | u64 x_recv; |
102 | #define ccid3hctx_x_recv ccid3hctx_tfrc.tfrctx_x_recv | 102 | u32 x_calc; |
103 | #define ccid3hctx_x_calc ccid3hctx_tfrc.tfrctx_x_calc | 103 | u32 rtt; |
104 | #define ccid3hctx_rtt ccid3hctx_tfrc.tfrctx_rtt | 104 | u32 p; |
105 | #define ccid3hctx_p ccid3hctx_tfrc.tfrctx_p | 105 | u32 t_rto; |
106 | #define ccid3hctx_t_rto ccid3hctx_tfrc.tfrctx_rto | 106 | u32 t_ipi; |
107 | #define ccid3hctx_t_ipi ccid3hctx_tfrc.tfrctx_ipi | 107 | u16 s; |
108 | u16 ccid3hctx_s; | 108 | enum ccid3_hc_tx_states state:8; |
109 | enum ccid3_hc_tx_states ccid3hctx_state:8; | 109 | u8 last_win_count; |
110 | u8 ccid3hctx_last_win_count; | 110 | ktime_t t_last_win_count; |
111 | ktime_t ccid3hctx_t_last_win_count; | 111 | struct timer_list no_feedback_timer; |
112 | struct timer_list ccid3hctx_no_feedback_timer; | 112 | ktime_t t_ld; |
113 | ktime_t ccid3hctx_t_ld; | 113 | ktime_t t_nom; |
114 | ktime_t ccid3hctx_t_nom; | 114 | u32 delta; |
115 | u32 ccid3hctx_delta; | 115 | struct tfrc_tx_hist_entry *hist; |
116 | struct tfrc_tx_hist_entry *ccid3hctx_hist; | 116 | struct ccid3_options_received options_received; |
117 | struct ccid3_options_received ccid3hctx_options_received; | ||
118 | }; | 117 | }; |
119 | 118 | ||
120 | static inline struct ccid3_hc_tx_sock *ccid3_hc_tx_sk(const struct sock *sk) | 119 | static inline struct ccid3_hc_tx_sock *ccid3_hc_tx_sk(const struct sock *sk) |
@@ -133,32 +132,32 @@ enum ccid3_hc_rx_states { | |||
133 | 132 | ||
134 | /** struct ccid3_hc_rx_sock - CCID3 receiver half-connection socket | 133 | /** struct ccid3_hc_rx_sock - CCID3 receiver half-connection socket |
135 | * | 134 | * |
136 | * @ccid3hcrx_x_recv - Receiver estimate of send rate (RFC 3448 4.3) | 135 | * @x_recv - Receiver estimate of send rate (RFC 3448 4.3) |
137 | * @ccid3hcrx_rtt - Receiver estimate of rtt (non-standard) | 136 | * @rtt - Receiver estimate of rtt (non-standard) |
138 | * @ccid3hcrx_p - Current loss event rate (RFC 3448 5.4) | 137 | * @p - Current loss event rate (RFC 3448 5.4) |
139 | * @ccid3hcrx_last_counter - Tracks window counter (RFC 4342, 8.1) | 138 | * @last_counter - Tracks window counter (RFC 4342, 8.1) |
140 | * @ccid3hcrx_state - Receiver state, one of %ccid3_hc_rx_states | 139 | * @state - Receiver state, one of %ccid3_hc_rx_states |
141 | * @ccid3hcrx_bytes_recv - Total sum of DCCP payload bytes | 140 | * @bytes_recv - Total sum of DCCP payload bytes |
142 | * @ccid3hcrx_x_recv - Receiver estimate of send rate (RFC 3448, sec. 4.3) | 141 | * @x_recv - Receiver estimate of send rate (RFC 3448, sec. 4.3) |
143 | * @ccid3hcrx_rtt - Receiver estimate of RTT | 142 | * @rtt - Receiver estimate of RTT |
144 | * @ccid3hcrx_tstamp_last_feedback - Time at which last feedback was sent | 143 | * @tstamp_last_feedback - Time at which last feedback was sent |
145 | * @ccid3hcrx_tstamp_last_ack - Time at which last feedback was sent | 144 | * @tstamp_last_ack - Time at which last feedback was sent |
146 | * @ccid3hcrx_hist - Packet history (loss detection + RTT sampling) | 145 | * @hist - Packet history (loss detection + RTT sampling) |
147 | * @ccid3hcrx_li_hist - Loss Interval database | 146 | * @li_hist - Loss Interval database |
148 | * @ccid3hcrx_s - Received packet size in bytes | 147 | * @s - Received packet size in bytes |
149 | * @ccid3hcrx_pinv - Inverse of Loss Event Rate (RFC 4342, sec. 8.5) | 148 | * @p_inverse - Inverse of Loss Event Rate (RFC 4342, sec. 8.5) |
150 | */ | 149 | */ |
151 | struct ccid3_hc_rx_sock { | 150 | struct ccid3_hc_rx_sock { |
152 | u8 ccid3hcrx_last_counter:4; | 151 | u8 last_counter:4; |
153 | enum ccid3_hc_rx_states ccid3hcrx_state:8; | 152 | enum ccid3_hc_rx_states state:8; |
154 | u32 ccid3hcrx_bytes_recv; | 153 | u32 bytes_recv; |
155 | u32 ccid3hcrx_x_recv; | 154 | u32 x_recv; |
156 | u32 ccid3hcrx_rtt; | 155 | u32 rtt; |
157 | ktime_t ccid3hcrx_tstamp_last_feedback; | 156 | ktime_t tstamp_last_feedback; |
158 | struct tfrc_rx_hist ccid3hcrx_hist; | 157 | struct tfrc_rx_hist hist; |
159 | struct tfrc_loss_hist ccid3hcrx_li_hist; | 158 | struct tfrc_loss_hist li_hist; |
160 | u16 ccid3hcrx_s; | 159 | u16 s; |
161 | #define ccid3hcrx_pinv ccid3hcrx_li_hist.i_mean | 160 | #define p_inverse li_hist.i_mean |
162 | }; | 161 | }; |
163 | 162 | ||
164 | static inline struct ccid3_hc_rx_sock *ccid3_hc_rx_sk(const struct sock *sk) | 163 | static inline struct ccid3_hc_rx_sock *ccid3_hc_rx_sk(const struct sock *sk) |