Displaying 20 results from an estimated 46 matches for "vsock_core_get_transport".
2019 Sep 27
0
[RFC PATCH 06/13] vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
Since now the 'struct vsock_sock' object contains a pointer to
the transport, this patch adds a parameter to the
vsock_core_get_transport() to return the right transport
assigned to the socket.
This patch modifies also the virtio_transport_get_ops(), that
uses the vsock_core_get_transport(), adding the
'struct vsock_sock *' parameter.
Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
---
include/net/af_vsock...
2019 Oct 23
0
[PATCH net-next 06/14] vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
Since now the 'struct vsock_sock' object contains a pointer to
the transport, this patch adds a parameter to the
vsock_core_get_transport() to return the right transport
assigned to the socket.
This patch modifies also the virtio_transport_get_ops(), that
uses the vsock_core_get_transport(), adding the
'struct vsock_sock *' parameter.
Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com>
Signed-off-by: Stefano Garzare...
2019 Oct 09
1
[RFC PATCH 06/13] vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
On Fri, Sep 27, 2019 at 01:26:56PM +0200, Stefano Garzarella wrote:
> -const struct vsock_transport *vsock_core_get_transport(void)
> +const struct vsock_transport *vsock_core_get_transport(struct vsock_sock *vsk)
> {
> /* vsock_register_mutex not taken since only the transport uses this
> * function and only while registered.
> */
> - return transport_single;
This comment is about protecting t...
2016 Dec 08
1
[PATCH v2 4/4] vsock: cancel packets when failing to connect
...; u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 wanted);
> void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit);
>
> +static inline const struct virtio_transport *virtio_transport_get_ops(void)
> +{
> + const struct vsock_transport *t = vsock_core_get_transport();
> +
> + return container_of(t, struct virtio_transport, transport);
> +}
> +
> #endif /* _LINUX_VIRTIO_VSOCK_H */
> diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
> index 8a398b3..ebb50d6 100644
> --- a/net/vmw_vsock/af_vsock.c
> +++ b/net/vmw_vsock/...
2016 Dec 08
1
[PATCH v2 4/4] vsock: cancel packets when failing to connect
...; u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 wanted);
> void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit);
>
> +static inline const struct virtio_transport *virtio_transport_get_ops(void)
> +{
> + const struct vsock_transport *t = vsock_core_get_transport();
> +
> + return container_of(t, struct virtio_transport, transport);
> +}
> +
> #endif /* _LINUX_VIRTIO_VSOCK_H */
> diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
> index 8a398b3..ebb50d6 100644
> --- a/net/vmw_vsock/af_vsock.c
> +++ b/net/vmw_vsock/...
2016 Dec 07
0
[PATCH 4/4] vsock: cancel packets when failing to connect
...ock *vvs, struct virtio_vs
u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 wanted);
void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit);
+static inline const struct virtio_transport *virtio_transport_get_ops(void)
+{
+ const struct vsock_transport *t = vsock_core_get_transport();
+
+ return container_of(t, struct virtio_transport, transport);
+}
+
#endif /* _LINUX_VIRTIO_VSOCK_H */
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 8a398b3..ebb50d6 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -104,6 +104,7 @@
#include <...
2016 Dec 07
0
[PATCH v2 4/4] vsock: cancel packets when failing to connect
...ock *vvs, struct virtio_vs
u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 wanted);
void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit);
+static inline const struct virtio_transport *virtio_transport_get_ops(void)
+{
+ const struct vsock_transport *t = vsock_core_get_transport();
+
+ return container_of(t, struct virtio_transport, transport);
+}
+
#endif /* _LINUX_VIRTIO_VSOCK_H */
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 8a398b3..ebb50d6 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -104,6 +104,7 @@
#include <...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...n */
> static const struct vsock_transport *transport_dgram;
> +/* Transport used for local communication */
> +static const struct vsock_transport *transport_local;
> static DEFINE_MUTEX(vsock_register_mutex);
>
> /**** UTILS ****/
> @@ -2130,7 +2132,7 @@ EXPORT_SYMBOL_GPL(vsock_core_get_transport);
>
> int vsock_core_register(const struct vsock_transport *t, int features)
> {
> - const struct vsock_transport *t_h2g, *t_g2h, *t_dgram;
> + const struct vsock_transport *t_h2g, *t_g2h, *t_dgram, *t_local;
> int err = mutex_lock_interruptible(&vsock_register_mutex);
&g...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...n */
> static const struct vsock_transport *transport_dgram;
> +/* Transport used for local communication */
> +static const struct vsock_transport *transport_local;
> static DEFINE_MUTEX(vsock_register_mutex);
>
> /**** UTILS ****/
> @@ -2130,7 +2132,7 @@ EXPORT_SYMBOL_GPL(vsock_core_get_transport);
>
> int vsock_core_register(const struct vsock_transport *t, int features)
> {
> - const struct vsock_transport *t_h2g, *t_g2h, *t_dgram;
> + const struct vsock_transport *t_h2g, *t_g2h, *t_dgram, *t_local;
> int err = mutex_lock_interruptible(&vsock_register_mutex);
&g...
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
...TIMEOUT
vsock: remove vm_sockets_get_local_cid()
vsock: remove include/linux/vm_sockets.h file
vsock: add 'transport' member in the struct vsock_sock
vsock/virtio: add transport parameter to the
virtio_transport_reset_no_sock()
vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
vsock: handle buffer_size sockopts in the core
vsock: move vsock_insert_unbound() in the vsock_create()
hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
vsock: add multi-transports support
vsock: add 'transport_hg' to handle g2h\h2g transports
vsock: prevent transpor...
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
...TIMEOUT
vsock: remove vm_sockets_get_local_cid()
vsock: remove include/linux/vm_sockets.h file
vsock: add 'transport' member in the struct vsock_sock
vsock/virtio: add transport parameter to the
virtio_transport_reset_no_sock()
vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
vsock: handle buffer_size sockopts in the core
vsock: move vsock_insert_unbound() in the vsock_create()
hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
vsock: add multi-transports support
vsock: add 'transport_hg' to handle g2h\h2g transports
vsock: prevent transpor...
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
...TIMEOUT
vsock: remove vm_sockets_get_local_cid()
vsock: remove include/linux/vm_sockets.h file
vsock: add 'transport' member in the struct vsock_sock
vsock/virtio: add transport parameter to the
virtio_transport_reset_no_sock()
vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
vsock: handle buffer_size sockopts in the core
vsock: add vsock_create_connected() called by transports
vsock: move vsock_insert_unbound() in the vsock_create()
hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
vsock: add multi-transports support
vsock/vmci: register vmci_tra...
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
...TIMEOUT
vsock: remove vm_sockets_get_local_cid()
vsock: remove include/linux/vm_sockets.h file
vsock: add 'transport' member in the struct vsock_sock
vsock/virtio: add transport parameter to the
virtio_transport_reset_no_sock()
vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
vsock: handle buffer_size sockopts in the core
vsock: add vsock_create_connected() called by transports
vsock: move vsock_insert_unbound() in the vsock_create()
hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
vsock: add multi-transports support
vsock/vmci: register vmci_tra...
2016 Dec 07
8
[PATCH v2 0/4] vsock: cancel connect packets when failing to connect
Currently, if a connect call fails on a signal or timeout (e.g., guest is still
in the process of starting up), we'll just return to caller and leave the connect
packet queued and they are sent even though the connection is considered a failure,
which can confuse applications with unwanted false connect attempt.
The patchset enables vsock (both host and guest) to cancel queued packets when
a
2016 Dec 07
8
[PATCH v2 0/4] vsock: cancel connect packets when failing to connect
Currently, if a connect call fails on a signal or timeout (e.g., guest is still
in the process of starting up), we'll just return to caller and leave the connect
packet queued and they are sent even though the connection is considered a failure,
which can confuse applications with unwanted false connect attempt.
The patchset enables vsock (both host and guest) to cancel queued packets when
a
2019 Nov 14
15
[PATCH net-next v2 00/15] vsock: add multi-transports support
...TIMEOUT
vsock: remove vm_sockets_get_local_cid()
vsock: remove include/linux/vm_sockets.h file
vsock: add 'transport' member in the struct vsock_sock
vsock/virtio: add transport parameter to the
virtio_transport_reset_no_sock()
vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()
vsock: handle buffer_size sockopts in the core
vsock: add vsock_create_connected() called by transports
vsock: move vsock_insert_unbound() in the vsock_create()
hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()
vsock: add multi-transports support
vsock/vmci: register vmci_tra...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...> > > +/* Transport used for local communication */
> > > +static const struct vsock_transport *transport_local;
> > > static DEFINE_MUTEX(vsock_register_mutex);
> > >
> > > /**** UTILS ****/
> > > @@ -2130,7 +2132,7 @@
> EXPORT_SYMBOL_GPL(vsock_core_get_transport);
> > >
> > > int vsock_core_register(const struct vsock_transport *t, int features)
> > > {
> > > - const struct vsock_transport *t_h2g, *t_g2h, *t_dgram;
> > > + const struct vsock_transport *t_h2g, *t_g2h, *t_dgram, *t_local;
> > > int er...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...> > > +/* Transport used for local communication */
> > > +static const struct vsock_transport *transport_local;
> > > static DEFINE_MUTEX(vsock_register_mutex);
> > >
> > > /**** UTILS ****/
> > > @@ -2130,7 +2132,7 @@
> EXPORT_SYMBOL_GPL(vsock_core_get_transport);
> > >
> > > int vsock_core_register(const struct vsock_transport *t, int features)
> > > {
> > > - const struct vsock_transport *t_h2g, *t_g2h, *t_dgram;
> > > + const struct vsock_transport *t_h2g, *t_g2h, *t_dgram, *t_local;
> > > int er...
2019 Oct 23
0
[PATCH net-next 11/14] vsock: add multi-transports support
...init(t, THIS_MODULE);
-}
-void vsock_core_exit(void);
+int vsock_core_register(const struct vsock_transport *t, int features);
+void vsock_core_unregister(const struct vsock_transport *t);
/* The transport may downcast this to access transport-specific functions */
const struct vsock_transport *vsock_core_get_transport(struct vsock_sock *vsk);
@@ -190,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 vso...
2019 Sep 27
0
[RFC PATCH 10/13] vsock: add multi-transports support
...__vsock_core_init(t, THIS_MODULE);
-}
-void vsock_core_exit(void);
+int vsock_core_register(const struct vsock_transport *t);
+void vsock_core_unregister(const struct vsock_transport *t);
/* The transport may downcast this to access transport-specific functions */
const struct vsock_transport *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 vso...