Netdev List
 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 0/3] vsockmon: virtual device to monitor AF_VSOCK sockets.
Date: Sat, 28 May 2016 18:29:04 +0200	[thread overview]
Message-ID: <20160528162907.14809-1-ggarcia@deic.uab.cat> (raw)

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

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        | 171 ++++++++++++++++++++++++++++++++++++++++++
 drivers/vhost/vsock.c         |  71 ++++++++++++++++++
 include/net/af_vsock.h        |  13 ++++
 include/uapi/linux/Kbuild     |   1 +
 include/uapi/linux/if_arp.h   |   1 +
 include/uapi/linux/vsockmon.h |  37 +++++++++
 net/vmw_vsock/af_vsock.c      | 105 ++++++++++++++++++++++++++
 9 files changed, 408 insertions(+)
 create mode 100644 drivers/net/vsockmon.c
 create mode 100644 include/uapi/linux/vsockmon.h

-- 
2.8.3

             reply	other threads:[~2016-05-28 17:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-28 16:29 ggarcia [this message]
2016-05-28 16:29 ` [RFC 1/3] vsockmon: Add tap functions ggarcia
2016-06-01 21:07   ` Stefan Hajnoczi
2016-06-09 15:02     ` Gerard Garcia
2016-06-10 15:44       ` Stefan Hajnoczi
2016-06-14 12:05         ` Jorgen S. Hansen
2016-05-28 16:29 ` [RFC 2/3] vsockmon: Add vsockmon device ggarcia
2016-06-01 21:15   ` Stefan Hajnoczi
2016-06-09 15:21     ` Gerard Garcia
2016-06-10 15:37       ` Stefan Hajnoczi
2016-05-28 16:29 ` [RFC 3/3] vsockmon: Add vsock hooks ggarcia
2016-06-01 21:19   ` Stefan Hajnoczi
2016-06-09 15:27     ` Gerard Garcia

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=20160528162907.14809-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox