Lines Matching refs:vsk

92 	struct vsock_sock *vsk;  member
155 static bool hvs_check_transport(struct vsock_sock *vsk);
241 struct vsock_sock *vsk = vsock_sk(sk); in hvs_channel_cb() local
242 struct hvsock *hvs = vsk->trans; in hvs_channel_cb()
252 static void hvs_do_close_lock_held(struct vsock_sock *vsk, in hvs_do_close_lock_held() argument
255 struct sock *sk = sk_vsock(vsk); in hvs_do_close_lock_held()
258 vsk->peer_shutdown = SHUTDOWN_MASK; in hvs_do_close_lock_held()
259 if (vsock_stream_has_data(vsk) <= 0) in hvs_do_close_lock_held()
262 if (vsk->close_work_scheduled && in hvs_do_close_lock_held()
263 (!cancel_timeout || cancel_delayed_work(&vsk->close_work))) { in hvs_do_close_lock_held()
264 vsk->close_work_scheduled = false; in hvs_do_close_lock_held()
265 vsock_remove_sock(vsk); in hvs_do_close_lock_held()
431 static int hvs_sock_init(struct vsock_sock *vsk, struct vsock_sock *psk) in hvs_sock_init() argument
434 struct sock *sk = sk_vsock(vsk); in hvs_sock_init()
440 vsk->trans = hvs; in hvs_sock_init()
441 hvs->vsk = vsk; in hvs_sock_init()
447 static int hvs_connect(struct vsock_sock *vsk) in hvs_connect() argument
450 struct hvsock *h = vsk->trans; in hvs_connect()
453 vm.svm_port = vsk->local_addr.svm_port; in hvs_connect()
457 host.svm_port = vsk->remote_addr.svm_port; in hvs_connect()
475 static int hvs_shutdown(struct vsock_sock *vsk, int mode) in hvs_shutdown() argument
480 hvs_shutdown_lock_held(vsk->trans, mode); in hvs_shutdown()
486 struct vsock_sock *vsk = in hvs_close_timeout() local
488 struct sock *sk = sk_vsock(vsk); in hvs_close_timeout()
493 hvs_do_close_lock_held(vsk, false); in hvs_close_timeout()
495 vsk->close_work_scheduled = false; in hvs_close_timeout()
501 static bool hvs_close_lock_held(struct vsock_sock *vsk) in hvs_close_lock_held() argument
503 struct sock *sk = sk_vsock(vsk); in hvs_close_lock_held()
510 hvs_shutdown_lock_held(vsk->trans, SHUTDOWN_MASK); in hvs_close_lock_held()
517 INIT_DELAYED_WORK(&vsk->close_work, hvs_close_timeout); in hvs_close_lock_held()
518 vsk->close_work_scheduled = true; in hvs_close_lock_held()
519 schedule_delayed_work(&vsk->close_work, HVS_CLOSE_TIMEOUT); in hvs_close_lock_held()
523 static void hvs_release(struct vsock_sock *vsk) in hvs_release() argument
527 remove_sock = hvs_close_lock_held(vsk); in hvs_release()
529 vsock_remove_sock(vsk); in hvs_release()
532 static void hvs_destruct(struct vsock_sock *vsk) in hvs_destruct() argument
534 struct hvsock *hvs = vsk->trans; in hvs_destruct()
543 static int hvs_dgram_bind(struct vsock_sock *vsk, struct sockaddr_vm *addr) in hvs_dgram_bind() argument
548 static int hvs_dgram_dequeue(struct vsock_sock *vsk, struct msghdr *msg, in hvs_dgram_dequeue() argument
554 static int hvs_dgram_enqueue(struct vsock_sock *vsk, in hvs_dgram_enqueue() argument
578 hvs->vsk->peer_shutdown |= SEND_SHUTDOWN; in hvs_update_recv_data()
586 static ssize_t hvs_stream_dequeue(struct vsock_sock *vsk, struct msghdr *msg, in hvs_stream_dequeue() argument
589 struct hvsock *hvs = vsk->trans; in hvs_stream_dequeue()
626 static ssize_t hvs_stream_enqueue(struct vsock_sock *vsk, struct msghdr *msg, in hvs_stream_enqueue() argument
629 struct hvsock *hvs = vsk->trans; in hvs_stream_enqueue()
674 static s64 hvs_stream_has_data(struct vsock_sock *vsk) in hvs_stream_has_data() argument
676 struct hvsock *hvs = vsk->trans; in hvs_stream_has_data()
687 vsk->peer_shutdown |= SEND_SHUTDOWN; in hvs_stream_has_data()
698 static s64 hvs_stream_has_space(struct vsock_sock *vsk) in hvs_stream_has_space() argument
700 struct hvsock *hvs = vsk->trans; in hvs_stream_has_space()
705 static u64 hvs_stream_rcvhiwat(struct vsock_sock *vsk) in hvs_stream_rcvhiwat() argument
710 static bool hvs_stream_is_active(struct vsock_sock *vsk) in hvs_stream_is_active() argument
712 struct hvsock *hvs = vsk->trans; in hvs_stream_is_active()
726 int hvs_notify_poll_in(struct vsock_sock *vsk, size_t target, bool *readable) in hvs_notify_poll_in() argument
728 struct hvsock *hvs = vsk->trans; in hvs_notify_poll_in()
735 int hvs_notify_poll_out(struct vsock_sock *vsk, size_t target, bool *writable) in hvs_notify_poll_out() argument
737 *writable = hvs_stream_has_space(vsk) > 0; in hvs_notify_poll_out()
743 int hvs_notify_recv_init(struct vsock_sock *vsk, size_t target, in hvs_notify_recv_init() argument
750 int hvs_notify_recv_pre_block(struct vsock_sock *vsk, size_t target, in hvs_notify_recv_pre_block() argument
757 int hvs_notify_recv_pre_dequeue(struct vsock_sock *vsk, size_t target, in hvs_notify_recv_pre_dequeue() argument
764 int hvs_notify_recv_post_dequeue(struct vsock_sock *vsk, size_t target, in hvs_notify_recv_post_dequeue() argument
772 int hvs_notify_send_init(struct vsock_sock *vsk, in hvs_notify_send_init() argument
779 int hvs_notify_send_pre_block(struct vsock_sock *vsk, in hvs_notify_send_pre_block() argument
786 int hvs_notify_send_pre_enqueue(struct vsock_sock *vsk, in hvs_notify_send_pre_enqueue() argument
793 int hvs_notify_send_post_enqueue(struct vsock_sock *vsk, ssize_t written, in hvs_notify_send_post_enqueue() argument
836 static bool hvs_check_transport(struct vsock_sock *vsk) in hvs_check_transport() argument
838 return vsk->transport == &hvs_transport; in hvs_check_transport()