search for: new_transport

Displaying 17 results from an estimated 17 matches for "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...
2019 Nov 11
2
[PATCH net-next 11/14] vsock: add multi-transports support
...port 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_transport = transport_dgram; > + break; > + case SOCK_STREAM: > + if (vsk->remote_addr.svm_cid > VMADDR_CID_HOST) > + new_transport = transport_h2g; > + els...
2019 Nov 11
2
[PATCH net-next 11/14] vsock: add multi-transports support
...port 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_transport = transport_dgram; > + break; > + case SOCK_STREAM: > + if (vsk->remote_addr.svm_cid > VMADDR_CID_HOST) > + new_transport = transport_h2g; > + els...
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...> + * - 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_transport = transport_dgram; > + break; > + case SOCK_STREAM: > + if (vsk->remote_addr.svm_cid > VMADD...
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...> + * - 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_transport = transport_dgram; > + break; > + case SOCK_STREAM: > + if (vsk->remote_addr.svm_cid > VMADD...
2019 Nov 11
0
[PATCH net-next 11/14] vsock: add multi-transports support
...* - 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_transport = transport_dgram; > > + break; > > + case SOCK_STREAM: > > + if (vsk->remote_addr.svm_cid > VMADDR_CID_HOST) > > +...
2019 Oct 30
0
[PATCH net-next 11/14] vsock: add multi-transports support
...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_transport = transport_dgram; > > + break; > > + case SOCK_STREAM: > > + if...
2019 Nov 12
2
[PATCH net-next 11/14] vsock: add multi-transports support
...DDR_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_transport = transport_dgram; > > > + break; > > > + case SOCK_STREAM: > > > + if (vsk->remote_addr.s...
2019 Nov 12
2
[PATCH net-next 11/14] vsock: add multi-transports support
...DDR_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_transport = transport_dgram; > > > + break; > > > + case SOCK_STREAM: > > > + if (vsk->remote_addr.s...
2019 Oct 23
0
[PATCH net-next 13/14] vsock: prevent transport modules unloading
...m socket this must be called when vsk->remote_addr is set @@ -413,10 +423,13 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk) return 0; vsk->transport->release(vsk); - vsk->transport->destruct(vsk); + vsock_deassign_transport(vsk); } - if (!new_transport) + /* We increase the module refcnt to prevent the transport unloading + * while there are open sockets assigned to it. + */ + if (!new_transport || !try_module_get(new_transport->module)) return -ENODEV; vsk->transport = new_transport; @@ -737,8 +750,7 @@ static void vsock_sk_destru...
2019 Nov 12
0
[PATCH net-next 11/14] vsock: add multi-transports support
...t->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_transport = transport_dgram; > > > > + break; > > > > + case SOCK_STREAM: > &gt...
2019 Oct 23
0
[PATCH net-next 11/14] vsock: add multi-transports support
...ed 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_transport = transport_dgram; + break; + case SOCK_STREAM: + if (vsk->remote_addr.svm_cid > VMADDR_CID_HOST) + new_transport = transport_h2g; + else + new_transport = transport_g2h; + break; + d...
2019 Dec 10
7
[PATCH net-next v2 0/6] vsock: add local transport support
v2: - style fixes [Dave] - removed RCU sync and changed 'the_vsock_loopback' in a global static variable [Stefan] - use G2H transport when local transport is not loaded and remote cid is VMADDR_CID_LOCAL [Stefan] - rebased on net-next v1: https://patchwork.kernel.org/cover/11251735/ This series introduces a new transport (vsock_loopback) to handle local communication. This
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
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 VMware
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
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 VMware
2023 Aug 04
0
[PATCH RFC net-next v5 03/14] af_vsock: support multi-transport datagrams
...mote_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 = vsock_dgram_lookup_transport(remote_cid, >> > > > > + remote_flags); >> > > > >> > > > I'm a little bit confused about this: >> > > > 1) Let's create...
2019 Nov 14
15
[PATCH net-next v2 00/15] vsock: add multi-transports support
Most of the patches are reviewed by Dexuan, Stefan, and Jorgen. The following patches need reviews: - [11/15] vsock: add multi-transports support - [12/15] vsock/vmci: register 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: