Lines Matching refs:sock
55 void rds_tcp_nonagle(struct socket *sock)
61 sock->ops->setsockopt(sock, SOL_TCP, TCP_NODELAY, (char __user *)&val,
66 void rds_tcp_tune(struct socket *sock)
68 struct sock *sk = sock->sk;
70 rds_tcp_nonagle(sock);
93 void rds_tcp_restore_callbacks(struct socket *sock,
96 rdsdebug("restoring sock %p callbacks from tc %p\n", sock, tc);
97 write_lock_bh(&sock->sk->sk_callback_lock);
107 sock->sk->sk_write_space = tc->t_orig_write_space;
108 sock->sk->sk_data_ready = tc->t_orig_data_ready;
109 sock->sk->sk_state_change = tc->t_orig_state_change;
110 sock->sk->sk_user_data = NULL;
112 write_unlock_bh(&sock->sk->sk_callback_lock);
120 void rds_tcp_set_callbacks(struct socket *sock, struct rds_connection *conn)
124 rdsdebug("setting sock %p callbacks to tc %p\n", sock, tc);
125 write_lock_bh(&sock->sk->sk_callback_lock);
134 if (sock->sk->sk_data_ready == rds_tcp_listen_data_ready)
135 sock->sk->sk_data_ready = sock->sk->sk_user_data;
137 tc->t_sock = sock;
139 tc->t_orig_data_ready = sock->sk->sk_data_ready;
140 tc->t_orig_write_space = sock->sk->sk_write_space;
141 tc->t_orig_state_change = sock->sk->sk_state_change;
143 sock->sk->sk_user_data = conn;
144 sock->sk->sk_data_ready = rds_tcp_data_ready;
145 sock->sk->sk_write_space = rds_tcp_write_space;
146 sock->sk->sk_state_change = rds_tcp_state_change;
148 write_unlock_bh(&sock->sk->sk_callback_lock);
151 static void rds_tcp_tc_info(struct socket *sock, unsigned int len,
168 sock->ops->getname(sock, (struct sockaddr *)&sin, &sinlen, 0);
171 sock->ops->getname(sock, (struct sockaddr *)&sin, &sinlen, 1);