search for: vmaddr_cid_host

Displaying 20 results from an estimated 64 matches for "vmaddr_cid_host".

2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...gt; support DGRAM (only vmci) > - each stream socket is assigned to a transport when the remote CID > is set (during the connect() or when we receive a connection request > on a listener socket). > The remote CID is used to decide which transport to use: > - remote CID > VMADDR_CID_HOST will use host->guest transport > - remote CID <= VMADDR_CID_HOST will use guest->host transport > - listener sockets are not bound to any transports since no transport > operations are done on it. In this way we can create a listener > socket, also if the transports are n...
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...gt; support DGRAM (only vmci) > - each stream socket is assigned to a transport when the remote CID > is set (during the connect() or when we receive a connection request > on a listener socket). > The remote CID is used to decide which transport to use: > - remote CID > VMADDR_CID_HOST will use host->guest transport > - remote CID <= VMADDR_CID_HOST will use guest->host transport > - listener sockets are not bound to any transports since no transport > operations are done on it. In this way we can create a listener > socket, also if the transports are n...
2019 Sep 27
0
[RFC PATCH 09/13] hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
Remote peer is always the host, so we set VMADDR_CID_HOST as remote CID instead of VMADDR_CID_ANY. Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- net/vmw_vsock/hyperv_transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c index 4f47af2054...
2019 Nov 11
2
[PATCH net-next 11/14] vsock: add multi-transports support
...specific transport, i.e., if it binds to the host CID, it will use H2G, and if it binds to something else it will use G2H? You can still use VMADDR_CID_ANY if you want to initially listen to both transports. > The remote CID is used to decide which transport to use: > - remote CID > VMADDR_CID_HOST will use host->guest transport > - remote CID <= VMADDR_CID_HOST will use guest->host transport > - listener sockets are not bound to any transports since no transport > operations are done on it. In this way we can create a listener > socket, also if the transports are n...
2019 Nov 11
2
[PATCH net-next 11/14] vsock: add multi-transports support
...specific transport, i.e., if it binds to the host CID, it will use H2G, and if it binds to something else it will use G2H? You can still use VMADDR_CID_ANY if you want to initially listen to both transports. > The remote CID is used to decide which transport to use: > - remote CID > VMADDR_CID_HOST will use host->guest transport > - remote CID <= VMADDR_CID_HOST will use guest->host transport > - listener sockets are not bound to any transports since no transport > operations are done on it. In this way we can create a listener > socket, also if the transports are n...
2019 Oct 30
0
[PATCH net-next 11/14] vsock: add multi-transports support
...ust be called when vsk->remote_addr > > +is set > > + * (e.g. during the connect() or when a connection request on a > > +listener > > + * socket is received). > > + * The vsk->remote_addr is used to decide which transport to use: > > + * - remote CID > VMADDR_CID_HOST will use host->guest transport > > + * - remote CID <= VMADDR_CID_HOST will use guest->host transport > > +*/ int vsock_assign_transport(struct vsock_sock *vsk, struct > > +vsock_sock *psk) { > > + const struct vsock_transport *new_transport; > > +...
2019 Nov 21
1
[PATCH net-next 5/6] vsock: use local transport when it is loaded
On Tue, Nov 19, 2019 at 12:01:20PM +0100, Stefano Garzarella wrote: > @@ -420,9 +436,10 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk) > new_transport = transport_dgram; > break; > case SOCK_STREAM: > - if (remote_cid <= VMADDR_CID_HOST || > - (transport_g2h && > - remote_cid == transport_g2h->get_local_cid())) > + if (vsock_use_local_transport(remote_cid)) > + new_transport = transport_local; > + else if (remote_cid == VMADDR_CID_HOST || > + remote_cid == VMADDR_CID_HYPERVISOR) >...
2019 Nov 11
0
[PATCH net-next 11/14] vsock: add multi-transports support
...sockets don't use any transport specific callback (they don't send any data to the remote peer), but they are used as placeholder, we don't need to assign them to a transport. > > > > The remote CID is used to decide which transport to use: > > - remote CID > VMADDR_CID_HOST will use host->guest transport > > - remote CID <= VMADDR_CID_HOST will use guest->host transport > > - listener sockets are not bound to any transports since no transport > > operations are done on it. In this way we can create a listener > > socket, also if...
2019 Sep 27
0
[RFC PATCH 11/13] vsock: add 'transport_hg' to handle g2h\h2g transports
...c const struct vsock_transport *transport_dgram; static DEFINE_MUTEX(vsock_register_mutex); @@ -402,10 +404,13 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk) vsk->transport = transport_dgram; break; case SOCK_STREAM: - if (vsk->remote_addr.svm_cid > VMADDR_CID_HOST) + if (vsk->remote_addr.svm_cid > VMADDR_CID_HOST) { vsk->transport = transport_h2g; - else + if (!vsk->transport) + vsk->transport = transport_hg; + } else { vsk->transport = transport_g2h; + } break; default: return -ESOCKTNOSUPPORT; @@ -423,7 +428,7 @@...
2019 Nov 12
2
[PATCH net-next 11/14] vsock: add multi-transports support
...ecific callback > (they don't send any data to the remote peer), but they are used as > placeholder, > we don't need to assign them to a transport. > > > > > > > > The remote CID is used to decide which transport to use: > > > - remote CID > VMADDR_CID_HOST will use host->guest transport > > > - remote CID <= VMADDR_CID_HOST will use guest->host transport > > > - listener sockets are not bound to any transports since no transport > > > operations are done on it. In this way we can create a listener > > &gt...
2019 Nov 12
2
[PATCH net-next 11/14] vsock: add multi-transports support
...ecific callback > (they don't send any data to the remote peer), but they are used as > placeholder, > we don't need to assign them to a transport. > > > > > > > > The remote CID is used to decide which transport to use: > > > - remote CID > VMADDR_CID_HOST will use host->guest transport > > > - remote CID <= VMADDR_CID_HOST will use guest->host transport > > > - listener sockets are not bound to any transports since no transport > > > operations are done on it. In this way we can create a listener > > &gt...
2019 Dec 10
7
[PATCH net-next v2 0/6] vsock: add local transport support
...e user can use the loopback with the new VMADDR_CID_LOCAL (that replaces VMADDR_CID_RESERVED) in any condition. Otherwise, if the G2H transport is loaded, it can also use the guest local CID as previously supported by vmci and virtio transports. If G2H transport is not loaded, the user can also use VMADDR_CID_HOST for local communication. Patch 1 is a cleanup to build virtio_transport_common without virtio Patch 2 adds the new VMADDR_CID_LOCAL, replacing VMADDR_CID_RESERVED Patch 3 adds a new feature flag to register a loopback transport Patch 4 adds the new vsock_loopback transport based on the loopback...
2019 Nov 12
0
[PATCH net-next 11/14] vsock: add multi-transports support
...t send any data to the remote peer), but they are used as > > placeholder, > > we don't need to assign them to a transport. > > > > > > > > > > > > The remote CID is used to decide which transport to use: > > > > - remote CID > VMADDR_CID_HOST will use host->guest transport > > > > - remote CID <= VMADDR_CID_HOST will use guest->host transport > > > > - listener sockets are not bound to any transports since no transport > > > > operations are done on it. In this way we can create a listene...
2019 Oct 23
0
[PATCH net-next 11/14] vsock: add multi-transports support
...t can handle and if it's support DGRAM (only vmci) - each stream socket is assigned to a transport when the remote CID is set (during the connect() or when we receive a connection request on a listener socket). The remote CID is used to decide which transport to use: - remote CID > VMADDR_CID_HOST will use host->guest transport - remote CID <= VMADDR_CID_HOST will use guest->host transport - listener sockets are not bound to any transports since no transport operations are done on it. In this way we can create a listener socket, also if the transports are not loaded or with VM...
2019 Sep 27
0
[RFC PATCH 10/13] vsock: add multi-transports support
...d to vsock_core_register() and vsock_core_unregister() - each stream socket is assigned to a transport when the remote CID is set (during the connect() or when we receive a connection request on a listener socket). The remote CID is used to decide which transport to use: - remote CID > VMADDR_CID_HOST will use host->guest transport - remote CID <= VMADDR_CID_HOST will use guest->host transport - listener sockets are not bound to any transports since no transport operations are done on it. In this way we can create a listener socket, also if the transports are not loaded or with VM...
2019 Aug 01
0
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
...EPIPE); - recv_byte(fd, 1); + + /* Skip the read of data wrote by the peer if we are on VMCI and + * we are on the host side, because when the guest closes a + * connection, all data is gone and EOF is returned. + */ + if (!(opts->transport == TEST_TRANSPORT_VMCI && + local_cid == VMADDR_CID_HOST)) + recv_byte(fd, 1); + recv_byte(fd, 0); close(fd); } static void test_stream_server_close_client(const struct test_opts *opts) { + unsigned int local_cid; int fd; fd = vsock_stream_connect(opts->peer_cid, 1234); @@ -97,10 +109,20 @@ static void test_stream_server_close_client(c...
2019 Aug 01
1
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
...of data wrote by the peer if we are on VMCI and s/wrote/written/? > + * we are on the host side, because when the guest closes a > + * connection, all data is gone and EOF is returned. > + */ > + if (!(opts->transport == TEST_TRANSPORT_VMCI && > + local_cid == VMADDR_CID_HOST)) > + recv_byte(fd, 1); > + > recv_byte(fd, 0); > close(fd); > } [...] MBR, Sergei
2019 Oct 18
2
Re: [PATCH nbdkit] Add support for AF_VSOCK.
...currently) nbdkit can act as > a vsock server. Guests running on the host see a raw NBD socket which > it can connect to by opening an AF_VSOCK connection. (Although only > libnbd supports this). > > The current limitations are: > > * nbdkit can only act as a host (cid == VMADDR_CID_HOST == 2). How hard would it be to allow a different cid to run a server on the guest and client on the host? > > * There is no access control. Any guest which has vsock enabled can > open the socket. Well, there's TLS if you need it. > > * nbdkit can only listen on e...
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
2019 Oct 18
0
[PATCH nbdkit] Add support for AF_VSOCK.
...tforms which support it (only Linux currently) nbdkit can act as a vsock server. Guests running on the host see a raw NBD socket which it can connect to by opening an AF_VSOCK connection. (Although only libnbd supports this). The current limitations are: * nbdkit can only act as a host (cid == VMADDR_CID_HOST == 2). * There is no access control. Any guest which has vsock enabled can open the socket. * nbdkit can only listen on either TCP/IP or AF_VSOCK, not both at the same time. (The same currently applies to TCP/IP vs AF_UNIX so this is not a new restriction). * Lacks a test because y...