Displaying 20 results from an estimated 23 matches for "svm_family".
Did you mean:
sa_family
2013 Mar 07
2
[PATCH] VSOCK: Split vm_sockets.h into kernel/uapi
...* that of struct sockaddr.
+ * AF_VSOCK. The structure members should all align on their natural
+ * boundaries without resorting to compiler packing directives. The total size
+ * of this structure should be exactly the same as that of struct sockaddr.
*/
struct sockaddr_vm {
- sa_family_t svm_family;
+ __kernel_sa_family_t svm_family;
unsigned short svm_reserved1;
unsigned int svm_port;
unsigned int svm_cid;
@@ -156,8 +153,4 @@ struct sockaddr_vm {
#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)
-#if defined(__KERNEL__)
-int vm_sockets_get_local_cid(void);
-#endif
-
-#endif
+#e...
2013 Mar 07
2
[PATCH] VSOCK: Split vm_sockets.h into kernel/uapi
...* that of struct sockaddr.
+ * AF_VSOCK. The structure members should all align on their natural
+ * boundaries without resorting to compiler packing directives. The total size
+ * of this structure should be exactly the same as that of struct sockaddr.
*/
struct sockaddr_vm {
- sa_family_t svm_family;
+ __kernel_sa_family_t svm_family;
unsigned short svm_reserved1;
unsigned int svm_port;
unsigned int svm_cid;
@@ -156,8 +153,4 @@ struct sockaddr_vm {
#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)
-#if defined(__KERNEL__)
-int vm_sockets_get_local_cid(void);
-#endif
-
-#endif
+#e...
2019 Aug 01
13
[PATCH v2 00/11] VSOCK: add vsock_test test suite
The vsock_diag.ko module already has a test suite but the core AF_VSOCK
functionality has no tests. This patch series adds several test cases that
exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept,
half-closed connections, simultaneous connections).
Stefan: Do you think we should have a single application or is better to
split it in single tests (e.g.
2019 Oct 18
4
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...hm on 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,
> + };
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 shou...
2019 Dec 18
13
[PATCH net-next v3 00/11] VSOCK: add vsock_test test suite
The vsock_diag.ko module already has a test suite but the core AF_VSOCK
functionality has no tests. This patch series adds several test cases that
exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept,
half-closed connections, simultaneous connections).
The v1 of this series was originally sent by Stefan.
v3:
- Patch 6:
* check the byte received in the recv_byte()
* use
2019 Oct 18
0
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...9;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,
> >+ };
>
> 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,...
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 Aug 01
0
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...rrno.h>
+#include <unistd.h>
+
+#include "timeout.h"
+#include "control.h"
+#include "util.h"
+
+static void test_stream_connection_reset(const struct test_opts *opts)
+{
+ union {
+ struct sockaddr sa;
+ struct sockaddr_vm svm;
+ } addr = {
+ .svm = {
+ .svm_family = AF_VSOCK,
+ .svm_port = 1234,
+ .svm_cid = opts->peer_cid,
+ },
+ };
+ int ret;
+ int fd;
+
+ fd = socket(AF_VSOCK, SOCK_STREAM, 0);
+
+ timeout_begin(TIMEOUT);
+ do {
+ ret = connect(fd, &addr.sa, sizeof(addr.svm));
+ timeout_check("connect");
+ } while (ret < 0 &&...
2019 Oct 18
0
[PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...sockets.h>
+#endif
+
/* Disable Nagle's algorithm on 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 protoco...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...uot;util.h"
> +
> +static void test_stream_connection_reset(const struct test_opts *opts)
> +{
> + union {
> + struct sockaddr sa;
> + struct sockaddr_vm svm;
> + } addr = {
> + .svm = {
> + .svm_family = AF_VSOCK,
> + .svm_port = 1234,
> + .svm_cid = opts->peer_cid,
> + },
> + };
> + int ret;
> + int fd;
> +
> + fd = socket(AF_VSOCK, SOCK_STREAM, 0);
> +
> + timeout_begin(TIMEO...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...uot;util.h"
> +
> +static void test_stream_connection_reset(const struct test_opts *opts)
> +{
> + union {
> + struct sockaddr sa;
> + struct sockaddr_vm svm;
> + } addr = {
> + .svm = {
> + .svm_family = AF_VSOCK,
> + .svm_port = 1234,
> + .svm_cid = opts->peer_cid,
> + },
> + };
> + int ret;
> + int fd;
> +
> + fd = socket(AF_VSOCK, SOCK_STREAM, 0);
> +
> + timeout_begin(TIMEO...
2019 Oct 18
0
[PATCH nbdkit] Add support for AF_VSOCK.
...up, so there is no
+ * risk of the fd leaking to a plugin's fork()
+ */
+ sock = set_cloexec (socket (AF_VSOCK, SOCK_STREAM, 0));
+#endif
+ if (sock == -1) {
+ perror ("bind_unix_socket: socket");
+ exit (EXIT_FAILURE);
+ }
+
+ memset (&addr, 0, sizeof addr);
+ addr.svm_family = AF_VSOCK;
+ addr.svm_cid = VMADDR_CID_HOST;
+ addr.svm_port = vsock_port;
+
+ if (bind (sock, (struct sockaddr *) &addr, sizeof addr) == -1) {
+ perror (unixsocket);
+ exit (EXIT_FAILURE);
+ }
+
+ if (listen (sock, SOMAXCONN) == -1) {
+ perror ("listen");
+ exit (EX...
2019 Oct 18
1
[PATCH nbdkit v2] Add support for AF_VSOCK.
v1 was discussed here:
https://www.redhat.com/archives/libguestfs/2019-October/thread.html#00100
v2:
- Bind to VMADDR_CID_ANY (instead of HOST) and update the
documentation accordingly.
- Don't bother with SOCK_CLOEXEC fallback path that can
never be used.
Rich.
2019 Oct 18
2
[PATCH nbdkit] 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
2012 Nov 21
6
[PATCH 0/6] VSOCK for Linux upstreaming
* * *
This series of VSOCK linux upstreaming patches include latest udpate from
VMware.
Summary of changes:
- Sparse clean.
- Checkpatch clean with one exception, a "complex macro" in
which we can't add parentheses.
- Remove all runtime assertions.
- Fix device name, so that existing user clients work.
- Fix VMCI handle lookup.
* *
2012 Nov 21
6
[PATCH 0/6] VSOCK for Linux upstreaming
* * *
This series of VSOCK linux upstreaming patches include latest udpate from
VMware.
Summary of changes:
- Sparse clean.
- Checkpatch clean with one exception, a "complex macro" in
which we can't add parentheses.
- Remove all runtime assertions.
- Fix device name, so that existing user clients work.
- Fix VMCI handle lookup.
* *
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 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