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 > --- > 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