• Home
  • Raw
  • Download

Lines Matching refs:ca

105 static inline void bictcp_reset(struct bictcp *ca)  in bictcp_reset()  argument
107 memset(ca, 0, offsetof(struct bictcp, unused)); in bictcp_reset()
108 ca->found = 0; in bictcp_reset()
119 struct bictcp *ca = inet_csk_ca(sk); in bictcp_hystart_reset() local
121 ca->round_start = ca->last_ack = bictcp_clock_us(sk); in bictcp_hystart_reset()
122 ca->end_seq = tp->snd_nxt; in bictcp_hystart_reset()
123 ca->curr_rtt = ~0U; in bictcp_hystart_reset()
124 ca->sample_cnt = 0; in bictcp_hystart_reset()
129 struct bictcp *ca = inet_csk_ca(sk); in cubictcp_init() local
131 bictcp_reset(ca); in cubictcp_init()
143 struct bictcp *ca = inet_csk_ca(sk); in cubictcp_cwnd_event() local
152 if (ca->epoch_start && delta > 0) { in cubictcp_cwnd_event()
153 ca->epoch_start += delta; in cubictcp_cwnd_event()
154 if (after(ca->epoch_start, now)) in cubictcp_cwnd_event()
155 ca->epoch_start = now; in cubictcp_cwnd_event()
212 static inline void bictcp_update(struct bictcp *ca, u32 cwnd, u32 acked) in bictcp_update() argument
217 ca->ack_cnt += acked; /* count the number of ACKed packets */ in bictcp_update()
219 if (ca->last_cwnd == cwnd && in bictcp_update()
220 (s32)(tcp_jiffies32 - ca->last_time) <= HZ / 32) in bictcp_update()
227 if (ca->epoch_start && tcp_jiffies32 == ca->last_time) in bictcp_update()
230 ca->last_cwnd = cwnd; in bictcp_update()
231 ca->last_time = tcp_jiffies32; in bictcp_update()
233 if (ca->epoch_start == 0) { in bictcp_update()
234 ca->epoch_start = tcp_jiffies32; /* record beginning */ in bictcp_update()
235 ca->ack_cnt = acked; /* start counting */ in bictcp_update()
236 ca->tcp_cwnd = cwnd; /* syn with cubic */ in bictcp_update()
238 if (ca->last_max_cwnd <= cwnd) { in bictcp_update()
239 ca->bic_K = 0; in bictcp_update()
240 ca->bic_origin_point = cwnd; in bictcp_update()
245 ca->bic_K = cubic_root(cube_factor in bictcp_update()
246 * (ca->last_max_cwnd - cwnd)); in bictcp_update()
247 ca->bic_origin_point = ca->last_max_cwnd; in bictcp_update()
265 t = (s32)(tcp_jiffies32 - ca->epoch_start); in bictcp_update()
266 t += usecs_to_jiffies(ca->delay_min); in bictcp_update()
271 if (t < ca->bic_K) /* t - K */ in bictcp_update()
272 offs = ca->bic_K - t; in bictcp_update()
274 offs = t - ca->bic_K; in bictcp_update()
278 if (t < ca->bic_K) /* below origin*/ in bictcp_update()
279 bic_target = ca->bic_origin_point - delta; in bictcp_update()
281 bic_target = ca->bic_origin_point + delta; in bictcp_update()
285 ca->cnt = cwnd / (bic_target - cwnd); in bictcp_update()
287 ca->cnt = 100 * cwnd; /* very small increment*/ in bictcp_update()
294 if (ca->last_max_cwnd == 0 && ca->cnt > 20) in bictcp_update()
295 ca->cnt = 20; /* increase cwnd 5% per RTT */ in bictcp_update()
303 while (ca->ack_cnt > delta) { /* update tcp cwnd */ in bictcp_update()
304 ca->ack_cnt -= delta; in bictcp_update()
305 ca->tcp_cwnd++; in bictcp_update()
308 if (ca->tcp_cwnd > cwnd) { /* if bic is slower than tcp */ in bictcp_update()
309 delta = ca->tcp_cwnd - cwnd; in bictcp_update()
311 if (ca->cnt > max_cnt) in bictcp_update()
312 ca->cnt = max_cnt; in bictcp_update()
319 ca->cnt = max(ca->cnt, 2U); in bictcp_update()
325 struct bictcp *ca = inet_csk_ca(sk); in cubictcp_cong_avoid() local
335 bictcp_update(ca, tcp_snd_cwnd(tp), acked); in cubictcp_cong_avoid()
336 tcp_cong_avoid_ai(tp, ca->cnt, acked); in cubictcp_cong_avoid()
342 struct bictcp *ca = inet_csk_ca(sk); in cubictcp_recalc_ssthresh() local
344 ca->epoch_start = 0; /* end of epoch */ in cubictcp_recalc_ssthresh()
347 if (tcp_snd_cwnd(tp) < ca->last_max_cwnd && fast_convergence) in cubictcp_recalc_ssthresh()
348 ca->last_max_cwnd = (tcp_snd_cwnd(tp) * (BICTCP_BETA_SCALE + beta)) in cubictcp_recalc_ssthresh()
351 ca->last_max_cwnd = tcp_snd_cwnd(tp); in cubictcp_recalc_ssthresh()
387 struct bictcp *ca = inet_csk_ca(sk); in hystart_update() local
390 if (after(tp->snd_una, ca->end_seq)) in hystart_update()
397 if ((s32)(now - ca->last_ack) <= hystart_ack_delta_us) { in hystart_update()
398 ca->last_ack = now; in hystart_update()
400 threshold = ca->delay_min + hystart_ack_delay(sk); in hystart_update()
410 if ((s32)(now - ca->round_start) > threshold) { in hystart_update()
411 ca->found = 1; in hystart_update()
413 now - ca->round_start, threshold, in hystart_update()
414 ca->delay_min, hystart_ack_delay(sk), tcp_snd_cwnd(tp)); in hystart_update()
427 if (ca->curr_rtt > delay) in hystart_update()
428 ca->curr_rtt = delay; in hystart_update()
429 if (ca->sample_cnt < HYSTART_MIN_SAMPLES) { in hystart_update()
430 ca->sample_cnt++; in hystart_update()
432 if (ca->curr_rtt > ca->delay_min + in hystart_update()
433 HYSTART_DELAY_THRESH(ca->delay_min >> 3)) { in hystart_update()
434 ca->found = 1; in hystart_update()
449 struct bictcp *ca = inet_csk_ca(sk); in cubictcp_acked() local
457 if (ca->epoch_start && (s32)(tcp_jiffies32 - ca->epoch_start) < HZ) in cubictcp_acked()
465 if (ca->delay_min == 0 || ca->delay_min > delay) in cubictcp_acked()
466 ca->delay_min = delay; in cubictcp_acked()
469 if (!ca->found && tcp_in_slow_start(tp) && hystart && in cubictcp_acked()