Lines Matching refs:sk
24 static void dccp_write_err(struct sock *sk) in dccp_write_err() argument
26 sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; in dccp_write_err()
27 sk->sk_error_report(sk); in dccp_write_err()
29 dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED); in dccp_write_err()
30 dccp_done(sk); in dccp_write_err()
35 static int dccp_write_timeout(struct sock *sk) in dccp_write_timeout() argument
37 const struct inet_connection_sock *icsk = inet_csk(sk); in dccp_write_timeout()
40 if (sk->sk_state == DCCP_REQUESTING || sk->sk_state == DCCP_PARTOPEN) { in dccp_write_timeout()
42 dst_negative_advice(sk); in dccp_write_timeout()
67 dst_negative_advice(sk); in dccp_write_timeout()
78 dccp_write_err(sk); in dccp_write_timeout()
87 static void dccp_retransmit_timer(struct sock *sk) in dccp_retransmit_timer() argument
89 struct inet_connection_sock *icsk = inet_csk(sk); in dccp_retransmit_timer()
95 if (dccp_write_timeout(sk)) in dccp_retransmit_timer()
105 if (dccp_retransmit_skb(sk) != 0) { in dccp_retransmit_timer()
112 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, in dccp_retransmit_timer()
122 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto, in dccp_retransmit_timer()
125 __sk_dst_reset(sk); in dccp_retransmit_timer()
130 struct sock *sk = (struct sock *)data; in dccp_write_timer() local
131 struct inet_connection_sock *icsk = inet_csk(sk); in dccp_write_timer()
134 bh_lock_sock(sk); in dccp_write_timer()
135 if (sock_owned_by_user(sk)) { in dccp_write_timer()
137 sk_reset_timer(sk, &icsk->icsk_retransmit_timer, in dccp_write_timer()
142 if (sk->sk_state == DCCP_CLOSED || !icsk->icsk_pending) in dccp_write_timer()
146 sk_reset_timer(sk, &icsk->icsk_retransmit_timer, in dccp_write_timer()
156 dccp_retransmit_timer(sk); in dccp_write_timer()
160 bh_unlock_sock(sk); in dccp_write_timer()
161 sock_put(sk); in dccp_write_timer()
166 struct sock *sk = (struct sock *)data; in dccp_keepalive_timer() local
169 sock_put(sk); in dccp_keepalive_timer()
175 struct sock *sk = (struct sock *)data; in dccp_delack_timer() local
176 struct inet_connection_sock *icsk = inet_csk(sk); in dccp_delack_timer()
178 bh_lock_sock(sk); in dccp_delack_timer()
179 if (sock_owned_by_user(sk)) { in dccp_delack_timer()
182 __NET_INC_STATS(sock_net(sk), LINUX_MIB_DELAYEDACKLOCKED); in dccp_delack_timer()
183 sk_reset_timer(sk, &icsk->icsk_delack_timer, in dccp_delack_timer()
188 if (sk->sk_state == DCCP_CLOSED || in dccp_delack_timer()
192 sk_reset_timer(sk, &icsk->icsk_delack_timer, in dccp_delack_timer()
199 if (inet_csk_ack_scheduled(sk)) { in dccp_delack_timer()
211 dccp_send_ack(sk); in dccp_delack_timer()
212 __NET_INC_STATS(sock_net(sk), LINUX_MIB_DELAYEDACKS); in dccp_delack_timer()
215 bh_unlock_sock(sk); in dccp_delack_timer()
216 sock_put(sk); in dccp_delack_timer()
225 struct sock *sk = (struct sock *)data; 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()
241 void dccp_init_xmit_timers(struct sock *sk) in dccp_init_xmit_timers() argument
243 struct dccp_sock *dp = dccp_sk(sk); in dccp_init_xmit_timers()
245 tasklet_init(&dp->dccps_xmitlet, dccp_write_xmitlet, (unsigned long)sk); in dccp_init_xmit_timers()
247 (unsigned long)sk); in dccp_init_xmit_timers()
248 inet_csk_init_xmit_timers(sk, &dccp_write_timer, &dccp_delack_timer, in dccp_init_xmit_timers()