Lines Matching defs:ca

60 static inline void bictcp_reset(struct bictcp *ca)
62 ca->cnt = 0;
63 ca->last_max_cwnd = 0;
64 ca->last_cwnd = 0;
65 ca->last_time = 0;
66 ca->epoch_start = 0;
67 ca->delayed_ack = 2 << ACK_RATIO_SHIFT;
72 struct bictcp *ca = inet_csk_ca(sk);
74 bictcp_reset(ca);
83 static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
85 if (ca->last_cwnd == cwnd &&
86 (s32)(tcp_jiffies32 - ca->last_time) <= HZ / 32)
89 ca->last_cwnd = cwnd;
90 ca->last_time = tcp_jiffies32;
92 if (ca->epoch_start == 0) /* record the beginning of an epoch */
93 ca->epoch_start = tcp_jiffies32;
97 ca->cnt = cwnd;
102 if (cwnd < ca->last_max_cwnd) {
103 __u32 dist = (ca->last_max_cwnd - cwnd)
108 ca->cnt = cwnd / max_increment;
111 ca->cnt = (cwnd * smooth_part) / BICTCP_B;
114 ca->cnt = cwnd / dist;
117 if (cwnd < ca->last_max_cwnd + BICTCP_B)
119 ca->cnt = (cwnd * smooth_part) / BICTCP_B;
120 else if (cwnd < ca->last_max_cwnd + max_increment*(BICTCP_B-1))
122 ca->cnt = (cwnd * (BICTCP_B-1))
123 / (cwnd - ca->last_max_cwnd);
126 ca->cnt = cwnd / max_increment;
130 if (ca->last_max_cwnd == 0) {
131 if (ca->cnt > 20) /* increase cwnd 5% per RTT */
132 ca->cnt = 20;
135 ca->cnt = (ca->cnt << ACK_RATIO_SHIFT) / ca->delayed_ack;
136 if (ca->cnt == 0) /* cannot be zero */
137 ca->cnt = 1;
143 struct bictcp *ca = inet_csk_ca(sk);
153 bictcp_update(ca, tcp_snd_cwnd(tp));
154 tcp_cong_avoid_ai(tp, ca->cnt, acked);
164 struct bictcp *ca = inet_csk_ca(sk);
166 ca->epoch_start = 0; /* end of epoch */
169 if (tcp_snd_cwnd(tp) < ca->last_max_cwnd && fast_convergence)
170 ca->last_max_cwnd = (tcp_snd_cwnd(tp) * (BICTCP_BETA_SCALE + beta))
173 ca->last_max_cwnd = tcp_snd_cwnd(tp);
195 struct bictcp *ca = inet_csk_ca(sk);
197 ca->delayed_ack += sample->pkts_acked -
198 (ca->delayed_ack >> ACK_RATIO_SHIFT);