netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] vsockmon: virtual device to monitor AF_VSOCK sockets.
@ 2016-08-08 16:14 ggarcia
  2016-08-08 16:14 ` [PATCH 1/3] vsockmon: Add tap functions ggarcia
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: ggarcia @ 2016-08-08 16:14 UTC (permalink / raw)
  To: netdev; +Cc: stefanha, jhansen, mst, Gerard Garcia

From: Gerard Garcia <ggarcia@deic.uab.cat>

This patch applies over the mst vhost git repository:
http://git.kernel.org/cgit/linux/kernel/git/mst/vhost.git

This was already been sent as a RFC where several issues where fixed.
This is the summary of changes from the first RFC:

v2:
 * Do not clone skb, instead take ownership before transmitting.
 * Split tap functions from af_vsock.c.
 * Simplify vsockmon header to remove unnecessary padding and
    set little endian byte order.
 * Various simple fixes from the comments received to the first RFC.

Additionally, this version changes:
 * Add len field to the vsockmon header to ease parsing.
 * Pack vsockmon header.
 * Various simple fixes and styling.

Overview:

Virtual socket transports operate at kernel level therefore, there is no easy
way to see the traffic exchanged between virtual machines and hypervisors that
communicate using AF_VSOCK sockets. In addition, being able to see the control
messages exchanged by the transports may be useful for debugging and
optimization purposes. This patch adds a virtual device that may be used to see
the traffic exchanged between virtual machines and hypervisors through AF_VSOCK
sockets.

Its structure is based on the nlmon device and this version just targets the
virtio transport, but support for the VMCI transport can be easily implemented.
The vsockmon header contains a generic header and includes the header specific to
the transport. The generic header allows to follow an AF_VSOCK stream without
having to dig into the details of the transport while the transport header
gives more detail which may be useful for troubleshooting and debugging.

Testing:

To set up a vsockmon device:

ip link add type vsockmon
ip link set vsockmon0 up

The Wireshark development version (master branch) includes a vsock dissector
that is capable of parsing packets received through vsockmon. The dissector
needs to be manually selected.

Thanks to Stefan Hajnoczi for his help.

Gerard

Gerard Garcia (3):
  vsockmon: Add tap functions.
  vsockmon: Add vsockmon device.
  vsockmon: Add virtio vsock hooks

 drivers/net/Kconfig           |   8 ++
 drivers/net/Makefile          |   1 +
 drivers/net/vsockmon.c        | 168 ++++++++++++++++++++++++++++++++++++++++++
 drivers/vhost/vsock.c         |  72 ++++++++++++++++++
 include/net/af_vsock.h        |  13 ++++
 include/uapi/linux/Kbuild     |   1 +
 include/uapi/linux/if_arp.h   |   1 +
 include/uapi/linux/vsockmon.h |  35 +++++++++
 net/vmw_vsock/Makefile        |   2 +-
 net/vmw_vsock/af_vsock_tap.c  | 114 ++++++++++++++++++++++++++++
 10 files changed, 414 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/vsockmon.c
 create mode 100644 include/uapi/linux/vsockmon.h
 create mode 100644 net/vmw_vsock/af_vsock_tap.c

-- 
2.9.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-08-22 10:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08 16:14 [PATCH 0/3] vsockmon: virtual device to monitor AF_VSOCK sockets ggarcia
2016-08-08 16:14 ` [PATCH 1/3] vsockmon: Add tap functions ggarcia
2016-08-10 11:40   ` Stefan Hajnoczi
2016-08-12 14:15     ` Gerard Garcia
2016-08-08 16:14 ` [PATCH 2/3] vsockmon: Add vsockmon device ggarcia
2016-08-10 11:51   ` Stefan Hajnoczi
2016-08-12 14:17     ` Gerard Garcia
2016-08-15 16:38     ` David Laight
2016-08-15 17:23       ` David Miller
2016-08-22 10:12         ` Gerard Garcia
2016-08-08 16:14 ` [PATCH 3/3] vsockmon: Add virtio vsock hooks ggarcia
2016-08-10 11:59   ` Stefan Hajnoczi
2016-08-12 14:18     ` Gerard Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).