Lines Matching refs:sock
39 #include <net/sock.h>
81 static void svc_reclassify_socket(struct socket *sock)
83 struct sock *sk = sock->sk;
108 static void svc_reclassify_socket(struct socket *sock)
195 const struct sock *sk = svsk->sk_sk;
298 struct socket *sock = svsk->sk_sock;
302 lock_sock(sock->sk);
303 sock->sk->sk_sndbuf = nreqs * max_mesg * 2;
304 sock->sk->sk_rcvbuf = nreqs * max_mesg * 2;
305 sock->sk->sk_write_space(sock->sk);
306 release_sock(sock->sk);
320 static void svc_data_ready(struct sock *sk)
337 static void svc_write_space(struct sock *sk)
606 * sock space.
691 static void svc_tcp_listen_data_ready(struct sock *sk)
721 static void svc_tcp_state_change(struct sock *sk)
746 struct socket *sock = svsk->sk_sock;
751 if (!sock)
755 err = kernel_accept(sock, &newsock, O_NONBLOCK);
1064 static int svc_tcp_send_kvec(struct socket *sock, const struct kvec *vec,
1067 return kernel_sendpage(sock, virt_to_page(vec->iov_base),
1080 static int svc_tcp_sendmsg(struct socket *sock, struct msghdr *msg,
1098 ret = kernel_sendmsg(sock, msg, &rm, 1, rm.iov_len);
1106 ret = svc_tcp_send_kvec(sock, head, flags);
1126 ret = kernel_sendpage(sock, bvec->bv_page,
1141 ret = svc_tcp_send_kvec(sock, tail, 0);
1244 struct sock *sk = svsk->sk_sk;
1297 struct socket *sock,
1301 struct sock *inet;
1309 inet = sock->sk;
1313 err = svc_register(serv, sock_net(sock->sk), inet->sk_family,
1322 svsk->sk_sock = sock;
1336 if (sock->type == SOCK_DGRAM)
1341 trace_svcsock_new_socket(sock);
1348 struct socket *sock = sockfd_lookup(fd, &err);
1351 if (!sock)
1353 if (sock_net(sock->sk) != net)
1355 sockfd_put(sock);
1426 struct socket *sock;
1452 error = __sock_create(net, family, type, protocol, &sock, 1);
1456 svc_reclassify_socket(sock);
1464 ip6_sock_set_v6only(sock->sk);
1466 sock->sk->sk_reuse = SK_CAN_REUSE; /* allow address reuse */
1467 error = kernel_bind(sock, sin, len);
1471 error = kernel_getsockname(sock, newsin);
1477 if ((error = kernel_listen(sock, 64)) < 0)
1481 svsk = svc_setup_socket(serv, sock, flags);
1489 sock_release(sock);
1500 struct sock *sk = svsk->sk_sk;