Lines Matching defs:sock
374 static int xsk_generic_xmit(struct sock *sk)
468 static int __xsk_sendmsg(struct sock *sk)
480 static int xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
483 struct sock *sk = sock->sk;
494 static __poll_t xsk_poll(struct file *file, struct socket *sock,
498 struct sock *sk = sock->sk;
502 sock_poll_wait(file, sock, wait);
604 static int xsk_release(struct socket *sock)
606 struct sock *sk = sock->sk;
634 sock->sk = NULL;
644 struct socket *sock;
647 sock = sockfd_lookup(fd, &err);
648 if (!sock)
651 if (sock->sk->sk_family != PF_XDP) {
652 sockfd_put(sock);
656 return sock;
664 static int xsk_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
667 struct sock *sk = sock->sk;
710 struct socket *sock;
725 sock = xsk_lookup_xsk_from_fd(sxdp->sxdp_shared_umem_fd);
726 if (IS_ERR(sock)) {
727 err = PTR_ERR(sock);
731 umem_xs = xdp_sk(sock->sk);
734 sockfd_put(sock);
746 sockfd_put(sock);
755 sockfd_put(sock);
763 sockfd_put(sock);
773 sockfd_put(sock);
825 static int xsk_setsockopt(struct socket *sock, int level, int optname,
828 struct sock *sk = sock->sk;
940 static int xsk_getsockopt(struct socket *sock, int level, int optname,
943 struct sock *sk = sock->sk;
1071 static int xsk_mmap(struct file *file, struct socket *sock,
1076 struct xdp_sock *xs = xdp_sk(sock->sk);
1116 struct sock *sk;
1170 static void xsk_destruct(struct sock *sk)
1183 static int xsk_create(struct net *net, struct socket *sock, int protocol,
1187 struct sock *sk;
1191 if (sock->type != SOCK_RAW)
1197 sock->state = SS_UNCONNECTED;
1203 sock->ops = &xsk_proto_ops;
1205 sock_init_data(sock, sk);