All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jorgen Hansen <jhansen@vmware.com>
To: 'Stefano Garzarella' <sgarzare@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	Dexuan Cui <decui@microsoft.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: RE: [PATCH net-next 2/6] vsock: add VMADDR_CID_LOCAL definition
Date: Thu, 21 Nov 2019 14:49:25 +0000	[thread overview]
Message-ID: <MWHPR05MB33764A74EC512852DF16C6C9DA4E0@MWHPR05MB3376.namprd05.prod.outlook.com> (raw)
In-Reply-To: <20191119110121.14480-3-sgarzare@redhat.com>

> From: Stefano Garzarella [mailto:sgarzare@redhat.com]
> Sent: Tuesday, November 19, 2019 12:01 PM
> 
> The VMADDR_CID_RESERVED (1) was used by VMCI, but now it is not
> used anymore, so we can reuse it for local communication
> (loopback) adding the new well-know CID: VMADDR_CID_LOCAL.
> 
> Cc: Jorgen Hansen <jhansen@vmware.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
>  include/uapi/linux/vm_sockets.h | 8 +++++---
>  net/vmw_vsock/vmci_transport.c  | 2 +-
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/include/uapi/linux/vm_sockets.h
> b/include/uapi/linux/vm_sockets.h
> index 68d57c5e99bc..fd0ed7221645 100644
> --- a/include/uapi/linux/vm_sockets.h
> +++ b/include/uapi/linux/vm_sockets.h
> @@ -99,11 +99,13 @@
> 
>  #define VMADDR_CID_HYPERVISOR 0
> 
> -/* This CID is specific to VMCI and can be considered reserved (even VMCI
> - * doesn't use it anymore, it's a legacy value from an older release).
> +/* Use this as the destination CID in an address when referring to the
> + * local communication (loopback).
> + * (This was VMADDR_CID_RESERVED, but even VMCI doesn't use it
> anymore,
> + * it was a legacy value from an older release).
>   */
> 
> -#define VMADDR_CID_RESERVED 1
> +#define VMADDR_CID_LOCAL 1
> 
>  /* Use this as the destination CID in an address when referring to the host
>   * (any process other than the hypervisor).  VMCI relies on it being 2, but
> diff --git a/net/vmw_vsock/vmci_transport.c
> b/net/vmw_vsock/vmci_transport.c
> index 644d32e43d23..4b8b1150a738 100644
> --- a/net/vmw_vsock/vmci_transport.c
> +++ b/net/vmw_vsock/vmci_transport.c
> @@ -648,7 +648,7 @@ static int vmci_transport_recv_dgram_cb(void *data,
> struct vmci_datagram *dg)
>  static bool vmci_transport_stream_allow(u32 cid, u32 port)
>  {
>  	static const u32 non_socket_contexts[] = {
> -		VMADDR_CID_RESERVED,
> +		VMADDR_CID_LOCAL,
>  	};
>  	int i;
> 
> --
> 2.21.0

Reviewed-by: Jorgen Hansen <jhansen@vmware.com>


  parent reply	other threads:[~2019-11-21 14:49 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 11:01 [PATCH net-next 0/6] vsock: add local transport support Stefano Garzarella
2019-11-19 11:01 ` [PATCH net-next 1/6] vsock/virtio_transport_common: remove unused virtio header includes Stefano Garzarella
2019-11-19 11:01 ` [PATCH net-next 2/6] vsock: add VMADDR_CID_LOCAL definition Stefano Garzarella
2019-11-21 14:49   ` Jorgen Hansen via Virtualization
2019-11-21 14:49   ` Jorgen Hansen [this message]
2019-11-19 11:01 ` [PATCH net-next 3/6] vsock: add local transport support in the vsock core Stefano Garzarella
2019-11-21 15:04   ` Jorgen Hansen
2019-11-21 15:21     ` Stefano Garzarella
2019-11-21 15:21     ` Stefano Garzarella
2019-11-21 15:53       ` Jorgen Hansen
2019-11-21 16:12         ` Stefano Garzarella
2019-11-21 16:19           ` Jorgen Hansen
2019-11-21 16:19           ` Jorgen Hansen via Virtualization
2019-11-21 16:12         ` Stefano Garzarella
2019-11-21 15:53       ` Jorgen Hansen via Virtualization
2019-11-21 15:04   ` Jorgen Hansen via Virtualization
2019-11-19 11:01 ` [PATCH net-next 4/6] vsock: add vsock_loopback transport Stefano Garzarella
2019-11-20  1:15   ` David Miller
2019-11-20  9:00     ` Stefano Garzarella
2019-11-21  9:34   ` Stefan Hajnoczi
2019-11-21  9:34   ` Stefan Hajnoczi
2019-11-21  9:59     ` Stefano Garzarella
2019-11-21  9:59     ` Stefano Garzarella
2019-11-21 15:25       ` Stefano Garzarella
2019-11-22  9:25         ` Stefan Hajnoczi
2019-11-22  9:25         ` Stefan Hajnoczi
2019-11-22 10:02           ` Stefano Garzarella
2019-11-22 10:02             ` Stefano Garzarella
2019-11-21 15:25       ` Stefano Garzarella
2019-11-19 11:01 ` [PATCH net-next 5/6] vsock: use local transport when it is loaded Stefano Garzarella
2019-11-21  9:46   ` Stefan Hajnoczi
2019-11-21  9:46   ` Stefan Hajnoczi
2019-11-21 10:01     ` Stefano Garzarella
2019-11-21 10:01     ` Stefano Garzarella
2019-11-19 11:01 ` [PATCH net-next 6/6] vsock/virtio: remove loopback handling Stefano Garzarella
2019-11-21  9:46 ` [PATCH net-next 0/6] vsock: add local transport support Stefan Hajnoczi
2019-11-21 10:05   ` Stefano Garzarella
2019-11-21 10:05   ` Stefano Garzarella
2019-11-21  9:46 ` Stefan Hajnoczi
2019-11-21 14:45 ` Jorgen Hansen via Virtualization
2019-11-21 14:45 ` Jorgen Hansen
2019-11-21 15:13   ` Stefano Garzarella
2019-11-21 15:13   ` Stefano Garzarella

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=MWHPR05MB33764A74EC512852DF16C6C9DA4E0@MWHPR05MB3376.namprd05.prod.outlook.com \
    --to=jhansen@vmware.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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.