* [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description
@ 2020-02-14 13:07 Stefano Garzarella
2020-02-14 19:35 ` Stefan Hajnoczi
2020-02-17 13:55 ` Jorgen Hansen
0 siblings, 2 replies; 4+ messages in thread
From: Stefano Garzarella @ 2020-02-14 13:07 UTC (permalink / raw)
To: mtk.manpages
Cc: Jorgen Hansen, linux-man, Stefan Hajnoczi, Dexuan Cui, netdev
Linux 5.6 added the new well-known VMADDR_CID_LOCAL for
local communication.
This patch explains how to use it and remove the legacy
VMADDR_CID_RESERVED no longer available.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
v2:
* rephrased "Local communication" description [Stefan]
* added a mention of previous versions that supported
loopback only in the guest [Stefan]
---
man7/vsock.7 | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/man7/vsock.7 b/man7/vsock.7
index c5ffcf07d..78ac22b1e 100644
--- a/man7/vsock.7
+++ b/man7/vsock.7
@@ -127,8 +127,8 @@ There are several special addresses:
means any address for binding;
.B VMADDR_CID_HYPERVISOR
(0) is reserved for services built into the hypervisor;
-.B VMADDR_CID_RESERVED
-(1) must not be used;
+.B VMADDR_CID_LOCAL
+(1) is the well-known address for local communication (loopback);
.B VMADDR_CID_HOST
(2)
is the well-known address of the host.
@@ -164,6 +164,16 @@ Consider using
.B VMADDR_CID_ANY
when binding instead of getting the local CID with
.BR IOCTL_VM_SOCKETS_GET_LOCAL_CID .
+.SS Local communication
+The
+.B VMADDR_CID_LOCAL
+(1) directs packets to the same host that generated them. This is useful
+for testing applications on a single host and for debugging.
+.PP
+The local CID obtained with
+.BR IOCTL_VM_SOCKETS_GET_LOCAL_CID
+can be used for the same purpose, but it is preferable to use
+.B VMADDR_CID_LOCAL .
.SH ERRORS
.TP
.B EACCES
@@ -222,6 +232,11 @@ are valid.
Support for VMware (VMCI) has been available since Linux 3.9.
KVM (virtio) is supported since Linux 4.8.
Hyper-V is supported since Linux 4.14.
+.PP
+VMADDR_CID_LOCAL is supported since Linux 5.6.
+Local communication in the guest and on the host is available since Linux 5.6.
+Previous versions partially supported it only in the guest and only with some
+transports (VMCI and virtio).
.SH SEE ALSO
.BR bind (2),
.BR connect (2),
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description
2020-02-14 13:07 [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description Stefano Garzarella
@ 2020-02-14 19:35 ` Stefan Hajnoczi
2020-02-17 13:55 ` Jorgen Hansen
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-02-14 19:35 UTC (permalink / raw)
To: Stefano Garzarella
Cc: mtk.manpages, Jorgen Hansen, linux-man, Dexuan Cui, netdev
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
On Fri, Feb 14, 2020 at 02:07:49PM +0100, Stefano Garzarella wrote:
> @@ -164,6 +164,16 @@ Consider using
> .B VMADDR_CID_ANY
> when binding instead of getting the local CID with
> .BR IOCTL_VM_SOCKETS_GET_LOCAL_CID .
> +.SS Local communication
> +The
"The" is unnatural here, I don't think native speakers would use it.
Simply saying "VMADDR_CID_LOCAL (1) directs packets ..." is more common.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description
2020-02-14 13:07 [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description Stefano Garzarella
2020-02-14 19:35 ` Stefan Hajnoczi
@ 2020-02-17 13:55 ` Jorgen Hansen
2020-02-17 17:27 ` Stefano Garzarella
1 sibling, 1 reply; 4+ messages in thread
From: Jorgen Hansen @ 2020-02-17 13:55 UTC (permalink / raw)
To: 'Stefano Garzarella', mtk.manpages
Cc: linux-man, Stefan Hajnoczi, Dexuan Cui, netdev
> From: Stefano Garzarella [mailto:sgarzare@redhat.com]
> Sent: Friday, February 14, 2020 2:08 PM
> To: mtk.manpages@gmail.com
> Cc: Jorgen Hansen <jhansen@vmware.com>; linux-man@vger.kernel.org;
> Stefan Hajnoczi <stefanha@redhat.com>; Dexuan Cui
> <decui@microsoft.com>; netdev@vger.kernel.org
> Subject: [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description
>
> Linux 5.6 added the new well-known VMADDR_CID_LOCAL for local
> communication.
>
> This patch explains how to use it and remove the legacy
> VMADDR_CID_RESERVED no longer available.
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
> v2:
> * rephrased "Local communication" description [Stefan]
> * added a mention of previous versions that supported
> loopback only in the guest [Stefan]
> ---
> @@ -222,6 +232,11 @@ are valid.
> Support for VMware (VMCI) has been available since Linux 3.9.
> KVM (virtio) is supported since Linux 4.8.
> Hyper-V is supported since Linux 4.14.
> +.PP
> +VMADDR_CID_LOCAL is supported since Linux 5.6.
> +Local communication in the guest and on the host is available since Linux
> 5.6.
> +Previous versions partially supported it only in the guest and only
> +with some transports (VMCI and virtio).
Maybe rephrase the last part slightly to something like:
Previous versions only supported local communication within a guest (not on the host),
and only with some transports (VMCI and virtio).
Otherwise, looks good to me. Thanks for making this update.
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description
2020-02-17 13:55 ` Jorgen Hansen
@ 2020-02-17 17:27 ` Stefano Garzarella
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Garzarella @ 2020-02-17 17:27 UTC (permalink / raw)
To: Jorgen Hansen
Cc: mtk.manpages, linux-man, Stefan Hajnoczi, Dexuan Cui, netdev
On Mon, Feb 17, 2020 at 01:55:58PM +0000, Jorgen Hansen wrote:
> > From: Stefano Garzarella [mailto:sgarzare@redhat.com]
> > Sent: Friday, February 14, 2020 2:08 PM
> > To: mtk.manpages@gmail.com
> > Cc: Jorgen Hansen <jhansen@vmware.com>; linux-man@vger.kernel.org;
> > Stefan Hajnoczi <stefanha@redhat.com>; Dexuan Cui
> > <decui@microsoft.com>; netdev@vger.kernel.org
> > Subject: [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description
> >
> > Linux 5.6 added the new well-known VMADDR_CID_LOCAL for local
> > communication.
> >
> > This patch explains how to use it and remove the legacy
> > VMADDR_CID_RESERVED no longer available.
> >
> > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> > ---
> > v2:
> > * rephrased "Local communication" description [Stefan]
> > * added a mention of previous versions that supported
> > loopback only in the guest [Stefan]
> > ---
>
>
> > @@ -222,6 +232,11 @@ are valid.
> > Support for VMware (VMCI) has been available since Linux 3.9.
> > KVM (virtio) is supported since Linux 4.8.
> > Hyper-V is supported since Linux 4.14.
> > +.PP
> > +VMADDR_CID_LOCAL is supported since Linux 5.6.
> > +Local communication in the guest and on the host is available since Linux
> > 5.6.
> > +Previous versions partially supported it only in the guest and only
> > +with some transports (VMCI and virtio).
>
> Maybe rephrase the last part slightly to something like:
>
> Previous versions only supported local communication within a guest (not on the host),
> and only with some transports (VMCI and virtio).
I think it is better, I'll send a v3 with this part changed :-)
>
> Otherwise, looks good to me. Thanks for making this update.
>
> Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
>
Thanks,
Stefano
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-18 9:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 13:07 [PATCH v2] vsock.7: add VMADDR_CID_LOCAL description Stefano Garzarella
2020-02-14 19:35 ` Stefan Hajnoczi
2020-02-17 13:55 ` Jorgen Hansen
2020-02-17 17:27 ` Stefano Garzarella
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).