/linux-master/net/vmw_vsock/ |
H A D | vmci_transport_notify.c | 15 #define PKT_FIELD(vsk, field_name) (vmci_trans(vsk)->notify.pkt.field_name) 17 static bool vmci_transport_notify_waiting_write(struct vsock_sock *vsk) argument 23 if (!PKT_FIELD(vsk, peer_waiting_write)) 34 if (!PKT_FIELD(vsk, peer_waiting_write_detected)) { 35 PKT_FIELD(vsk, peer_waiting_write_detected) = true; 36 if (PKT_FIELD(vsk, write_notify_window) < PAGE_SIZE) { 37 PKT_FIELD(vsk, write_notify_window) = 38 PKT_FIELD(vsk, write_notify_min_window); 40 PKT_FIELD(vsk, write_notify_windo 86 vmci_transport_notify_waiting_read(struct vsock_sock *vsk) argument 112 struct vsock_sock *vsk; local 142 struct vsock_sock *vsk; local 171 struct vsock_sock *vsk; local 183 struct vsock_sock *vsk; local 225 struct vsock_sock *vsk; local 261 struct vsock_sock *vsk; local 307 struct vsock_sock *vsk = vsock_sk(sk); local 315 struct vsock_sock *vsk = vsock_sk(sk); local 333 vmci_transport_notify_pkt_socket_destruct(struct vsock_sock *vsk) argument 341 struct vsock_sock *vsk = vsock_sk(sk); local 366 struct vsock_sock *vsk = vsock_sk(sk); local 396 struct vsock_sock *vsk = vsock_sk(sk); local 458 struct vsock_sock *vsk = vsock_sk(sk); local 480 struct vsock_sock *vsk; local 535 struct vsock_sock *vsk = vsock_sk(sk); local 553 struct vsock_sock *vsk; local 635 struct vsock_sock *vsk = vsock_sk(sk); local 646 struct vsock_sock *vsk = vsock_sk(sk); local [all...] |
H A D | vmci_transport_notify_qstate.c | 15 #define PKT_FIELD(vsk, field_name) \ 16 (vmci_trans(vsk)->notify.pkt_q_state.field_name) 18 static bool vmci_transport_notify_waiting_write(struct vsock_sock *vsk) argument 23 if (!PKT_FIELD(vsk, peer_waiting_write)) 33 if (!PKT_FIELD(vsk, peer_waiting_write_detected)) { 34 PKT_FIELD(vsk, peer_waiting_write_detected) = true; 35 if (PKT_FIELD(vsk, write_notify_window) < PAGE_SIZE) { 36 PKT_FIELD(vsk, write_notify_window) = 37 PKT_FIELD(vsk, write_notify_min_window); 39 PKT_FIELD(vsk, write_notify_windo 92 struct vsock_sock *vsk = vsock_sk(sk); local 102 struct vsock_sock *vsk; local 142 struct vsock_sock *vsk = vsock_sk(sk); local 150 vmci_transport_notify_pkt_socket_destruct(struct vsock_sock *vsk) argument 162 struct vsock_sock *vsk = vsock_sk(sk); local 184 struct vsock_sock *vsk = vsock_sk(sk); local 206 struct vsock_sock *vsk = vsock_sk(sk); local 260 struct vsock_sock *vsk; local 309 struct vsock_sock *vsk; local 368 struct vsock_sock *vsk = vsock_sk(sk); local 379 struct vsock_sock *vsk = vsock_sk(sk); local [all...] |
H A D | af_vsock.c | 176 #define vsock_connected_sockets_vsk(vsk) \ 177 vsock_connected_sockets(&(vsk)->remote_addr, &(vsk)->local_addr) 187 static int vsock_auto_bind(struct vsock_sock *vsk) argument 189 struct sock *sk = sk_vsock(vsk); 192 if (vsock_addr_bound(&vsk->local_addr)) 210 struct vsock_sock *vsk) 212 sock_hold(&vsk->sk); 213 list_add(&vsk->bound_table, list); 217 struct vsock_sock *vsk) 209 __vsock_insert_bound(struct list_head *list, struct vsock_sock *vsk) argument 216 __vsock_insert_connected(struct list_head *list, struct vsock_sock *vsk) argument 223 __vsock_remove_bound(struct vsock_sock *vsk) argument 229 __vsock_remove_connected(struct vsock_sock *vsk) argument 237 struct vsock_sock *vsk; local 255 struct vsock_sock *vsk; local 268 vsock_insert_unbound(struct vsock_sock *vsk) argument 275 vsock_insert_connected(struct vsock_sock *vsk) argument 286 vsock_remove_bound(struct vsock_sock *vsk) argument 295 vsock_remove_connected(struct vsock_sock *vsk) argument 335 vsock_remove_sock(struct vsock_sock *vsk) argument 350 struct vsock_sock *vsk; local 417 vsock_deassign_transport(struct vsock_sock *vsk) argument 439 vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk) argument 558 struct vsock_sock *vsk = vsock_sk(sk); local 564 struct vsock_sock *vsk = vsock_sk(sk); local 570 struct vsock_sock *vsk = vsock_sk(sk); local 582 struct vsock_sock *vsk; local 627 __vsock_bind_connectible(struct vsock_sock *vsk, struct sockaddr_vm *addr) argument 682 __vsock_bind_dgram(struct vsock_sock *vsk, struct sockaddr_vm *addr) argument 690 struct vsock_sock *vsk = vsock_sk(sk); local 736 struct vsock_sock *vsk; local 801 struct vsock_sock *vsk; local 836 struct vsock_sock *vsk = vsock_sk(sk); local 867 vsock_stream_has_data(struct vsock_sock *vsk) argument 873 vsock_connectible_has_data(struct vsock_sock *vsk) argument 884 vsock_stream_has_space(struct vsock_sock *vsk) argument 892 struct vsock_sock *vsk = vsock_sk(sk); local 933 struct vsock_sock *vsk; local 1027 struct vsock_sock *vsk; local 1142 struct vsock_sock *vsk = vsock_sk(sk); local 1152 struct vsock_sock *vsk; local 1226 struct vsock_sock *vsk; local 1279 struct vsock_sock *vsk; local 1314 vsock_transport_cancel_pkt(struct vsock_sock *vsk) argument 1327 struct vsock_sock *vsk; local 1351 struct vsock_sock *vsk; local 1592 struct vsock_sock *vsk; local 1625 vsock_update_buffer_size(struct vsock_sock *vsk, const struct vsock_transport *transport, u64 val) argument 1650 struct vsock_sock *vsk; local 1762 struct vsock_sock *vsk = vsock_sk(sk); local 1822 struct vsock_sock *vsk; local 1987 struct vsock_sock *vsk; local 2052 struct vsock_sock *vsk; local 2130 struct vsock_sock *vsk; local 2181 struct vsock_sock *vsk; local 2258 struct vsock_sock *vsk; local 2325 struct vsock_sock *vsk; local 2484 vsock_core_get_transport(struct vsock_sock *vsk) argument [all...] |
H A D | virtio_transport_common.c | 30 virtio_transport_get_ops(struct vsock_sock *vsk) argument 32 const struct vsock_transport *t = vsock_core_get_transport(vsk); 59 t_ops = virtio_transport_get_ops(info->vsk); 71 static int virtio_transport_init_zcopy_skb(struct vsock_sock *vsk, argument 85 uarg = msg_zerocopy_realloc(sk_vsock(vsk), 253 struct vsock_sock *vsk; local 269 vsk = info->vsk; 271 /* If 'vsk' != NULL then payload is always present, so we 274 * when 'vsk' 325 virtio_transport_send_pkt_info(struct vsock_sock *vsk, struct virtio_vsock_pkt_info *info) argument 495 virtio_transport_send_credit_update(struct vsock_sock *vsk) argument 506 virtio_transport_stream_do_peek(struct vsock_sock *vsk, struct msghdr *msg, size_t len) argument 553 virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, struct msghdr *msg, size_t len) argument 634 virtio_transport_seqpacket_do_peek(struct vsock_sock *vsk, struct msghdr *msg) argument 691 virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk, struct msghdr *msg, int flags) argument 770 virtio_transport_stream_dequeue(struct vsock_sock *vsk, struct msghdr *msg, size_t len, int flags) argument 782 virtio_transport_seqpacket_dequeue(struct vsock_sock *vsk, struct msghdr *msg, int flags) argument 794 virtio_transport_seqpacket_enqueue(struct vsock_sock *vsk, struct msghdr *msg, size_t len) argument 814 virtio_transport_dgram_dequeue(struct vsock_sock *vsk, struct msghdr *msg, size_t len, int flags) argument 822 virtio_transport_stream_has_data(struct vsock_sock *vsk) argument 835 virtio_transport_seqpacket_has_data(struct vsock_sock *vsk) argument 848 virtio_transport_has_space(struct vsock_sock *vsk) argument 860 virtio_transport_stream_has_space(struct vsock_sock *vsk) argument 873 virtio_transport_do_socket_init(struct vsock_sock *vsk, struct vsock_sock *psk) argument 904 virtio_transport_notify_buffer_size(struct vsock_sock *vsk, u64 *val) argument 918 virtio_transport_notify_poll_in(struct vsock_sock *vsk, size_t target, bool *data_ready_now) argument 929 virtio_transport_notify_poll_out(struct vsock_sock *vsk, size_t target, bool *space_avail_now) argument 945 virtio_transport_notify_recv_init(struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *data) argument 952 virtio_transport_notify_recv_pre_block(struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *data) argument 959 virtio_transport_notify_recv_pre_dequeue(struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *data) argument 966 virtio_transport_notify_recv_post_dequeue(struct vsock_sock *vsk, size_t target, ssize_t copied, bool data_read, struct vsock_transport_recv_notify_data *data) argument 974 virtio_transport_notify_send_init(struct vsock_sock *vsk, struct vsock_transport_send_notify_data *data) argument 981 virtio_transport_notify_send_pre_block(struct vsock_sock *vsk, struct vsock_transport_send_notify_data *data) argument 988 virtio_transport_notify_send_pre_enqueue(struct vsock_sock *vsk, struct vsock_transport_send_notify_data *data) argument 995 virtio_transport_notify_send_post_enqueue(struct vsock_sock *vsk, ssize_t written, struct vsock_transport_send_notify_data *data) argument 1002 virtio_transport_stream_rcvhiwat(struct vsock_sock *vsk) argument 1008 virtio_transport_stream_is_active(struct vsock_sock *vsk) argument 1020 virtio_transport_dgram_bind(struct vsock_sock *vsk, struct sockaddr_vm *addr) argument 1033 virtio_transport_connect(struct vsock_sock *vsk) argument 1044 virtio_transport_shutdown(struct vsock_sock *vsk, int mode) argument 1060 virtio_transport_dgram_enqueue(struct vsock_sock *vsk, struct sockaddr_vm *remote_addr, struct msghdr *msg, size_t dgram_len) argument 1070 virtio_transport_stream_enqueue(struct vsock_sock *vsk, struct msghdr *msg, size_t len) argument 1085 virtio_transport_destruct(struct vsock_sock *vsk) argument 1093 virtio_transport_reset(struct vsock_sock *vsk, struct sk_buff *skb) argument 1142 virtio_transport_remove_sock(struct vsock_sock *vsk) argument 1170 virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) argument 1194 struct vsock_sock *vsk = local 1214 virtio_transport_close(struct vsock_sock *vsk) argument 1246 virtio_transport_release(struct vsock_sock *vsk) argument 1266 struct vsock_sock *vsk = vsock_sk(sk); local 1299 virtio_transport_recv_enqueue(struct vsock_sock *vsk, struct sk_buff *skb) argument 1361 struct vsock_sock *vsk = vsock_sk(sk); local 1412 struct vsock_sock *vsk = vsock_sk(sk); local 1419 virtio_transport_send_response(struct vsock_sock *vsk, struct sk_buff *skb) argument 1438 struct vsock_sock *vsk = vsock_sk(sk); local 1465 struct vsock_sock *vsk = vsock_sk(sk); local 1536 struct vsock_sock *vsk; local 1644 virtio_transport_purge_skbs(void *vsk, struct sk_buff_head *queue) argument 1671 virtio_transport_read_skb(struct vsock_sock *vsk, skb_read_actor_t recv_actor) argument 1693 virtio_transport_notify_set_rcvlowat(struct vsock_sock *vsk, int val) argument [all...] |
H A D | hyperv_transport.c | 93 /* Per-socket state (accessed via vsk->trans) */ 95 struct vsock_sock *vsk; member in struct:hvsock 158 static bool hvs_check_transport(struct vsock_sock *vsk); 250 struct vsock_sock *vsk = vsock_sk(sk); local 251 struct hvsock *hvs = vsk->trans; 261 static void hvs_do_close_lock_held(struct vsock_sock *vsk, argument 264 struct sock *sk = sk_vsock(vsk); 267 vsk->peer_shutdown = SHUTDOWN_MASK; 268 if (vsock_stream_has_data(vsk) <= 0) 271 if (vsk 442 hvs_sock_init(struct vsock_sock *vsk, struct vsock_sock *psk) argument 458 hvs_connect(struct vsock_sock *vsk) argument 486 hvs_shutdown(struct vsock_sock *vsk, int mode) argument 497 struct vsock_sock *vsk = local 512 hvs_close_lock_held(struct vsock_sock *vsk) argument 534 hvs_release(struct vsock_sock *vsk) argument 543 hvs_destruct(struct vsock_sock *vsk) argument 554 hvs_dgram_bind(struct vsock_sock *vsk, struct sockaddr_vm *addr) argument 559 hvs_dgram_dequeue(struct vsock_sock *vsk, struct msghdr *msg, size_t len, int flags) argument 565 hvs_dgram_enqueue(struct vsock_sock *vsk, struct sockaddr_vm *remote, struct msghdr *msg, size_t dgram_len) argument 603 hvs_stream_dequeue(struct vsock_sock *vsk, struct msghdr *msg, size_t len, int flags) argument 645 hvs_stream_enqueue(struct vsock_sock *vsk, struct msghdr *msg, size_t len) argument 693 hvs_stream_has_data(struct vsock_sock *vsk) argument 717 hvs_stream_has_space(struct vsock_sock *vsk) argument 724 hvs_stream_rcvhiwat(struct vsock_sock *vsk) argument 729 hvs_stream_is_active(struct vsock_sock *vsk) argument 745 hvs_notify_poll_in(struct vsock_sock *vsk, size_t target, bool *readable) argument 754 hvs_notify_poll_out(struct vsock_sock *vsk, size_t target, bool *writable) argument 762 hvs_notify_recv_init(struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *d) argument 769 hvs_notify_recv_pre_block(struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *d) argument 776 hvs_notify_recv_pre_dequeue(struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *d) argument 783 hvs_notify_recv_post_dequeue(struct vsock_sock *vsk, size_t target, ssize_t copied, bool data_read, struct vsock_transport_recv_notify_data *d) argument 791 hvs_notify_send_init(struct vsock_sock *vsk, struct vsock_transport_send_notify_data *d) argument 798 hvs_notify_send_pre_block(struct vsock_sock *vsk, struct vsock_transport_send_notify_data *d) argument 805 hvs_notify_send_pre_enqueue(struct vsock_sock *vsk, struct vsock_transport_send_notify_data *d) argument 812 hvs_notify_send_post_enqueue(struct vsock_sock *vsk, ssize_t written, struct vsock_transport_send_notify_data *d) argument 819 hvs_notify_set_rcvlowat(struct vsock_sock *vsk, int val) argument 862 hvs_check_transport(struct vsock_sock *vsk) argument [all...] |
H A D | vmci_transport.c | 60 static bool vmci_check_transport(struct vsock_sock *vsk); 286 struct vsock_sock *vsk; local 288 vsk = vsock_sk(sk); 290 if (!vsock_addr_bound(&vsk->local_addr)) 293 if (!vsock_addr_bound(&vsk->remote_addr)) 296 return vmci_transport_alloc_send_control_pkt(&vsk->local_addr, 297 &vsk->remote_addr, 319 struct vsock_sock *vsk; local 324 vsk = vsock_sk(sk); 326 if (!vsock_addr_bound(&vsk 450 vmci_transport_shutdown(struct vsock_sock *vsk, int mode) argument 616 struct vsock_sock *vsk; local 677 struct vsock_sock *vsk; local 805 struct vsock_sock *vsk; local 1280 struct vsock_sock *vsk; local 1380 struct vsock_sock *vsk; local 1501 struct vsock_sock *vsk = vsock_sk(sk); local 1521 struct vsock_sock *vsk; local 1575 vmci_transport_socket_init(struct vsock_sock *vsk, struct vsock_sock *psk) argument 1629 vmci_transport_destruct(struct vsock_sock *vsk) argument 1653 vmci_transport_release(struct vsock_sock *vsk) argument 1663 vmci_transport_dgram_bind(struct vsock_sock *vsk, struct sockaddr_vm *addr) argument 1694 vmci_transport_dgram_enqueue( struct vsock_sock *vsk, struct sockaddr_vm *remote_addr, struct msghdr *msg, size_t len) argument 1734 vmci_transport_dgram_dequeue(struct vsock_sock *vsk, struct msghdr *msg, size_t len, int flags) argument 1799 vmci_transport_connect(struct vsock_sock *vsk) argument 1828 vmci_transport_stream_dequeue( struct vsock_sock *vsk, struct msghdr *msg, size_t len, int flags) argument 1847 vmci_transport_stream_enqueue( struct vsock_sock *vsk, struct msghdr *msg, size_t len) argument 1861 vmci_transport_stream_has_data(struct vsock_sock *vsk) argument 1866 vmci_transport_stream_has_space(struct vsock_sock *vsk) argument 1871 vmci_transport_stream_rcvhiwat(struct vsock_sock *vsk) argument 1876 vmci_transport_stream_is_active(struct vsock_sock *vsk) argument 1881 vmci_transport_notify_poll_in( struct vsock_sock *vsk, size_t target, bool *data_ready_now) argument 1890 vmci_transport_notify_poll_out( struct vsock_sock *vsk, size_t target, bool *space_available_now) argument 1899 vmci_transport_notify_recv_init( struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *data) argument 1909 vmci_transport_notify_recv_pre_block( struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *data) argument 1919 vmci_transport_notify_recv_pre_dequeue( struct vsock_sock *vsk, size_t target, struct vsock_transport_recv_notify_data *data) argument 1929 vmci_transport_notify_recv_post_dequeue( struct vsock_sock *vsk, size_t target, ssize_t copied, bool data_read, struct vsock_transport_recv_notify_data *data) argument 1941 vmci_transport_notify_send_init( struct vsock_sock *vsk, struct vsock_transport_send_notify_data *data) argument 1950 vmci_transport_notify_send_pre_block( struct vsock_sock *vsk, struct vsock_transport_send_notify_data *data) argument 1959 vmci_transport_notify_send_pre_enqueue( struct vsock_sock *vsk, struct vsock_transport_send_notify_data *data) argument 1968 vmci_transport_notify_send_post_enqueue( struct vsock_sock *vsk, ssize_t written, struct vsock_transport_send_notify_data *data) argument 1997 struct vsock_sock *vsk = vsock_sk(sk); local 2067 vmci_check_transport(struct vsock_sock *vsk) argument [all...] |
H A D | diag.c | 17 struct vsock_sock *vsk = vsock_sk(sk); local 37 rep->vdiag_src_cid = vsk->local_addr.svm_cid; 38 rep->vdiag_src_port = vsk->local_addr.svm_port; 39 rep->vdiag_dst_cid = vsk->remote_addr.svm_cid; 40 rep->vdiag_dst_port = vsk->remote_addr.svm_port; 51 struct vsock_sock *vsk; local 76 list_for_each_entry(vsk, head, bound_table) { 77 struct sock *sk = sk_vsock(vsk); 106 list_for_each_entry(vsk, head, connected_table) { 107 struct sock *sk = sk_vsock(vsk); [all...] |
H A D | vsock_bpf.c | 27 struct vsock_sock *vsk = vsock_sk(sk); local 30 ret = vsock_connectible_has_data(vsk); 151 struct vsock_sock *vsk; local 159 vsk = vsock_sk(sk); 160 if (!vsk->transport) 163 if (!vsk->transport->read_skb)
|
H A D | vmci_transport_notify.h | 40 void (*socket_destruct) (struct vsock_sock *vsk);
|
H A D | vsock_loopback.c | 40 static int vsock_loopback_cancel_pkt(struct vsock_sock *vsk) argument 44 virtio_transport_purge_skbs(vsk, &vsock->pkt_queue);
|
H A D | virtio_transport.c | 233 virtio_transport_cancel_pkt(struct vsock_sock *vsk) argument 245 cnt = virtio_transport_purge_skbs(vsk, &vsock->send_pkt_queue);
|
/linux-master/include/linux/ |
H A D | virtio_vsock.h | 125 /* Per-socket state (accessed via vsk->trans) */ 127 struct vsock_sock *vsk; member in struct:virtio_vsock_sock 148 struct vsock_sock *vsk; member in struct:virtio_vsock_pkt_info 175 virtio_transport_stream_dequeue(struct vsock_sock *vsk, 180 virtio_transport_dgram_dequeue(struct vsock_sock *vsk, 185 virtio_transport_seqpacket_enqueue(struct vsock_sock *vsk, 189 virtio_transport_seqpacket_dequeue(struct vsock_sock *vsk, 192 s64 virtio_transport_stream_has_data(struct vsock_sock *vsk); 193 s64 virtio_transport_stream_has_space(struct vsock_sock *vsk); 194 u32 virtio_transport_seqpacket_has_data(struct vsock_sock *vsk); [all...] |
/linux-master/include/net/ |
H A D | af_vsock.h | 78 s64 vsock_connectible_has_data(struct vsock_sock *vsk); 79 s64 vsock_stream_has_data(struct vsock_sock *vsk); 80 s64 vsock_stream_has_space(struct vsock_sock *vsk); 116 int (*cancel_pkt)(struct vsock_sock *vsk); 123 int (*dgram_dequeue)(struct vsock_sock *vsk, struct msghdr *msg, 142 ssize_t (*seqpacket_dequeue)(struct vsock_sock *vsk, struct msghdr *msg, 144 int (*seqpacket_enqueue)(struct vsock_sock *vsk, struct msghdr *msg, 147 u32 (*seqpacket_has_data)(struct vsock_sock *vsk); 170 int (*notify_set_rcvlowat)(struct vsock_sock *vsk, int val); 191 const struct vsock_transport *vsock_core_get_transport(struct vsock_sock *vsk); 196 __vsock_in_bound_table(struct vsock_sock *vsk) argument 202 __vsock_in_connected_table(struct vsock_sock *vsk) argument [all...] |
/linux-master/drivers/vhost/ |
H A D | vsock.c | 299 vhost_transport_cancel_pkt(struct vsock_sock *vsk) argument 308 vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); 312 cnt = virtio_transport_purge_skbs(vsk, &vsock->send_pkt_queue); 699 struct vsock_sock *vsk = vsock_sk(sk); local 707 if (vhost_vsock_get(vsk->remote_addr.svm_cid)) 713 if (vsk->close_work_scheduled) 717 vsk->peer_shutdown = SHUTDOWN_MASK;
|