Lines Matching refs:sk

35 void nr_init_timers(struct sock *sk)  in nr_init_timers()  argument
37 struct nr_sock *nr = nr_sk(sk); in nr_init_timers()
45 sk->sk_timer.function = nr_heartbeat_expiry; in nr_init_timers()
48 void nr_start_t1timer(struct sock *sk) in nr_start_t1timer() argument
50 struct nr_sock *nr = nr_sk(sk); in nr_start_t1timer()
52 sk_reset_timer(sk, &nr->t1timer, jiffies + nr->t1); in nr_start_t1timer()
55 void nr_start_t2timer(struct sock *sk) in nr_start_t2timer() argument
57 struct nr_sock *nr = nr_sk(sk); in nr_start_t2timer()
59 sk_reset_timer(sk, &nr->t2timer, jiffies + nr->t2); in nr_start_t2timer()
62 void nr_start_t4timer(struct sock *sk) in nr_start_t4timer() argument
64 struct nr_sock *nr = nr_sk(sk); in nr_start_t4timer()
66 sk_reset_timer(sk, &nr->t4timer, jiffies + nr->t4); in nr_start_t4timer()
69 void nr_start_idletimer(struct sock *sk) in nr_start_idletimer() argument
71 struct nr_sock *nr = nr_sk(sk); in nr_start_idletimer()
74 sk_reset_timer(sk, &nr->idletimer, jiffies + nr->idle); in nr_start_idletimer()
77 void nr_start_heartbeat(struct sock *sk) in nr_start_heartbeat() argument
79 sk_reset_timer(sk, &sk->sk_timer, jiffies + 5 * HZ); in nr_start_heartbeat()
82 void nr_stop_t1timer(struct sock *sk) in nr_stop_t1timer() argument
84 sk_stop_timer(sk, &nr_sk(sk)->t1timer); in nr_stop_t1timer()
87 void nr_stop_t2timer(struct sock *sk) in nr_stop_t2timer() argument
89 sk_stop_timer(sk, &nr_sk(sk)->t2timer); in nr_stop_t2timer()
92 void nr_stop_t4timer(struct sock *sk) in nr_stop_t4timer() argument
94 sk_stop_timer(sk, &nr_sk(sk)->t4timer); in nr_stop_t4timer()
97 void nr_stop_idletimer(struct sock *sk) in nr_stop_idletimer() argument
99 sk_stop_timer(sk, &nr_sk(sk)->idletimer); in nr_stop_idletimer()
102 void nr_stop_heartbeat(struct sock *sk) in nr_stop_heartbeat() argument
104 sk_stop_timer(sk, &sk->sk_timer); in nr_stop_heartbeat()
107 int nr_t1timer_running(struct sock *sk) in nr_t1timer_running() argument
109 return timer_pending(&nr_sk(sk)->t1timer); in nr_t1timer_running()
114 struct sock *sk = from_timer(sk, t, sk_timer); in nr_heartbeat_expiry() local
115 struct nr_sock *nr = nr_sk(sk); in nr_heartbeat_expiry()
117 bh_lock_sock(sk); in nr_heartbeat_expiry()
122 if (sock_flag(sk, SOCK_DESTROY) || in nr_heartbeat_expiry()
123 (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { in nr_heartbeat_expiry()
124 sock_hold(sk); in nr_heartbeat_expiry()
125 bh_unlock_sock(sk); in nr_heartbeat_expiry()
126 nr_destroy_socket(sk); in nr_heartbeat_expiry()
135 if (atomic_read(&sk->sk_rmem_alloc) < (sk->sk_rcvbuf / 2) && in nr_heartbeat_expiry()
140 nr_write_internal(sk, NR_INFOACK); in nr_heartbeat_expiry()
146 nr_start_heartbeat(sk); in nr_heartbeat_expiry()
147 bh_unlock_sock(sk); in nr_heartbeat_expiry()
149 sock_put(sk); in nr_heartbeat_expiry()
155 struct sock *sk = &nr->sock; in nr_t2timer_expiry() local
157 bh_lock_sock(sk); in nr_t2timer_expiry()
160 nr_enquiry_response(sk); in nr_t2timer_expiry()
162 bh_unlock_sock(sk); in nr_t2timer_expiry()
163 sock_put(sk); in nr_t2timer_expiry()
169 struct sock *sk = &nr->sock; in nr_t4timer_expiry() local
171 bh_lock_sock(sk); in nr_t4timer_expiry()
172 nr_sk(sk)->condition &= ~NR_COND_PEER_RX_BUSY; in nr_t4timer_expiry()
173 bh_unlock_sock(sk); in nr_t4timer_expiry()
174 sock_put(sk); in nr_t4timer_expiry()
180 struct sock *sk = &nr->sock; in nr_idletimer_expiry() local
182 bh_lock_sock(sk); in nr_idletimer_expiry()
184 nr_clear_queues(sk); in nr_idletimer_expiry()
187 nr_write_internal(sk, NR_DISCREQ); in nr_idletimer_expiry()
190 nr_start_t1timer(sk); in nr_idletimer_expiry()
191 nr_stop_t2timer(sk); in nr_idletimer_expiry()
192 nr_stop_t4timer(sk); in nr_idletimer_expiry()
194 sk->sk_state = TCP_CLOSE; in nr_idletimer_expiry()
195 sk->sk_err = 0; in nr_idletimer_expiry()
196 sk->sk_shutdown |= SEND_SHUTDOWN; in nr_idletimer_expiry()
198 if (!sock_flag(sk, SOCK_DEAD)) { in nr_idletimer_expiry()
199 sk->sk_state_change(sk); in nr_idletimer_expiry()
200 sock_set_flag(sk, SOCK_DEAD); in nr_idletimer_expiry()
202 bh_unlock_sock(sk); in nr_idletimer_expiry()
203 sock_put(sk); in nr_idletimer_expiry()
209 struct sock *sk = &nr->sock; in nr_t1timer_expiry() local
211 bh_lock_sock(sk); in nr_t1timer_expiry()
215 nr_disconnect(sk, ETIMEDOUT); in nr_t1timer_expiry()
219 nr_write_internal(sk, NR_CONNREQ); in nr_t1timer_expiry()
225 nr_disconnect(sk, ETIMEDOUT); in nr_t1timer_expiry()
229 nr_write_internal(sk, NR_DISCREQ); in nr_t1timer_expiry()
235 nr_disconnect(sk, ETIMEDOUT); in nr_t1timer_expiry()
239 nr_requeue_frames(sk); in nr_t1timer_expiry()
244 nr_start_t1timer(sk); in nr_t1timer_expiry()
246 bh_unlock_sock(sk); in nr_t1timer_expiry()
247 sock_put(sk); in nr_t1timer_expiry()