Lines Matching refs:sk
20 static void dccp_write_err(struct sock *sk) in dccp_write_err() argument
22 sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; in dccp_write_err()
23 sk_error_report(sk); in dccp_write_err()
25 dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED); in dccp_write_err()
26 dccp_done(sk); in dccp_write_err()
31 static int dccp_write_timeout(struct sock *sk) in dccp_write_timeout() argument
33 const struct inet_connection_sock *icsk = inet_csk(sk); in dccp_write_timeout()
36 if (sk->sk_state == DCCP_REQUESTING || sk->sk_state == DCCP_PARTOPEN) { in dccp_write_timeout()
38 dst_negative_advice(sk); in dccp_write_timeout()
63 dst_negative_advice(sk); in dccp_write_timeout()
74 dccp_write_err(sk); in dccp_write_timeout()
83 static void dccp_retransmit_timer(struct sock *sk) in dccp_retransmit_timer() argument
85 struct inet_connection_sock *icsk = inet_csk(sk); in dccp_retransmit_timer()
91 if (dccp_write_timeout(sk)) in dccp_retransmit_timer()
101 if (dccp_retransmit_skb(sk) != 0) { in dccp_retransmit_timer()
108 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, in dccp_retransmit_timer()
118 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto, in dccp_retransmit_timer()
121 __sk_dst_reset(sk); in dccp_retransmit_timer()
128 struct sock *sk = &icsk->icsk_inet.sk; in dccp_write_timer() local
131 bh_lock_sock(sk); in dccp_write_timer()
132 if (sock_owned_by_user(sk)) { in dccp_write_timer()
134 sk_reset_timer(sk, &icsk->icsk_retransmit_timer, in dccp_write_timer()
139 if (sk->sk_state == DCCP_CLOSED || !icsk->icsk_pending) in dccp_write_timer()
143 sk_reset_timer(sk, &icsk->icsk_retransmit_timer, in dccp_write_timer()
153 dccp_retransmit_timer(sk); in dccp_write_timer()
157 bh_unlock_sock(sk); in dccp_write_timer()
158 sock_put(sk); in dccp_write_timer()
163 struct sock *sk = from_timer(sk, t, sk_timer); in dccp_keepalive_timer() local
166 sock_put(sk); in dccp_keepalive_timer()
174 struct sock *sk = &icsk->icsk_inet.sk; in dccp_delack_timer() local
176 bh_lock_sock(sk); in dccp_delack_timer()
177 if (sock_owned_by_user(sk)) { in dccp_delack_timer()
179 __NET_INC_STATS(sock_net(sk), LINUX_MIB_DELAYEDACKLOCKED); in dccp_delack_timer()
180 sk_reset_timer(sk, &icsk->icsk_delack_timer, in dccp_delack_timer()
185 if (sk->sk_state == DCCP_CLOSED || in dccp_delack_timer()
189 sk_reset_timer(sk, &icsk->icsk_delack_timer, in dccp_delack_timer()
196 if (inet_csk_ack_scheduled(sk)) { in dccp_delack_timer()
197 if (!inet_csk_in_pingpong_mode(sk)) { in dccp_delack_timer()
205 inet_csk_exit_pingpong_mode(sk); in dccp_delack_timer()
208 dccp_send_ack(sk); in dccp_delack_timer()
209 __NET_INC_STATS(sock_net(sk), LINUX_MIB_DELAYEDACKS); in dccp_delack_timer()
212 bh_unlock_sock(sk); in dccp_delack_timer()
213 sock_put(sk); in dccp_delack_timer()
225 struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk; in dccp_write_xmitlet() local
227 bh_lock_sock(sk); in dccp_write_xmitlet()
228 if (sock_owned_by_user(sk)) in dccp_write_xmitlet()
229 sk_reset_timer(sk, &dccp_sk(sk)->dccps_xmit_timer, jiffies + 1); in dccp_write_xmitlet()
231 dccp_write_xmit(sk); in dccp_write_xmitlet()
232 bh_unlock_sock(sk); in dccp_write_xmitlet()
233 sock_put(sk); in dccp_write_xmitlet()
243 void dccp_init_xmit_timers(struct sock *sk) in dccp_init_xmit_timers() argument
245 struct dccp_sock *dp = dccp_sk(sk); in dccp_init_xmit_timers()
249 inet_csk_init_xmit_timers(sk, &dccp_write_timer, &dccp_delack_timer, in dccp_init_xmit_timers()