Lines Matching refs:psock
25 static bool vsock_has_data(struct sock *sk, struct sk_psock *psock) in vsock_has_data() argument
34 return vsock_sk_has_data(sk, psock); in vsock_has_data()
37 static bool vsock_msg_wait_data(struct sock *sk, struct sk_psock *psock, long timeo) in vsock_msg_wait_data() argument
51 ret = vsock_has_data(sk, psock); in vsock_msg_wait_data()
54 ret = vsock_has_data(sk, psock); in vsock_msg_wait_data()
79 struct sk_psock *psock; in vsock_bpf_recvmsg() local
82 psock = sk_psock_get(sk); in vsock_bpf_recvmsg()
83 if (unlikely(!psock)) in vsock_bpf_recvmsg()
87 if (vsock_has_data(sk, psock) && sk_psock_queue_empty(psock)) { in vsock_bpf_recvmsg()
89 sk_psock_put(sk, psock); in vsock_bpf_recvmsg()
93 copied = sk_msg_recvmsg(sk, psock, msg, len, flags); in vsock_bpf_recvmsg()
97 if (!vsock_msg_wait_data(sk, psock, timeo)) { in vsock_bpf_recvmsg()
102 if (sk_psock_queue_empty(psock)) { in vsock_bpf_recvmsg()
104 sk_psock_put(sk, psock); in vsock_bpf_recvmsg()
108 copied = sk_msg_recvmsg(sk, psock, msg, len, flags); in vsock_bpf_recvmsg()
112 sk_psock_put(sk, psock); in vsock_bpf_recvmsg()
141 int vsock_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore) in vsock_bpf_update_proto() argument
146 sk->sk_write_space = psock->saved_write_space; in vsock_bpf_update_proto()
147 sock_replace_proto(sk, psock->sk_proto); in vsock_bpf_update_proto()
158 vsock_bpf_check_needs_rebuild(psock->sk_proto); in vsock_bpf_update_proto()