Displaying 20 results from an estimated 25 matches for "vsock_assign_transport".
2019 Nov 11
2
[PATCH net-next 11/14] vsock: add multi-transports support
...gt; to listen on all transports.
> - DGRAM sockets are handled as before, since only the vmci_transport
> provides this feature.
>
> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> ---
> RFC -> v1:
> - documented VSOCK_TRANSPORT_F_* flags
> - fixed vsock_assign_transport() when the socket is already assigned
> (e.g connection failed)
> - moved features outside of struct vsock_transport, and used as
> parameter of vsock_core_register()
> ---
> drivers/vhost/vsock.c | 5 +-
> include/net/af_vsock.h | 17 +-...
2019 Nov 11
2
[PATCH net-next 11/14] vsock: add multi-transports support
...gt; to listen on all transports.
> - DGRAM sockets are handled as before, since only the vmci_transport
> provides this feature.
>
> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> ---
> RFC -> v1:
> - documented VSOCK_TRANSPORT_F_* flags
> - fixed vsock_assign_transport() when the socket is already assigned
> (e.g connection failed)
> - moved features outside of struct vsock_transport, and used as
> parameter of vsock_core_register()
> ---
> drivers/vhost/vsock.c | 5 +-
> include/net/af_vsock.h | 17 +-...
2019 Oct 23
0
[PATCH net-next 11/14] vsock: add multi-transports support
...ports are not loaded or with VMADDR_CID_ANY
to listen on all transports.
- DGRAM sockets are handled as before, since only the vmci_transport
provides this feature.
Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
---
RFC -> v1:
- documented VSOCK_TRANSPORT_F_* flags
- fixed vsock_assign_transport() when the socket is already assigned
(e.g connection failed)
- moved features outside of struct vsock_transport, and used as
parameter of vsock_core_register()
---
drivers/vhost/vsock.c | 5 +-
include/net/af_vsock.h | 17 +-
net/vmw_vsock/af_vsock.c...
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...> to listen on all transports.
> - DGRAM sockets are handled as before, since only the vmci_transport
> provides this feature.
>
> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> ---
> RFC -> v1:
> - documented VSOCK_TRANSPORT_F_* flags
> - fixed vsock_assign_transport() when the socket is already assigned
> (e.g connection failed)
> - moved features outside of struct vsock_transport, and used as
> parameter of vsock_core_register()
> ---
> drivers/vhost/vsock.c | 5 +-
> include/net/af_vsock.h | 17 +-...
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...> to listen on all transports.
> - DGRAM sockets are handled as before, since only the vmci_transport
> provides this feature.
>
> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> ---
> RFC -> v1:
> - documented VSOCK_TRANSPORT_F_* flags
> - fixed vsock_assign_transport() when the socket is already assigned
> (e.g connection failed)
> - moved features outside of struct vsock_transport, and used as
> parameter of vsock_core_register()
> ---
> drivers/vhost/vsock.c | 5 +-
> include/net/af_vsock.h | 17 +-...
2019 Sep 27
0
[RFC PATCH 10/13] vsock: add multi-transports support
...ansport *vsock_core_get_transport(struct vsock_sock *vsk);
@@ -192,6 +194,7 @@ struct sock *vsock_find_connected_socket(struct sockaddr_vm *src,
struct sockaddr_vm *dst);
void vsock_remove_sock(struct vsock_sock *vsk);
void vsock_for_each_connected_socket(void (*fn)(struct sock *sk));
+int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk);
/**** TAP ****/
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 95e6db21e7e1..c52203fe52c4 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -130,7 +130,12 @@ static struct proto vsock_proto = {
#def...
2019 Nov 11
0
[PATCH net-next 11/14] vsock: add multi-transports support
...> - DGRAM sockets are handled as before, since only the vmci_transport
> > provides this feature.
> >
> > Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> > ---
> > RFC -> v1:
> > - documented VSOCK_TRANSPORT_F_* flags
> > - fixed vsock_assign_transport() when the socket is already assigned
> > (e.g connection failed)
> > - moved features outside of struct vsock_transport, and used as
> > parameter of vsock_core_register()
> > ---
> > drivers/vhost/vsock.c | 5 +-
> > include/net/af_vsoc...
2023 Aug 04
0
[PATCH RFC net-next v5 03/14] af_vsock: support multi-transport datagrams
...> > > > > /* Assign a transport to a socket and call the .init transport callback.
>> > > > > *
>> > > > > * Note: for connection oriented socket this must be called when vsk->remote_addr
>> > > > > @@ -475,7 +487,8 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk)
>> > > > >
>> > > > > switch (sk->sk_type) {
>> > > > > case SOCK_DGRAM:
>> > > > > - new_transport = transport_dgram;
>> > > > > + new_transport = vsoc...
2019 Nov 12
2
[PATCH net-next 11/14] vsock: add multi-transports support
...s before, since only the vmci_transport
> > > provides this feature.
> > >
> > > Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> > > ---
> > > RFC -> v1:
> > > - documented VSOCK_TRANSPORT_F_* flags
> > > - fixed vsock_assign_transport() when the socket is already assigned
> > > (e.g connection failed)
> > > - moved features outside of struct vsock_transport, and used as
> > > parameter of vsock_core_register()
> > > ---
> > > drivers/vhost/vsock.c | 5 +-
>...
2019 Nov 12
2
[PATCH net-next 11/14] vsock: add multi-transports support
...s before, since only the vmci_transport
> > > provides this feature.
> > >
> > > Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> > > ---
> > > RFC -> v1:
> > > - documented VSOCK_TRANSPORT_F_* flags
> > > - fixed vsock_assign_transport() when the socket is already assigned
> > > (e.g connection failed)
> > > - moved features outside of struct vsock_transport, and used as
> > > parameter of vsock_core_register()
> > > ---
> > > drivers/vhost/vsock.c | 5 +-
>...
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...
2019 Sep 27
0
[RFC PATCH 12/13] vsock: prevent transport modules unloading
...e *module;
/* Initialize/tear-down socket. */
int (*init)(struct vsock_sock *, struct vsock_sock *);
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index c5f46b8242ce..750b62711b01 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -416,13 +416,28 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk)
return -ESOCKTNOSUPPORT;
}
- if (!vsk->transport)
+ /* We increase the module refcnt to prevent the tranport unloading
+ * while there are open sockets assigned to it.
+ */
+ if (!vsk->transport || !try_module_get(vsk->transport->...
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
...- Added R-b/A-b from Dexuan and Stefan
- Fixed comments and typos in several patches (Stefan)
- Patch 7: changed .notify_buffer_size return to void (Stefan)
- Added patch 8 to simplify the API exposed to the transports (Stefan)
- Patch 11:
+ documented VSOCK_TRANSPORT_F_* flags (Stefan)
+ fixed vsock_assign_transport() when the socket is already assigned
+ moved features outside of struct vsock_transport, and used as
parameter of vsock_core_register() as a preparation of Patch 12
- Removed "vsock: add 'transport_hg' to handle g2h\h2g transports" patch
- Added patch 12 to register vmci_tr...
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
...- Added R-b/A-b from Dexuan and Stefan
- Fixed comments and typos in several patches (Stefan)
- Patch 7: changed .notify_buffer_size return to void (Stefan)
- Added patch 8 to simplify the API exposed to the transports (Stefan)
- Patch 11:
+ documented VSOCK_TRANSPORT_F_* flags (Stefan)
+ fixed vsock_assign_transport() when the socket is already assigned
+ moved features outside of struct vsock_transport, and used as
parameter of vsock_core_register() as a preparation of Patch 12
- Removed "vsock: add 'transport_hg' to handle g2h\h2g transports" patch
- Added patch 12 to register vmci_tr...
2019 Nov 12
0
[PATCH net-next 11/14] vsock: add multi-transports support
...port
> > > > provides this feature.
> > > >
> > > > Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> > > > ---
> > > > RFC -> v1:
> > > > - documented VSOCK_TRANSPORT_F_* flags
> > > > - fixed vsock_assign_transport() when the socket is already assigned
> > > > (e.g connection failed)
> > > > - moved features outside of struct vsock_transport, and used as
> > > > parameter of vsock_core_register()
> > > > ---
> > > > drivers/vhost/vsock.c...
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
Hi all,
this series adds the multi-transports support to vsock, following
this proposal:
https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use vsock with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
Hi all,
this series adds the multi-transports support to vsock, following
this proposal:
https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use vsock with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using
2019 Nov 14
15
[PATCH net-next v2 00/15] vsock: add multi-transports support
...vmci_transport only when VMCI guest/host
are active
- [15/15] vhost/vsock: refuse CID assigned to the guest->host transport
RFC: https://patchwork.ozlabs.org/cover/1168442/
v1: https://patchwork.ozlabs.org/cover/1181986/
v1 -> v2:
- Patch 11:
+ vmci_transport: sent reset when vsock_assign_transport() fails
[Jorgen]
+ fixed loopback in the guests, checking if the remote_addr is the
same of transport_g2h->get_local_cid()
+ virtio_transport_common: updated space available while creating
the new child socket during a connection request
- Patch 12:
+ removed 'f...
2019 Oct 27
0
[PATCH net-next 00/14] vsock: add multi-transports support
...d Stefan
> - Fixed comments and typos in several patches (Stefan)
> - Patch 7: changed .notify_buffer_size return to void (Stefan)
> - Added patch 8 to simplify the API exposed to the transports (Stefan)
> - Patch 11:
> + documented VSOCK_TRANSPORT_F_* flags (Stefan)
> + fixed vsock_assign_transport() when the socket is already assigned
> + moved features outside of struct vsock_transport, and used as
> parameter of vsock_core_register() as a preparation of Patch 12
> - Removed "vsock: add 'transport_hg' to handle g2h\h2g transports" patch
> - Added patch 12...
2019 Oct 30
0
[PATCH net-next 11/14] vsock: add multi-transports support
...> > + * 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;
> > + struct sock *sk = sk_vsock(vsk);
> > +
> > + switch (sk->sk_type) {
> > + case SOCK_DGRAM:
> > + new_tra...