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