Lines Matching full:transport

140 /* Transport used for host->guest communication */
142 /* Transport used for guest->host communication */
144 /* Transport used for DGRAM communication */
146 /* Transport used for local communication */
343 void vsock_for_each_connected_socket(struct vsock_transport *transport, in vsock_for_each_connected_socket() argument
354 if (vsk->transport != transport) in vsock_for_each_connected_socket()
420 if (!vsk->transport) in vsock_deassign_transport()
423 vsk->transport->destruct(vsk); in vsock_deassign_transport()
424 module_put(vsk->transport->module); in vsock_deassign_transport()
425 vsk->transport = NULL; in vsock_deassign_transport()
428 /* Assign a transport to a socket and call the .init transport callback.
433 * The vsk->remote_addr is used to decide which transport to use:
435 * g2h is not loaded, will use local transport;
437 * includes VMADDR_FLAG_TO_HOST flag value, will use guest->host transport;
438 * - remote CID > VMADDR_CID_HOST will use host->guest transport;
480 if (vsk->transport) { in vsock_assign_transport()
481 if (vsk->transport == new_transport) in vsock_assign_transport()
484 /* transport->release() must be called with sock lock acquired. in vsock_assign_transport()
488 * any transport. in vsock_assign_transport()
490 vsk->transport->release(vsk); in vsock_assign_transport()
494 /* We increase the module refcnt to prevent the transport unloading in vsock_assign_transport()
514 vsk->transport = new_transport; in vsock_assign_transport()
573 if (!vsk->transport) in vsock_send_shutdown()
576 return vsk->transport->shutdown(vsk, mode); in vsock_send_shutdown()
686 return vsk->transport->dgram_bind(vsk, addr); in __vsock_bind_dgram()
814 if (vsk->transport) in __vsock_release()
815 vsk->transport->release(vsk); in __vsock_release()
873 return vsk->transport->stream_has_data(vsk); in vsock_stream_has_data()
882 return vsk->transport->seqpacket_has_data(vsk); in vsock_connectible_has_data()
890 return vsk->transport->stream_has_space(vsk); in vsock_stream_has_space()
1071 const struct vsock_transport *transport; in vsock_poll() local
1075 transport = vsk->transport; in vsock_poll()
1085 if (transport && transport->stream_is_active(vsk) && in vsock_poll()
1089 int ret = transport->notify_poll_in( in vsock_poll()
1110 if (transport && sk->sk_state == TCP_ESTABLISHED) { in vsock_poll()
1113 int ret = transport->notify_poll_out( in vsock_poll()
1148 return vsk->transport->read_skb(vsk, read_actor); in vsock_read_skb()
1158 const struct vsock_transport *transport; in vsock_dgram_sendmsg() local
1170 transport = vsk->transport; in vsock_dgram_sendmsg()
1188 remote_addr->svm_cid = transport->get_local_cid(); in vsock_dgram_sendmsg()
1198 remote_addr->svm_cid = transport->get_local_cid(); in vsock_dgram_sendmsg()
1212 if (!transport->dgram_allow(remote_addr->svm_cid, in vsock_dgram_sendmsg()
1218 err = transport->dgram_enqueue(vsk, remote_addr, msg, len); in vsock_dgram_sendmsg()
1253 if (!vsk->transport->dgram_allow(remote_addr->svm_cid, in vsock_dgram_connect()
1283 return vsk->transport->dgram_dequeue(vsk, msg, len, flags); in __vsock_dgram_recvmsg()
1315 if (!vsk->transport || !vsk->transport->unsent_bytes) { in vsock_do_ioctl()
1325 n_bytes = vsk->transport->unsent_bytes(vsk); in vsock_do_ioctl()
1374 const struct vsock_transport *transport = vsk->transport; in vsock_transport_cancel_pkt() local
1376 if (!transport || !transport->cancel_pkt) in vsock_transport_cancel_pkt()
1379 return transport->cancel_pkt(vsk); in vsock_transport_cancel_pkt()
1410 const struct vsock_transport *transport; in vsock_connect() local
1455 transport = vsk->transport; in vsock_connect()
1460 if (!transport || in vsock_connect()
1461 !transport->stream_allow(remote_addr->svm_cid, in vsock_connect()
1467 if (vsock_msgzerocopy_allow(transport)) { in vsock_connect()
1471 * when transport was unknown, check that this in vsock_connect()
1484 err = transport->connect(vsk); in vsock_connect()
1632 if (vsock_msgzerocopy_allow(vconnected->transport)) in vsock_accept()
1684 const struct vsock_transport *transport, in vsock_update_buffer_size() argument
1694 transport && transport->notify_buffer_size) in vsock_update_buffer_size()
1695 transport->notify_buffer_size(vsk, &val); in vsock_update_buffer_size()
1709 const struct vsock_transport *transport; in vsock_connectible_setsockopt() local
1733 transport = vsk->transport; in vsock_connectible_setsockopt()
1753 if (transport && !vsock_msgzerocopy_allow(transport)) { in vsock_connectible_setsockopt()
1765 vsock_update_buffer_size(vsk, transport, val); in vsock_connectible_setsockopt()
1771 vsock_update_buffer_size(vsk, transport, vsk->buffer_size); in vsock_connectible_setsockopt()
1777 vsock_update_buffer_size(vsk, transport, vsk->buffer_size); in vsock_connectible_setsockopt()
1881 const struct vsock_transport *transport; in vsock_connectible_sendmsg() local
1898 transport = vsk->transport; in vsock_connectible_sendmsg()
1915 if (!transport || sk->sk_state != TCP_ESTABLISHED || in vsock_connectible_sendmsg()
1927 !vsock_msgzerocopy_allow(transport)) { in vsock_connectible_sendmsg()
1935 err = transport->notify_send_init(vsk, &send_data); in vsock_connectible_sendmsg()
1955 err = transport->notify_send_pre_block(vsk, &send_data); in vsock_connectible_sendmsg()
1989 err = transport->notify_send_pre_enqueue(vsk, &send_data); in vsock_connectible_sendmsg()
2000 written = transport->seqpacket_enqueue(vsk, in vsock_connectible_sendmsg()
2003 written = transport->stream_enqueue(vsk, in vsock_connectible_sendmsg()
2014 err = transport->notify_send_post_enqueue( in vsock_connectible_sendmsg()
2044 const struct vsock_transport *transport; in vsock_connectible_wait_data() local
2051 transport = vsk->transport; in vsock_connectible_wait_data()
2072 err = transport->notify_recv_pre_block(vsk, target, recv_data); in vsock_connectible_wait_data()
2095 /* Internal transport error when checking for available in vsock_connectible_wait_data()
2109 const struct vsock_transport *transport; in __vsock_stream_recvmsg() local
2119 transport = vsk->transport; in __vsock_stream_recvmsg()
2128 if (target >= transport->stream_rcvhiwat(vsk)) { in __vsock_stream_recvmsg()
2135 err = transport->notify_recv_init(vsk, target, &recv_data); in __vsock_stream_recvmsg()
2148 err = transport->notify_recv_pre_dequeue(vsk, target, in __vsock_stream_recvmsg()
2153 read = transport->stream_dequeue(vsk, msg, len - copied, flags); in __vsock_stream_recvmsg()
2161 err = transport->notify_recv_post_dequeue(vsk, target, read, in __vsock_stream_recvmsg()
2187 const struct vsock_transport *transport; in __vsock_seqpacket_recvmsg() local
2195 transport = vsk->transport; in __vsock_seqpacket_recvmsg()
2203 msg_len = transport->seqpacket_dequeue(vsk, msg, flags); in __vsock_seqpacket_recvmsg()
2240 const struct vsock_transport *transport; in __vsock_connectible_recvmsg() local
2253 transport = vsk->transport; in __vsock_connectible_recvmsg()
2255 if (!transport || sk->sk_state != TCP_ESTABLISHED) { in __vsock_connectible_recvmsg()
2320 const struct vsock_transport *transport; in vsock_set_rcvlowat() local
2328 transport = vsk->transport; in vsock_set_rcvlowat()
2330 if (transport && transport->notify_set_rcvlowat) { in vsock_set_rcvlowat()
2333 err = transport->notify_set_rcvlowat(vsk, val); in vsock_set_rcvlowat()
2549 return vsk->transport; in vsock_core_get_transport()