Home
last modified time | relevance | path

Searched refs:vsk (Results 1 – 15 of 15) sorted by relevance

/openbmc/linux/net/vmw_vsock/
H A Dvmci_transport_notify.c15 #define PKT_FIELD(vsk, field_name) (vmci_trans(vsk)->notify.pkt.field_name) argument
17 static bool vmci_transport_notify_waiting_write(struct vsock_sock *vsk) in vmci_transport_notify_waiting_write() argument
23 if (!PKT_FIELD(vsk, peer_waiting_write)) in vmci_transport_notify_waiting_write()
34 if (!PKT_FIELD(vsk, peer_waiting_write_detected)) { in vmci_transport_notify_waiting_write()
35 PKT_FIELD(vsk, peer_waiting_write_detected) = true; in vmci_transport_notify_waiting_write()
36 if (PKT_FIELD(vsk, write_notify_window) < PAGE_SIZE) { in vmci_transport_notify_waiting_write()
37 PKT_FIELD(vsk, write_notify_window) = in vmci_transport_notify_waiting_write()
38 PKT_FIELD(vsk, write_notify_min_window); in vmci_transport_notify_waiting_write()
40 PKT_FIELD(vsk, write_notify_window) -= PAGE_SIZE; in vmci_transport_notify_waiting_write()
41 if (PKT_FIELD(vsk, write_notify_window) < in vmci_transport_notify_waiting_write()
[all …]
H A Dvmci_transport_notify_qstate.c15 #define PKT_FIELD(vsk, field_name) \ argument
16 (vmci_trans(vsk)->notify.pkt_q_state.field_name)
18 static bool vmci_transport_notify_waiting_write(struct vsock_sock *vsk) in vmci_transport_notify_waiting_write() argument
23 if (!PKT_FIELD(vsk, peer_waiting_write)) in vmci_transport_notify_waiting_write()
33 if (!PKT_FIELD(vsk, peer_waiting_write_detected)) { in vmci_transport_notify_waiting_write()
34 PKT_FIELD(vsk, peer_waiting_write_detected) = true; in vmci_transport_notify_waiting_write()
35 if (PKT_FIELD(vsk, write_notify_window) < PAGE_SIZE) { in vmci_transport_notify_waiting_write()
36 PKT_FIELD(vsk, write_notify_window) = in vmci_transport_notify_waiting_write()
37 PKT_FIELD(vsk, write_notify_min_window); in vmci_transport_notify_waiting_write()
39 PKT_FIELD(vsk, write_notify_window) -= PAGE_SIZE; in vmci_transport_notify_waiting_write()
[all …]
H A Daf_vsock.c178 #define vsock_connected_sockets_vsk(vsk) \ argument
179 vsock_connected_sockets(&(vsk)->remote_addr, &(vsk)->local_addr)
189 static int vsock_auto_bind(struct vsock_sock *vsk) in vsock_auto_bind() argument
191 struct sock *sk = sk_vsock(vsk); in vsock_auto_bind()
194 if (vsock_addr_bound(&vsk->local_addr)) in vsock_auto_bind()
212 struct vsock_sock *vsk) in __vsock_insert_bound() argument
214 sock_hold(&vsk->sk); in __vsock_insert_bound()
215 list_add(&vsk->bound_table, list); in __vsock_insert_bound()
219 struct vsock_sock *vsk) in __vsock_insert_connected() argument
221 sock_hold(&vsk->sk); in __vsock_insert_connected()
[all …]
H A Dvirtio_transport_common.c29 static void virtio_transport_cancel_close_work(struct vsock_sock *vsk,
33 virtio_transport_get_ops(struct vsock_sock *vsk) in virtio_transport_get_ops() argument
35 const struct vsock_transport *t = vsock_core_get_transport(vsk); in virtio_transport_get_ops()
102 if (info->vsk && !skb_set_owner_sk_safe(skb, sk_vsock(info->vsk))) { in virtio_transport_alloc_skb()
202 static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, in virtio_transport_send_pkt_info() argument
212 info->type = virtio_transport_get_type(sk_vsock(vsk)); in virtio_transport_send_pkt_info()
214 t_ops = virtio_transport_get_ops(vsk); in virtio_transport_send_pkt_info()
219 src_port = vsk->local_addr.svm_port; in virtio_transport_send_pkt_info()
221 dst_cid = vsk->remote_addr.svm_cid; in virtio_transport_send_pkt_info()
222 dst_port = vsk->remote_addr.svm_port; in virtio_transport_send_pkt_info()
[all …]
H A Dvmci_transport.c60 static bool vmci_check_transport(struct vsock_sock *vsk);
286 struct vsock_sock *vsk; in vmci_transport_send_control_pkt() local
288 vsk = vsock_sk(sk); in vmci_transport_send_control_pkt()
290 if (!vsock_addr_bound(&vsk->local_addr)) in vmci_transport_send_control_pkt()
293 if (!vsock_addr_bound(&vsk->remote_addr)) in vmci_transport_send_control_pkt()
296 return vmci_transport_alloc_send_control_pkt(&vsk->local_addr, in vmci_transport_send_control_pkt()
297 &vsk->remote_addr, in vmci_transport_send_control_pkt()
319 struct vsock_sock *vsk; in vmci_transport_send_reset() local
324 vsk = vsock_sk(sk); in vmci_transport_send_reset()
326 if (!vsock_addr_bound(&vsk->local_addr)) in vmci_transport_send_reset()
[all …]
H A Dhyperv_transport.c95 struct vsock_sock *vsk; member
158 static bool hvs_check_transport(struct vsock_sock *vsk);
250 struct vsock_sock *vsk = vsock_sk(sk); in hvs_channel_cb() local
251 struct hvsock *hvs = vsk->trans; in hvs_channel_cb()
261 static void hvs_do_close_lock_held(struct vsock_sock *vsk, in hvs_do_close_lock_held() argument
264 struct sock *sk = sk_vsock(vsk); in hvs_do_close_lock_held()
267 vsk->peer_shutdown = SHUTDOWN_MASK; in hvs_do_close_lock_held()
268 if (vsock_stream_has_data(vsk) <= 0) in hvs_do_close_lock_held()
271 if (vsk->close_work_scheduled && in hvs_do_close_lock_held()
272 (!cancel_timeout || cancel_delayed_work(&vsk->close_work))) { in hvs_do_close_lock_held()
[all …]
H A Ddiag.c17 struct vsock_sock *vsk = vsock_sk(sk); in sk_diag_fill() local
37 rep->vdiag_src_cid = vsk->local_addr.svm_cid; in sk_diag_fill()
38 rep->vdiag_src_port = vsk->local_addr.svm_port; in sk_diag_fill()
39 rep->vdiag_dst_cid = vsk->remote_addr.svm_cid; in sk_diag_fill()
40 rep->vdiag_dst_port = vsk->remote_addr.svm_port; in sk_diag_fill()
51 struct vsock_sock *vsk; in vsock_diag_dump() local
76 list_for_each_entry(vsk, head, bound_table) { in vsock_diag_dump()
77 struct sock *sk = sk_vsock(vsk); in vsock_diag_dump()
106 list_for_each_entry(vsk, head, connected_table) { in vsock_diag_dump()
107 struct sock *sk = sk_vsock(vsk); in vsock_diag_dump()
[all …]
H A Dvsock_bpf.c27 struct vsock_sock *vsk = vsock_sk(sk); in vsock_has_data() local
30 ret = vsock_connectible_has_data(vsk); in vsock_has_data()
80 struct vsock_sock *vsk; in vsock_bpf_recvmsg() local
88 vsk = vsock_sk(sk); in vsock_bpf_recvmsg()
90 if (WARN_ON_ONCE(!vsk->transport)) { in vsock_bpf_recvmsg()
152 struct vsock_sock *vsk; in vsock_bpf_update_proto() local
160 vsk = vsock_sk(sk); in vsock_bpf_update_proto()
161 if (!vsk->transport) in vsock_bpf_update_proto()
164 if (!vsk->transport->read_skb) in vsock_bpf_update_proto()
H A Dvsock_loopback.c40 static int vsock_loopback_cancel_pkt(struct vsock_sock *vsk) in vsock_loopback_cancel_pkt() argument
44 virtio_transport_purge_skbs(vsk, &vsock->pkt_queue); in vsock_loopback_cancel_pkt()
H A Dvmci_transport_notify.h40 void (*socket_destruct) (struct vsock_sock *vsk);
H A Dvirtio_transport.c191 virtio_transport_cancel_pkt(struct vsock_sock *vsk) in virtio_transport_cancel_pkt() argument
203 cnt = virtio_transport_purge_skbs(vsk, &vsock->send_pkt_queue); in virtio_transport_cancel_pkt()
/openbmc/linux/include/linux/
H A Dvirtio_vsock.h126 struct vsock_sock *vsk; member
147 struct vsock_sock *vsk; member
165 virtio_transport_stream_dequeue(struct vsock_sock *vsk,
170 virtio_transport_dgram_dequeue(struct vsock_sock *vsk,
175 virtio_transport_seqpacket_enqueue(struct vsock_sock *vsk,
179 virtio_transport_seqpacket_dequeue(struct vsock_sock *vsk,
182 s64 virtio_transport_stream_has_data(struct vsock_sock *vsk);
183 s64 virtio_transport_stream_has_space(struct vsock_sock *vsk);
184 u32 virtio_transport_seqpacket_has_data(struct vsock_sock *vsk);
186 int virtio_transport_do_socket_init(struct vsock_sock *vsk,
[all …]
/openbmc/linux/include/net/
H A Daf_vsock.h78 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);
188 const struct vsock_transport *vsock_core_get_transport(struct vsock_sock *vsk);
[all …]
/openbmc/linux/drivers/vhost/
H A Dvsock.c295 vhost_transport_cancel_pkt(struct vsock_sock *vsk) in vhost_transport_cancel_pkt() argument
304 vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); in vhost_transport_cancel_pkt()
308 cnt = virtio_transport_purge_skbs(vsk, &vsock->send_pkt_queue); in vhost_transport_cancel_pkt()
689 struct vsock_sock *vsk = vsock_sk(sk); in vhost_vsock_reset_orphans() local
697 if (vhost_vsock_get(vsk->remote_addr.svm_cid)) in vhost_vsock_reset_orphans()
703 if (vsk->close_work_scheduled) in vhost_vsock_reset_orphans()
707 vsk->peer_shutdown = SHUTDOWN_MASK; in vhost_vsock_reset_orphans()
/openbmc/linux/tools/testing/vsock/
H A DREADME59 ./vsock_perf --port 1234 --buf-size 1M --vsk-size 1G --rcvlowat 64K