OSDN Git Service

VSOCK: Add virtio vsock vsockmon hooks
authorGerard Garcia <ggarcia@deic.uab.cat>
Fri, 21 Apr 2017 09:10:46 +0000 (10:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Apr 2017 16:35:56 +0000 (12:35 -0400)
commit82dfb540aeb277d945bf646ff780493b8a520d8a
treea3cddfc8d7dc3bd71133e56e5a3d8005f58b0ad8
parent0b2e66448ba20eb30ea62345d6beb9ee2a1ce06b
VSOCK: Add virtio vsock vsockmon hooks

The virtio drivers deal with struct virtio_vsock_pkt.  Add
virtio_transport_deliver_tap_pkt(pkt) for handing packets to the
vsockmon device.

We call virtio_transport_deliver_tap_pkt(pkt) from
net/vmw_vsock/virtio_transport.c and drivers/vhost/vsock.c instead of
common code.  This is because the drivers may drop packets before
handing them to common code - we still want to capture them.

Signed-off-by: Gerard Garcia <ggarcia@deic.uab.cat>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/vsock.c
include/linux/virtio_vsock.h
net/vmw_vsock/virtio_transport.c
net/vmw_vsock/virtio_transport_common.c