Lines Matching refs:sk
153 void tcp_assign_congestion_control(struct sock *sk) in tcp_assign_congestion_control() argument
155 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_assign_congestion_control()
177 INET_ECN_xmit(sk); in tcp_assign_congestion_control()
179 INET_ECN_dontxmit(sk); in tcp_assign_congestion_control()
182 void tcp_init_congestion_control(struct sock *sk) in tcp_init_congestion_control() argument
184 const struct inet_connection_sock *icsk = inet_csk(sk); in tcp_init_congestion_control()
187 icsk->icsk_ca_ops->init(sk); in tcp_init_congestion_control()
188 if (tcp_ca_needs_ecn(sk)) in tcp_init_congestion_control()
189 INET_ECN_xmit(sk); in tcp_init_congestion_control()
191 INET_ECN_dontxmit(sk); in tcp_init_congestion_control()
194 static void tcp_reinit_congestion_control(struct sock *sk, in tcp_reinit_congestion_control() argument
197 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_reinit_congestion_control()
199 tcp_cleanup_congestion_control(sk); in tcp_reinit_congestion_control()
203 if (sk->sk_state != TCP_CLOSE) in tcp_reinit_congestion_control()
204 tcp_init_congestion_control(sk); in tcp_reinit_congestion_control()
208 void tcp_cleanup_congestion_control(struct sock *sk) in tcp_cleanup_congestion_control() argument
210 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_cleanup_congestion_control()
213 icsk->icsk_ca_ops->release(sk); in tcp_cleanup_congestion_control()
338 int tcp_set_congestion_control(struct sock *sk, const char *name) in tcp_set_congestion_control() argument
340 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_set_congestion_control()
357 ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))) in tcp_set_congestion_control()
362 tcp_reinit_congestion_control(sk, ca); in tcp_set_congestion_control()
417 void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked) in tcp_reno_cong_avoid() argument
419 struct tcp_sock *tp = tcp_sk(sk); in tcp_reno_cong_avoid()
421 if (!tcp_is_cwnd_limited(sk)) in tcp_reno_cong_avoid()
436 u32 tcp_reno_ssthresh(struct sock *sk) in tcp_reno_ssthresh() argument
438 const struct tcp_sock *tp = tcp_sk(sk); in tcp_reno_ssthresh()