• Home
  • Raw
  • Download

Lines Matching refs:ca

105 static inline void bictcp_reset(struct bictcp *ca)  in bictcp_reset()  argument
107 ca->cnt = 0; in bictcp_reset()
108 ca->last_max_cwnd = 0; in bictcp_reset()
109 ca->last_cwnd = 0; in bictcp_reset()
110 ca->last_time = 0; in bictcp_reset()
111 ca->bic_origin_point = 0; in bictcp_reset()
112 ca->bic_K = 0; in bictcp_reset()
113 ca->delay_min = 0; in bictcp_reset()
114 ca->epoch_start = 0; in bictcp_reset()
115 ca->ack_cnt = 0; in bictcp_reset()
116 ca->tcp_cwnd = 0; in bictcp_reset()
117 ca->found = 0; in bictcp_reset()
132 struct bictcp *ca = inet_csk_ca(sk); in bictcp_hystart_reset() local
134 ca->round_start = ca->last_ack = bictcp_clock(); in bictcp_hystart_reset()
135 ca->end_seq = tp->snd_nxt; in bictcp_hystart_reset()
136 ca->curr_rtt = 0; in bictcp_hystart_reset()
137 ca->sample_cnt = 0; in bictcp_hystart_reset()
142 struct bictcp *ca = inet_csk_ca(sk); in bictcp_init() local
144 bictcp_reset(ca); in bictcp_init()
145 ca->loss_cwnd = 0; in bictcp_init()
157 struct bictcp *ca = inet_csk_ca(sk); in bictcp_cwnd_event() local
166 if (ca->epoch_start && delta > 0) { in bictcp_cwnd_event()
167 ca->epoch_start += delta; in bictcp_cwnd_event()
168 if (after(ca->epoch_start, now)) in bictcp_cwnd_event()
169 ca->epoch_start = now; in bictcp_cwnd_event()
226 static inline void bictcp_update(struct bictcp *ca, u32 cwnd, u32 acked) in bictcp_update() argument
231 ca->ack_cnt += acked; /* count the number of ACKed packets */ in bictcp_update()
233 if (ca->last_cwnd == cwnd && in bictcp_update()
234 (s32)(tcp_time_stamp - ca->last_time) <= HZ / 32) in bictcp_update()
241 if (ca->epoch_start && tcp_time_stamp == ca->last_time) in bictcp_update()
244 ca->last_cwnd = cwnd; in bictcp_update()
245 ca->last_time = tcp_time_stamp; in bictcp_update()
247 if (ca->epoch_start == 0) { in bictcp_update()
248 ca->epoch_start = tcp_time_stamp; /* record beginning */ in bictcp_update()
249 ca->ack_cnt = acked; /* start counting */ in bictcp_update()
250 ca->tcp_cwnd = cwnd; /* syn with cubic */ in bictcp_update()
252 if (ca->last_max_cwnd <= cwnd) { in bictcp_update()
253 ca->bic_K = 0; in bictcp_update()
254 ca->bic_origin_point = cwnd; in bictcp_update()
259 ca->bic_K = cubic_root(cube_factor in bictcp_update()
260 * (ca->last_max_cwnd - cwnd)); in bictcp_update()
261 ca->bic_origin_point = ca->last_max_cwnd; in bictcp_update()
279 t = (s32)(tcp_time_stamp - ca->epoch_start); in bictcp_update()
280 t += msecs_to_jiffies(ca->delay_min >> 3); in bictcp_update()
285 if (t < ca->bic_K) /* t - K */ in bictcp_update()
286 offs = ca->bic_K - t; in bictcp_update()
288 offs = t - ca->bic_K; in bictcp_update()
292 if (t < ca->bic_K) /* below origin*/ in bictcp_update()
293 bic_target = ca->bic_origin_point - delta; in bictcp_update()
295 bic_target = ca->bic_origin_point + delta; in bictcp_update()
299 ca->cnt = cwnd / (bic_target - cwnd); in bictcp_update()
301 ca->cnt = 100 * cwnd; /* very small increment*/ in bictcp_update()
308 if (ca->last_max_cwnd == 0 && ca->cnt > 20) in bictcp_update()
309 ca->cnt = 20; /* increase cwnd 5% per RTT */ in bictcp_update()
317 while (ca->ack_cnt > delta) { /* update tcp cwnd */ in bictcp_update()
318 ca->ack_cnt -= delta; in bictcp_update()
319 ca->tcp_cwnd++; in bictcp_update()
322 if (ca->tcp_cwnd > cwnd) { /* if bic is slower than tcp */ in bictcp_update()
323 delta = ca->tcp_cwnd - cwnd; in bictcp_update()
325 if (ca->cnt > max_cnt) in bictcp_update()
326 ca->cnt = max_cnt; in bictcp_update()
333 ca->cnt = max(ca->cnt, 2U); in bictcp_update()
339 struct bictcp *ca = inet_csk_ca(sk); in bictcp_cong_avoid() local
349 bictcp_update(ca, tp->snd_cwnd, acked); in bictcp_cong_avoid()
350 tcp_cong_avoid_ai(tp, ca->cnt, acked); in bictcp_cong_avoid()
356 struct bictcp *ca = inet_csk_ca(sk); in bictcp_recalc_ssthresh() local
358 ca->epoch_start = 0; /* end of epoch */ in bictcp_recalc_ssthresh()
361 if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) in bictcp_recalc_ssthresh()
362 ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) in bictcp_recalc_ssthresh()
365 ca->last_max_cwnd = tp->snd_cwnd; in bictcp_recalc_ssthresh()
367 ca->loss_cwnd = tp->snd_cwnd; in bictcp_recalc_ssthresh()
374 struct bictcp *ca = inet_csk_ca(sk); in bictcp_undo_cwnd() local
376 return max(tcp_sk(sk)->snd_cwnd, ca->loss_cwnd); in bictcp_undo_cwnd()
390 struct bictcp *ca = inet_csk_ca(sk); in hystart_update() local
392 if (ca->found & hystart_detect) in hystart_update()
395 if (after(tp->snd_una, ca->end_seq)) in hystart_update()
402 if ((s32)(now - ca->last_ack) <= hystart_ack_delta) { in hystart_update()
403 ca->last_ack = now; in hystart_update()
404 if ((s32)(now - ca->round_start) > ca->delay_min >> 4) { in hystart_update()
405 ca->found |= HYSTART_ACK_TRAIN; in hystart_update()
418 if (ca->curr_rtt > delay) in hystart_update()
419 ca->curr_rtt = delay; in hystart_update()
420 if (ca->sample_cnt < HYSTART_MIN_SAMPLES) { in hystart_update()
421 if (ca->curr_rtt == 0 || ca->curr_rtt > delay) in hystart_update()
422 ca->curr_rtt = delay; in hystart_update()
424 ca->sample_cnt++; in hystart_update()
426 if (ca->curr_rtt > ca->delay_min + in hystart_update()
427 HYSTART_DELAY_THRESH(ca->delay_min >> 3)) { in hystart_update()
428 ca->found |= HYSTART_DELAY; in hystart_update()
446 struct bictcp *ca = inet_csk_ca(sk); in bictcp_acked() local
454 if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) < HZ) in bictcp_acked()
462 if (ca->delay_min == 0 || ca->delay_min > delay) in bictcp_acked()
463 ca->delay_min = delay; in bictcp_acked()