33 #include <linux/kernel.h>
45 static DECLARE_WORK(rds_tcp_listen_work, rds_tcp_accept_worker);
46 static struct socket *rds_tcp_listen_sock;
48 static int rds_tcp_accept_one(
struct socket *
sock)
56 sock->
sk->sk_protocol, &new_sock);
68 inet = inet_sk(new_sock->
sk);
70 rdsdebug(
"accepted tcp %pI4:%u -> %pI4:%u\n",
107 while (rds_tcp_accept_one(rds_tcp_listen_sock) == 0)
115 rdsdebug(
"listen data ready sk %p\n", sk);
152 sock->
sk->sk_user_data = sock->
sk->sk_data_ready;
160 ret = sock->
ops->bind(sock, (
struct sockaddr *)&sin,
sizeof(sin));
164 ret = sock->
ops->listen(sock, 64);
168 rds_tcp_listen_sock =
sock;
178 struct socket *sock = rds_tcp_listen_sock;
199 rds_tcp_listen_sock =
NULL;