Lines Matching refs:sock

713 static int __xsk_generic_xmit(struct sock *sk)
799 static int xsk_generic_xmit(struct sock *sk)
812 static bool xsk_no_wakeup(struct sock *sk)
833 static int __xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
836 struct sock *sk = sock->sk;
867 static int xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
872 ret = __xsk_sendmsg(sock, m, total_len);
878 static int __xsk_recvmsg(struct socket *sock, struct msghdr *m, size_t len, int flags)
881 struct sock *sk = sock->sk;
904 static int xsk_recvmsg(struct socket *sock, struct msghdr *m, size_t len, int flags)
909 ret = __xsk_recvmsg(sock, m, len, flags);
915 static __poll_t xsk_poll(struct file *file, struct socket *sock,
919 struct sock *sk = sock->sk;
923 sock_poll_wait(file, sock, wait);
1026 static int xsk_release(struct socket *sock)
1028 struct sock *sk = sock->sk;
1057 sock->sk = NULL;
1066 struct socket *sock;
1069 sock = sockfd_lookup(fd, &err);
1070 if (!sock)
1073 if (sock->sk->sk_family != PF_XDP) {
1074 sockfd_put(sock);
1078 return sock;
1086 static int xsk_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
1089 struct sock *sk = sock->sk;
1132 struct socket *sock;
1147 sock = xsk_lookup_xsk_from_fd(sxdp->sxdp_shared_umem_fd);
1148 if (IS_ERR(sock)) {
1149 err = PTR_ERR(sock);
1153 umem_xs = xdp_sk(sock->sk);
1156 sockfd_put(sock);
1168 sockfd_put(sock);
1177 sockfd_put(sock);
1185 sockfd_put(sock);
1201 sockfd_put(sock);
1209 sockfd_put(sock);
1262 static int xsk_setsockopt(struct socket *sock, int level, int optname,
1265 struct sock *sk = sock->sk;
1377 static int xsk_getsockopt(struct socket *sock, int level, int optname,
1380 struct sock *sk = sock->sk;
1508 static int xsk_mmap(struct file *file, struct socket *sock,
1513 struct xdp_sock *xs = xdp_sk(sock->sk);
1551 struct sock *sk;
1604 static void xsk_destruct(struct sock *sk)
1615 static int xsk_create(struct net *net, struct socket *sock, int protocol,
1619 struct sock *sk;
1623 if (sock->type != SOCK_RAW)
1629 sock->state = SS_UNCONNECTED;
1635 sock->ops = &xsk_proto_ops;
1637 sock_init_data(sock, sk);