search for: svm_port

Displaying 20 results from an estimated 78 matches for "svm_port".

2015 May 27
0
[RFC 1/6] VSOCK: Introduce vsock_find_unbound_socket and vsock_bind_dgram_generic
...c @@ -224,6 +224,17 @@ static struct sock *__vsock_find_bound_socket(struct sockaddr_vm *addr) return NULL; } +static struct sock *__vsock_find_unbound_socket(struct sockaddr_vm *addr) +{ + struct vsock_sock *vsk; + + list_for_each_entry(vsk, vsock_unbound_sockets, bound_table) + if (addr->svm_port == vsk->local_addr.svm_port) + return sk_vsock(vsk); + + return NULL; +} + static struct sock *__vsock_find_connected_socket(struct sockaddr_vm *src, struct sockaddr_vm *dst) { @@ -299,6 +310,21 @@ struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr) } EXPORT_SYMBOL_GPL(...
2019 Sep 27
0
[RFC PATCH 13/13] vsock: fix bind() behaviour taking care of CID
...62711b01..bffa6fa7b8e5 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -230,10 +230,16 @@ static struct sock *__vsock_find_bound_socket(struct sockaddr_vm *addr) { struct vsock_sock *vsk; - list_for_each_entry(vsk, vsock_bound_sockets(addr), bound_table) - if (addr->svm_port == vsk->local_addr.svm_port) + list_for_each_entry(vsk, vsock_bound_sockets(addr), bound_table) { + if (vsock_addr_equals_addr(addr, &vsk->local_addr)) return sk_vsock(vsk); + if (addr->svm_port == vsk->local_addr.svm_port && + (vsk->local_addr.svm_cid == VMA...
2019 Oct 23
0
[PATCH net-next 14/14] vsock: fix bind() behaviour taking care of CID
...707cae66..7183de277072 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -228,10 +228,16 @@ static struct sock *__vsock_find_bound_socket(struct sockaddr_vm *addr) { struct vsock_sock *vsk; - list_for_each_entry(vsk, vsock_bound_sockets(addr), bound_table) - if (addr->svm_port == vsk->local_addr.svm_port) + list_for_each_entry(vsk, vsock_bound_sockets(addr), bound_table) { + if (vsock_addr_equals_addr(addr, &vsk->local_addr)) return sk_vsock(vsk); + if (addr->svm_port == vsk->local_addr.svm_port && + (vsk->local_addr.svm_cid == VMA...
2019 Oct 18
5
[PATCH libnbd 0/2] api: Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
2019 Oct 18
0
[PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...the socket, but don't fail. */ static void disable_nagle (int sock) @@ -118,6 +122,24 @@ STATE_MACHINE { SET_NEXT_STATE (%^CONNECT.START); return 0; + CONNECT_VSOCK.START: +#ifdef AF_VSOCK + struct sockaddr_vm svm = { + .svm_family = AF_VSOCK, + .svm_cid = h->svm_cid, + .svm_port = h->svm_port, + }; + const socklen_t len = sizeof svm; + + memcpy (&h->connaddr, &svm, len); + h->connaddrlen = len; + SET_NEXT_STATE (%^CONNECT.START); + return 0; +#else + set_error (ENOTSUP, "AF_VSOCK protocol is not supported"); + SET_NEXT_STATE (%.DEAD); +#e...
2019 Oct 18
4
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...able_nagle (int sock) > @@ -118,6 +122,24 @@ STATE_MACHINE { > SET_NEXT_STATE (%^CONNECT.START); > return 0; > > + CONNECT_VSOCK.START: > +#ifdef AF_VSOCK > + struct sockaddr_vm svm = { > + .svm_family = AF_VSOCK, > + .svm_cid = h->svm_cid, > + .svm_port = h->svm_port, > + }; Are there scenarios (mismatch in kernel vs. headers compiled against, for instance) where compilation says AF_VSOCK exists but where all attempts at vsock fail? If so, is there anything that we should check dynamically, rather than just compile-time presence of AF_...
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2019 Oct 18
0
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...gt;@@ -118,6 +122,24 @@ STATE_MACHINE { > > SET_NEXT_STATE (%^CONNECT.START); > > return 0; > >+ CONNECT_VSOCK.START: > >+#ifdef AF_VSOCK > >+ struct sockaddr_vm svm = { > >+ .svm_family = AF_VSOCK, > >+ .svm_cid = h->svm_cid, > >+ .svm_port = h->svm_port, > >+ }; > > Are there scenarios (mismatch in kernel vs. headers compiled > against, for instance) where compilation says AF_VSOCK exists but > where all attempts at vsock fail? If so, is there anything that we > should check dynamically, rather than just co...
2016 Dec 07
1
[PATCH 09/10] vsock/virtio: fix src/dst cid format
...rc_cid), > le32_to_cpu(pkt->hdr.src_port)); > - vsock_addr_init(&dst, le32_to_cpu(pkt->hdr.dst_cid), > + vsock_addr_init(&dst, le64_to_cpu(pkt->hdr.dst_cid), > le32_to_cpu(pkt->hdr.dst_port)); > > trace_virtio_transport_recv_pkt(src.svm_cid, src.svm_port,
2016 Dec 07
1
[PATCH 09/10] vsock/virtio: fix src/dst cid format
...rc_cid), > le32_to_cpu(pkt->hdr.src_port)); > - vsock_addr_init(&dst, le32_to_cpu(pkt->hdr.dst_cid), > + vsock_addr_init(&dst, le64_to_cpu(pkt->hdr.dst_cid), > le32_to_cpu(pkt->hdr.dst_port)); > > trace_virtio_transport_recv_pkt(src.svm_cid, src.svm_port,
2013 Jan 25
4
[PATCH 0/1] VM Sockets for Linux upstreaming
From: Andy King <acking at vmware.com> ** Introduce VM Sockets *** In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the VM Sockets (VSOCK, formerly VMCI Sockets) (vmw_vsock) kernel module for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vsock kernel module. Unlike previous
2013 Jan 25
4
[PATCH 0/1] VM Sockets for Linux upstreaming
From: Andy King <acking at vmware.com> ** Introduce VM Sockets *** In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the VM Sockets (VSOCK, formerly VMCI Sockets) (vmw_vsock) kernel module for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vsock kernel module. Unlike previous
2012 Oct 16
11
[PATCH 0/6] VSOCK for Linux upstreaming
* * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (VSOCK) (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vsock kernel module. The vmw_vmci kernel module has been presented in
2012 Oct 16
11
[PATCH 0/6] VSOCK for Linux upstreaming
* * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (VSOCK) (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vsock kernel module. The vmw_vmci kernel module has been presented in
2013 Jan 08
7
[PATCH 0/6] VSOCK for Linux upstreaming
* * * This series of VSOCK linux upstreaming patches include latest udpate from VMware to address Greg's and all other's code review comments. Summary of changes: - Rebase our linux kernel tree from v3.5 to v3.7. - Fix all checkpatch warnings and errors. Fix some checkpatch with -strict errors. This addresses Greg's comment: On 15 Nov 2012
2013 Jan 08
7
[PATCH 0/6] VSOCK for Linux upstreaming
* * * This series of VSOCK linux upstreaming patches include latest udpate from VMware to address Greg's and all other's code review comments. Summary of changes: - Rebase our linux kernel tree from v3.5 to v3.7. - Fix all checkpatch warnings and errors. Fix some checkpatch with -strict errors. This addresses Greg's comment: On 15 Nov 2012
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...32 src_cid, src_port, dst_cid, dst_port; - struct virtio_transport *trans; - struct virtio_vsock_pkt *pkt; - struct vhost_virtqueue *vq; - struct vhost_vsock *vsock; - u32 pkt_len = info->pkt_len; - DEFINE_WAIT(wait); - - src_cid = vhost_transport_get_local_cid(); - src_port = vsk->local_addr.svm_port; - if (!info->remote_cid) { - dst_cid = vsk->remote_addr.svm_cid; - dst_port = vsk->remote_addr.svm_port; - } else { - dst_cid = info->remote_cid; - dst_port = info->remote_port; - } - - /* Find the vhost_vsock according to guest context id */ - vsock = vhost_vsock_get(dst_cid);...
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...32 src_cid, src_port, dst_cid, dst_port; - struct virtio_transport *trans; - struct virtio_vsock_pkt *pkt; - struct vhost_virtqueue *vq; - struct vhost_vsock *vsock; - u32 pkt_len = info->pkt_len; - DEFINE_WAIT(wait); - - src_cid = vhost_transport_get_local_cid(); - src_port = vsk->local_addr.svm_port; - if (!info->remote_cid) { - dst_cid = vsk->remote_addr.svm_cid; - dst_port = vsk->remote_addr.svm_port; - } else { - dst_cid = info->remote_cid; - dst_port = info->remote_port; - } - - /* Find the vhost_vsock according to guest context id */ - vsock = vhost_vsock_get(dst_cid);...
2015 Dec 08
8
[PATCH 0/6] VSOCK: revert virtio-vsock until device spec is finalized
The virtio-vsock device specification is not finalized yet. Michael Tsirkin voiced concerned about merging this code when the hardware interface (and possibly the userspace interface) could still change. Please revert for now. I am working to finalize the virtio-vsock device specification and at that point the interfaces will be stable. Stefan Hajnoczi (6): Revert "VSOCK: fix