linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] vsock: add local transport support
@ 2019-12-10 10:43 Stefano Garzarella
  2019-12-10 10:43 ` [PATCH net-next v2 1/6] vsock/virtio_transport_common: remove unused virtio header includes Stefano Garzarella
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Stefano Garzarella @ 2019-12-10 10:43 UTC (permalink / raw)
  To: netdev, davem
  Cc: Dexuan Cui, Jorgen Hansen, Stefan Hajnoczi, linux-kernel,
	virtualization, kvm, Stefano Garzarella

v2:
 - style fixes [Dave]
 - removed RCU sync and changed 'the_vsock_loopback' in a global
   static variable [Stefan]
 - use G2H transport when local transport is not loaded and remote cid
   is VMADDR_CID_LOCAL [Stefan]
 - rebased on net-next

v1: https://patchwork.kernel.org/cover/11251735/

This series introduces a new transport (vsock_loopback) to handle
local communication.
This could be useful to test vsock core itself and to allow developers
to test their applications without launching a VM.

Before this series, vmci and virtio transports allowed this behavior,
but only in the guest.
We are moving the loopback handling in a new transport, because it
might be useful to provide this feature also in the host or when
no H2G/G2H transports (hyperv, virtio, vmci) are loaded.

The user can use the loopback with the new VMADDR_CID_LOCAL (that
replaces VMADDR_CID_RESERVED) in any condition.
Otherwise, if the G2H transport is loaded, it can also use the guest
local CID as previously supported by vmci and virtio transports.
If G2H transport is not loaded, the user can also use VMADDR_CID_HOST
for local communication.

Patch 1 is a cleanup to build virtio_transport_common without virtio
Patch 2 adds the new VMADDR_CID_LOCAL, replacing VMADDR_CID_RESERVED
Patch 3 adds a new feature flag to register a loopback transport
Patch 4 adds the new vsock_loopback transport based on the loopback
        implementation of virtio_transport
Patch 5 implements the logic to use the local transport for loopback
        communication
Patch 6 removes the loopback from virtio_transport

Stefano Garzarella (6):
  vsock/virtio_transport_common: remove unused virtio header includes
  vsock: add VMADDR_CID_LOCAL definition
  vsock: add local transport support in the vsock core
  vsock: add vsock_loopback transport
  vsock: use local transport when it is loaded
  vsock/virtio: remove loopback handling

 MAINTAINERS                             |   1 +
 include/net/af_vsock.h                  |   2 +
 include/uapi/linux/vm_sockets.h         |   8 +-
 net/vmw_vsock/Kconfig                   |  12 ++
 net/vmw_vsock/Makefile                  |   1 +
 net/vmw_vsock/af_vsock.c                |  45 +++++-
 net/vmw_vsock/virtio_transport.c        |  61 +-------
 net/vmw_vsock/virtio_transport_common.c |   3 -
 net/vmw_vsock/vmci_transport.c          |   2 +-
 net/vmw_vsock/vsock_loopback.c          | 180 ++++++++++++++++++++++++
 10 files changed, 243 insertions(+), 72 deletions(-)
 create mode 100644 net/vmw_vsock/vsock_loopback.c

-- 
2.23.0


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

end of thread, other threads:[~2019-12-11 23:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 10:43 [PATCH net-next v2 0/6] vsock: add local transport support Stefano Garzarella
2019-12-10 10:43 ` [PATCH net-next v2 1/6] vsock/virtio_transport_common: remove unused virtio header includes Stefano Garzarella
2019-12-10 10:43 ` [PATCH net-next v2 2/6] vsock: add VMADDR_CID_LOCAL definition Stefano Garzarella
2019-12-10 10:43 ` [PATCH net-next v2 3/6] vsock: add local transport support in the vsock core Stefano Garzarella
2019-12-10 10:43 ` [PATCH net-next v2 4/6] vsock: add vsock_loopback transport Stefano Garzarella
2019-12-10 10:43 ` [PATCH net-next v2 5/6] vsock: use local transport when it is loaded Stefano Garzarella
2019-12-10 10:43 ` [PATCH net-next v2 6/6] vsock/virtio: remove loopback handling Stefano Garzarella
2019-12-11 23:01 ` [PATCH net-next v2 0/6] vsock: add local transport support David Miller

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