Lines Matching full:ca

60 	struct illinois *ca = inet_csk_ca(sk);  in rtt_reset()  local
62 ca->end_seq = tp->snd_nxt; in rtt_reset()
63 ca->cnt_rtt = 0; in rtt_reset()
64 ca->sum_rtt = 0; in rtt_reset()
71 struct illinois *ca = inet_csk_ca(sk); in tcp_illinois_init() local
73 ca->alpha = ALPHA_MAX; in tcp_illinois_init()
74 ca->beta = BETA_BASE; in tcp_illinois_init()
75 ca->base_rtt = 0x7fffffff; in tcp_illinois_init()
76 ca->max_rtt = 0; in tcp_illinois_init()
78 ca->acked = 0; in tcp_illinois_init()
79 ca->rtt_low = 0; in tcp_illinois_init()
80 ca->rtt_above = 0; in tcp_illinois_init()
88 struct illinois *ca = inet_csk_ca(sk); in tcp_illinois_acked() local
91 ca->acked = sample->pkts_acked; in tcp_illinois_acked()
102 if (ca->base_rtt > rtt_us) in tcp_illinois_acked()
103 ca->base_rtt = rtt_us; in tcp_illinois_acked()
106 if (ca->max_rtt < rtt_us) in tcp_illinois_acked()
107 ca->max_rtt = rtt_us; in tcp_illinois_acked()
109 ++ca->cnt_rtt; in tcp_illinois_acked()
110 ca->sum_rtt += rtt_us; in tcp_illinois_acked()
114 static inline u32 max_delay(const struct illinois *ca) in max_delay() argument
116 return ca->max_rtt - ca->base_rtt; in max_delay()
120 static inline u32 avg_delay(const struct illinois *ca) in avg_delay() argument
122 u64 t = ca->sum_rtt; in avg_delay()
124 do_div(t, ca->cnt_rtt); in avg_delay()
125 return t - ca->base_rtt; in avg_delay()
140 static u32 alpha(struct illinois *ca, u32 da, u32 dm) in alpha() argument
146 if (!ca->rtt_above) in alpha()
152 if (++ca->rtt_low < theta) in alpha()
153 return ca->alpha; in alpha()
155 ca->rtt_low = 0; in alpha()
156 ca->rtt_above = 0; in alpha()
160 ca->rtt_above = 1; in alpha()
225 struct illinois *ca = inet_csk_ca(sk); in update_params() local
228 ca->alpha = ALPHA_BASE; in update_params()
229 ca->beta = BETA_BASE; in update_params()
230 } else if (ca->cnt_rtt > 0) { in update_params()
231 u32 dm = max_delay(ca); in update_params()
232 u32 da = avg_delay(ca); in update_params()
234 ca->alpha = alpha(ca, da, dm); in update_params()
235 ca->beta = beta(da, dm); in update_params()
246 struct illinois *ca = inet_csk_ca(sk); in tcp_illinois_state() local
249 ca->alpha = ALPHA_BASE; in tcp_illinois_state()
250 ca->beta = BETA_BASE; in tcp_illinois_state()
251 ca->rtt_low = 0; in tcp_illinois_state()
252 ca->rtt_above = 0; in tcp_illinois_state()
263 struct illinois *ca = inet_csk_ca(sk); in tcp_illinois_cong_avoid() local
265 if (after(ack, ca->end_seq)) in tcp_illinois_cong_avoid()
280 tp->snd_cwnd_cnt += ca->acked; in tcp_illinois_cong_avoid()
281 ca->acked = 1; in tcp_illinois_cong_avoid()
286 delta = (tp->snd_cwnd_cnt * ca->alpha) >> ALPHA_SHIFT; in tcp_illinois_cong_avoid()
298 struct illinois *ca = inet_csk_ca(sk); in tcp_illinois_ssthresh() local
302 decr = (tcp_snd_cwnd(tp) * ca->beta) >> BETA_SHIFT; in tcp_illinois_ssthresh()
310 const struct illinois *ca = inet_csk_ca(sk); in tcp_illinois_info() local
314 info->vegas.tcpv_rttcnt = ca->cnt_rtt; in tcp_illinois_info()
315 info->vegas.tcpv_minrtt = ca->base_rtt; in tcp_illinois_info()
319 u64 t = ca->sum_rtt; in tcp_illinois_info()