Lines Matching refs:sk
138 static void tcp_cdg_hystart_update(struct sock *sk) in tcp_cdg_hystart_update() argument
140 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_hystart_update()
141 struct tcp_sock *tp = tcp_sk(sk); in tcp_cdg_hystart_update()
150 if (ca->last_ack == 0 || !tcp_is_cwnd_limited(sk)) { in tcp_cdg_hystart_update()
158 NET_INC_STATS_BH(sock_net(sk), in tcp_cdg_hystart_update()
160 NET_ADD_STATS_BH(sock_net(sk), in tcp_cdg_hystart_update()
177 NET_INC_STATS_BH(sock_net(sk), in tcp_cdg_hystart_update()
179 NET_ADD_STATS_BH(sock_net(sk), in tcp_cdg_hystart_update()
239 static bool tcp_cdg_backoff(struct sock *sk, u32 grad) in tcp_cdg_backoff() argument
241 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_backoff()
242 struct tcp_sock *tp = tcp_sk(sk); in tcp_cdg_backoff()
255 tcp_enter_cwr(sk); in tcp_cdg_backoff()
260 static void tcp_cdg_cong_avoid(struct sock *sk, u32 ack, u32 acked) in tcp_cdg_cong_avoid() argument
262 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_cong_avoid()
263 struct tcp_sock *tp = tcp_sk(sk); in tcp_cdg_cong_avoid()
268 tcp_cdg_hystart_update(sk); in tcp_cdg_cong_avoid()
281 if (grad > 0 && tcp_cdg_backoff(sk, grad)) in tcp_cdg_cong_avoid()
285 if (!tcp_is_cwnd_limited(sk)) { in tcp_cdg_cong_avoid()
291 tcp_reno_cong_avoid(sk, ack, acked); in tcp_cdg_cong_avoid()
297 static void tcp_cdg_acked(struct sock *sk, u32 num_acked, s32 rtt_us) in tcp_cdg_acked() argument
299 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_acked()
300 struct tcp_sock *tp = tcp_sk(sk); in tcp_cdg_acked()
326 static u32 tcp_cdg_ssthresh(struct sock *sk) in tcp_cdg_ssthresh() argument
328 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_ssthresh()
329 struct tcp_sock *tp = tcp_sk(sk); in tcp_cdg_ssthresh()
345 static u32 tcp_cdg_undo_cwnd(struct sock *sk) in tcp_cdg_undo_cwnd() argument
347 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_undo_cwnd()
349 return max(tcp_sk(sk)->snd_cwnd, ca->undo_cwnd); in tcp_cdg_undo_cwnd()
352 static void tcp_cdg_cwnd_event(struct sock *sk, const enum tcp_ca_event ev) in tcp_cdg_cwnd_event() argument
354 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_cwnd_event()
355 struct tcp_sock *tp = tcp_sk(sk); in tcp_cdg_cwnd_event()
380 static void tcp_cdg_init(struct sock *sk) in tcp_cdg_init() argument
382 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_init()
383 struct tcp_sock *tp = tcp_sk(sk); in tcp_cdg_init()
393 static void tcp_cdg_release(struct sock *sk) in tcp_cdg_release() argument
395 struct cdg *ca = inet_csk_ca(sk); in tcp_cdg_release()