MCPcopy Create free account
hub / github.com/F-Stack/f-stack / chd_window_increase

Function chd_window_increase

freebsd/netinet/cc/cc_chd.c:184–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184static __inline void
185chd_window_increase(struct cc_var *ccv, int new_measurement)
186{
187 struct chd *chd_data;
188 int incr;
189
190 chd_data = ccv->cc_data;
191 incr = 0;
192
193 if (CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh)) {
194 /* Adapted from NewReno slow start. */
195 if (V_tcp_do_rfc3465) {
196 /* In slow-start with ABC enabled. */
197 if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) {
198 /* Not due to RTO. */
199 incr = min(ccv->bytes_this_ack,
200 V_tcp_abc_l_var * CCV(ccv, t_maxseg));
201 } else {
202 /* Due to RTO. */
203 incr = min(ccv->bytes_this_ack,
204 CCV(ccv, t_maxseg));
205 }
206 } else
207 incr = CCV(ccv, t_maxseg);
208
209 } else { /* Congestion avoidance. */
210 if (V_tcp_do_rfc3465) {
211 if (ccv->flags & CCF_ABC_SENTAWND) {
212 ccv->flags &= ~CCF_ABC_SENTAWND;
213 incr = CCV(ccv, t_maxseg);
214 }
215 } else if (new_measurement)
216 incr = CCV(ccv, t_maxseg);
217 }
218
219 if (chd_data->shadow_w > 0) {
220 /* Track NewReno window. */
221 chd_data->shadow_w = min(chd_data->shadow_w + incr,
222 TCP_MAXWIN << CCV(ccv, snd_scale));
223 }
224
225 CCV(ccv,snd_cwnd) = min(CCV(ccv, snd_cwnd) + incr,
226 TCP_MAXWIN << CCV(ccv, snd_scale));
227}
228
229/*
230 * All ACK signals are used for timing measurements to determine delay-based

Callers 1

chd_ack_receivedFunction · 0.85

Calls 1

minFunction · 0.85

Tested by

no test coverage detected