All of lore.kernel.org
 help / color / mirror / Atom feed
From: ggarcia@abra.uab.cat
To: netdev@vger.kernel.org
Cc: jhansen@vmware.com, stefanha@redhat.com,
	Gerard Garcia <ggarcia@abra.uab.cat>
Subject: [RFC v2 0/3] vsockmon: virtual device to monitor AF_VSOCK sockets.
Date: Wed, 22 Jun 2016 18:10:59 +0200	[thread overview]
Message-ID: <20160622161102.8250-1-ggarcia@deic.uab.cat> (raw)

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

v2:
 * Various simple fixes from the comments received to the first RFC.
 * 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.

Additionally, we are implementing a tcpdump printer (RFC: http://lists.sandelman.ca/pipermail/tcpdump-workers/2016-June/000546.html, patches: https://github.com/GerardGarcia/tcpdump/tree/vsock) and a wireshark dissector (in progress) to be able to easily monitor vsockmon devices. 

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 consists of two structs: a generic header and a header specific to the transport. The generic header allows to follow an AF_VSOCK stream without having to understand the details of the transport while the transport header gives more detail which may be useful for troubleshooting and debugging.

The repository https://github.com/GerardGarcia/linux/tree/vsockmon implements these patches over the Stefan Hajnoczi vsock-next repository https://github.com/stefanha/linux/tree/vsock-next where the virtio trasnport is implemented. In the repository there is also a simple program that shows the traffic from a vsockmon device: https://github.com/GerardGarcia/linux/blob/vsockmon/vsockmon.c that can be used for testing.

Any thoughts and comments will be greatly appreciated.

Thanks to Stefan Hajnoczi for his help.

Gerard

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

 drivers/net/Kconfig           |   8 ++
 drivers/net/Makefile          |   1 +
 drivers/net/vsockmon.c        | 167 ++++++++++++++++++++++++++++++++++++++++++
 drivers/vhost/vsock.c         |  73 ++++++++++++++++++
 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  | 112 ++++++++++++++++++++++++++++
 10 files changed, 412 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.0

             reply	other threads:[~2016-06-22 16:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 16:10 ggarcia [this message]
2016-06-22 16:11 ` [RFC v2 1/3] vsockmon: Add tap functions ggarcia
2016-06-30 10:49   ` Stefan Hajnoczi
2016-06-22 16:11 ` [RFC v2 2/3] vsockmon: Add vsockmon device ggarcia
2016-06-22 16:11 ` [RFC v2 3/3] vsockmon: Add vsock hooks ggarcia
2016-06-23 12:09   ` Sergei Shtylyov
2016-06-30 10:55   ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160622161102.8250-1-ggarcia@deic.uab.cat \
    --to=ggarcia@abra.uab.cat \
    --cc=jhansen@vmware.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.