History

vsock: add VMADDR_CID_LOCAL definition

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.

Stefano Garzarella committed 6 years ago

Commit ef343b31 parent c5144fc2 files · +6 −4Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/vm_sockets.h+5−3
@@ -99,11 +99,13 @@ · 98 unmodified lines
9999
100100 #define VMADDR_CID_HYPERVISOR 0
101101
102−/* This CID is specific to VMCI and can be considered reserved (even VMCI
103− * doesn't use it anymore, it's a legacy value from an older release).
102+/* Use this as the destination CID in an address when referring to the
103+ * local communication (loopback).
104+ * (This was VMADDR_CID_RESERVED, but even VMCI doesn't use it anymore,
105+ * it was a legacy value from an older release).
104106 */
105107
106−#define VMADDR_CID_RESERVED 1
108+#define VMADDR_CID_LOCAL 1
107109
108110 /* Use this as the destination CID in an address when referring to the host
109111 * (any process other than the hypervisor). VMCI relies on it being 2, but