[RFC PATCH 05/13] vsock/virtio: add transport parameter to the virtio_transport_reset_no_sock()

Stefan Hajnoczi
Wed, 09 Oct 2019 11:52:31 -0000

On Fri, Sep 27, 2019 at 01:26:55PM +0200, Stefano Garzarella
wrote:
> We are going to add 'struct vsock_sock *' parameter to
> virtio_transport_get_ops().
>
> In some cases, like in the virtio_transport_reset_no_sock(),
> we don't have any socket assigned to the packet received,
> so we can't use the virtio_transport_get_ops().
>
> In order to allow virtio_transport_reset_no_sock() to use the
> '.send_pkt' callback from the 'vhost_transport' or
'virtio_transport',
> we add the 'struct virtio_transport *' to it and to its caller:
> virtio_transport_recv_pkt().
>
> We moved the 'vhost_transport' and 'virtio_transport'
definition,
> to pass their address to the virtio_transport_recv_pkt().
>
> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> ---
>  drivers/vhost/vsock.c                   |  94 +++++++-------
>  include/linux/virtio_vsock.h            |   3 +-
>  net/vmw_vsock/virtio_transport.c        | 160 ++++++++++++------------
>  net/vmw_vsock/virtio_transport_common.c |  12 +-
>  4 files changed, 135 insertions(+), 134 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL:
<http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20191009/08450ed0/attachment-0001.sig>