• Home
  • Raw
  • Download

Lines Matching refs:ca

60 static inline void bictcp_reset(struct bictcp *ca)  in bictcp_reset()  argument
62 ca->cnt = 0; in bictcp_reset()
63 ca->last_max_cwnd = 0; in bictcp_reset()
64 ca->last_cwnd = 0; in bictcp_reset()
65 ca->last_time = 0; in bictcp_reset()
66 ca->epoch_start = 0; in bictcp_reset()
67 ca->delayed_ack = 2 << ACK_RATIO_SHIFT; in bictcp_reset()
72 struct bictcp *ca = inet_csk_ca(sk); in bictcp_init() local
74 bictcp_reset(ca); in bictcp_init()
75 ca->loss_cwnd = 0; in bictcp_init()
84 static inline void bictcp_update(struct bictcp *ca, u32 cwnd) in bictcp_update() argument
86 if (ca->last_cwnd == cwnd && in bictcp_update()
87 (s32)(tcp_time_stamp - ca->last_time) <= HZ / 32) in bictcp_update()
90 ca->last_cwnd = cwnd; in bictcp_update()
91 ca->last_time = tcp_time_stamp; in bictcp_update()
93 if (ca->epoch_start == 0) /* record the beginning of an epoch */ in bictcp_update()
94 ca->epoch_start = tcp_time_stamp; in bictcp_update()
98 ca->cnt = cwnd; in bictcp_update()
103 if (cwnd < ca->last_max_cwnd) { in bictcp_update()
104 __u32 dist = (ca->last_max_cwnd - cwnd) in bictcp_update()
109 ca->cnt = cwnd / max_increment; in bictcp_update()
112 ca->cnt = (cwnd * smooth_part) / BICTCP_B; in bictcp_update()
115 ca->cnt = cwnd / dist; in bictcp_update()
118 if (cwnd < ca->last_max_cwnd + BICTCP_B) in bictcp_update()
120 ca->cnt = (cwnd * smooth_part) / BICTCP_B; in bictcp_update()
121 else if (cwnd < ca->last_max_cwnd + max_increment*(BICTCP_B-1)) in bictcp_update()
123 ca->cnt = (cwnd * (BICTCP_B-1)) in bictcp_update()
124 / (cwnd - ca->last_max_cwnd); in bictcp_update()
127 ca->cnt = cwnd / max_increment; in bictcp_update()
131 if (ca->last_max_cwnd == 0) { in bictcp_update()
132 if (ca->cnt > 20) /* increase cwnd 5% per RTT */ in bictcp_update()
133 ca->cnt = 20; in bictcp_update()
136 ca->cnt = (ca->cnt << ACK_RATIO_SHIFT) / ca->delayed_ack; in bictcp_update()
137 if (ca->cnt == 0) /* cannot be zero */ in bictcp_update()
138 ca->cnt = 1; in bictcp_update()
144 struct bictcp *ca = inet_csk_ca(sk); in bictcp_cong_avoid() local
152 bictcp_update(ca, tp->snd_cwnd); in bictcp_cong_avoid()
153 tcp_cong_avoid_ai(tp, ca->cnt, 1); in bictcp_cong_avoid()
164 struct bictcp *ca = inet_csk_ca(sk); in bictcp_recalc_ssthresh() local
166 ca->epoch_start = 0; /* end of epoch */ in bictcp_recalc_ssthresh()
169 if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) in bictcp_recalc_ssthresh()
170 ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) in bictcp_recalc_ssthresh()
173 ca->last_max_cwnd = tp->snd_cwnd; in bictcp_recalc_ssthresh()
175 ca->loss_cwnd = tp->snd_cwnd; in bictcp_recalc_ssthresh()
186 const struct bictcp *ca = inet_csk_ca(sk); in bictcp_undo_cwnd() local
188 return max(tp->snd_cwnd, ca->loss_cwnd); in bictcp_undo_cwnd()
205 struct bictcp *ca = inet_csk_ca(sk); in bictcp_acked() local
207 cnt -= ca->delayed_ack >> ACK_RATIO_SHIFT; in bictcp_acked()
208 ca->delayed_ack += cnt; in bictcp_acked()