]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
VMCI: changes in shared code that don't affect open-vm-tools
authorVMware, Inc <>
Mon, 15 Oct 2012 04:48:11 +0000 (21:48 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Fri, 19 Oct 2012 18:32:39 +0000 (11:32 -0700)
Some VMCI header changes not affecting open-vm-tools.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/include/vmci_defs.h
open-vm-tools/modules/linux/shared/vmci_defs.h

index 4ed9692efae34eefd20e41e6ceb819e9357fe9ad..48595d9cc8a044b55545384839009fc57c16e85f 100644 (file)
@@ -163,8 +163,9 @@ typedef uint32 VMCI_Resource;
 typedef uint32 VMCIId;
 
 typedef struct VMCIIdRange {
-   VMCIId begin;
-   VMCIId end;
+   int8 action;   // VMCI_FA_X, for use in filters.
+   VMCIId begin;  // Beginning of range
+   VMCIId end;    // End of range
 } VMCIIdRange;
 
 typedef struct VMCIHandle {
@@ -172,9 +173,9 @@ typedef struct VMCIHandle {
    VMCIId resource;
 } VMCIHandle;
 
-static INLINE
-VMCIHandle VMCI_MAKE_HANDLE(VMCIId cid,
-                           VMCIId rid)
+static INLINE VMCIHandle
+VMCI_MAKE_HANDLE(VMCIId cid,  // IN:
+                 VMCIId rid)  // IN:
 {
    VMCIHandle h;
    h.context = cid;
@@ -849,28 +850,31 @@ VMCIQueueHeader_BufReady(const VMCIQueueHeader *consumeQHeader, // IN:
 
 /*
  * Defines for the VMCI traffic filter:
+ * - VMCI_FA_<name> defines the filter action values
  * - VMCI_FP_<name> defines the filter protocol values
  * - VMCI_FD_<name> defines the direction values (guest or host)
  * - VMCI_FT_<name> are the type values (allow or deny)
  */
 
+#define VMCI_FA_INVALID -1
+#define VMCI_FA_ALLOW    0
+#define VMCI_FA_DENY     (VMCI_FA_ALLOW + 1)
+#define VMCI_FA_MAX      (VMCI_FA_DENY + 1)
+
 #define VMCI_FP_INVALID     -1
 #define VMCI_FP_HYPERVISOR   0
 #define VMCI_FP_QUEUEPAIR    (VMCI_FP_HYPERVISOR + 1)
 #define VMCI_FP_DOORBELL     (VMCI_FP_QUEUEPAIR + 1)
 #define VMCI_FP_DATAGRAM     (VMCI_FP_DOORBELL + 1)
 #define VMCI_FP_STREAMSOCK   (VMCI_FP_DATAGRAM + 1)
-#define VMCI_FP_MAX          (VMCI_FP_STREAMSOCK + 1)
+#define VMCI_FP_ANY          (VMCI_FP_STREAMSOCK + 1)
+#define VMCI_FP_MAX          (VMCI_FP_ANY + 1)
 
 #define VMCI_FD_INVALID  -1
 #define VMCI_FD_GUEST     0
 #define VMCI_FD_HOST      (VMCI_FD_GUEST + 1)
-#define VMCI_FD_MAX       (VMCI_FD_HOST + 1)
-
-#define VMCI_FT_INVALID  -1
-#define VMCI_FT_ALLOW     0
-#define VMCI_FT_DENY      (VMCI_FT_ALLOW + 1)
-#define VMCI_FT_MAX       (VMCI_FT_DENY + 1)
+#define VMCI_FD_ANY       (VMCI_FD_HOST + 1)
+#define VMCI_FD_MAX       (VMCI_FD_ANY + 1)
 
 /*
  * The filter list tracks VMCI Id ranges for a given filter.
@@ -892,7 +896,6 @@ typedef struct {
    uint32 len;    // Length of list
    uint8  dir;    // VMCI_FD_X
    uint8  proto;  // VMCI_FP_X
-   uint8  type;   // VMCI_FT_X
 } VMCIFilterInfo;
 
 /*
@@ -901,7 +904,7 @@ typedef struct {
  * direction. The VMCIFilters type captures all filters.
  */
 
-typedef VMCIFilterList VMCIProtoFilters[VMCI_FP_MAX][VMCI_FT_MAX];
+typedef VMCIFilterList VMCIProtoFilters[VMCI_FP_MAX];
 typedef VMCIProtoFilters VMCIFilters[VMCI_FD_MAX];
 
-#endif
+#endif // _VMCI_DEF_H_
index e921b4e1d5dd4dab89b5f56a6d4ad085c0348b78..6984fd165cee26f4f520cab3b7eb67587e6dbf62 100644 (file)
@@ -163,8 +163,9 @@ typedef uint32 VMCI_Resource;
 typedef uint32 VMCIId;
 
 typedef struct VMCIIdRange {
-   VMCIId begin;
-   VMCIId end;
+   int8 action;   // VMCI_FA_X, for use in filters.
+   VMCIId begin;  // Beginning of range
+   VMCIId end;    // End of range
 } VMCIIdRange;
 
 typedef struct VMCIHandle {
@@ -172,9 +173,9 @@ typedef struct VMCIHandle {
    VMCIId resource;
 } VMCIHandle;
 
-static INLINE
-VMCIHandle VMCI_MAKE_HANDLE(VMCIId cid,
-                           VMCIId rid)
+static INLINE VMCIHandle
+VMCI_MAKE_HANDLE(VMCIId cid,  // IN:
+                 VMCIId rid)  // IN:
 {
    VMCIHandle h;
    h.context = cid;
@@ -849,28 +850,31 @@ VMCIQueueHeader_BufReady(const VMCIQueueHeader *consumeQHeader, // IN:
 
 /*
  * Defines for the VMCI traffic filter:
+ * - VMCI_FA_<name> defines the filter action values
  * - VMCI_FP_<name> defines the filter protocol values
  * - VMCI_FD_<name> defines the direction values (guest or host)
  * - VMCI_FT_<name> are the type values (allow or deny)
  */
 
+#define VMCI_FA_INVALID -1
+#define VMCI_FA_ALLOW    0
+#define VMCI_FA_DENY     (VMCI_FA_ALLOW + 1)
+#define VMCI_FA_MAX      (VMCI_FA_DENY + 1)
+
 #define VMCI_FP_INVALID     -1
 #define VMCI_FP_HYPERVISOR   0
 #define VMCI_FP_QUEUEPAIR    (VMCI_FP_HYPERVISOR + 1)
 #define VMCI_FP_DOORBELL     (VMCI_FP_QUEUEPAIR + 1)
 #define VMCI_FP_DATAGRAM     (VMCI_FP_DOORBELL + 1)
 #define VMCI_FP_STREAMSOCK   (VMCI_FP_DATAGRAM + 1)
-#define VMCI_FP_MAX          (VMCI_FP_STREAMSOCK + 1)
+#define VMCI_FP_ANY          (VMCI_FP_STREAMSOCK + 1)
+#define VMCI_FP_MAX          (VMCI_FP_ANY + 1)
 
 #define VMCI_FD_INVALID  -1
 #define VMCI_FD_GUEST     0
 #define VMCI_FD_HOST      (VMCI_FD_GUEST + 1)
-#define VMCI_FD_MAX       (VMCI_FD_HOST + 1)
-
-#define VMCI_FT_INVALID  -1
-#define VMCI_FT_ALLOW     0
-#define VMCI_FT_DENY      (VMCI_FT_ALLOW + 1)
-#define VMCI_FT_MAX       (VMCI_FT_DENY + 1)
+#define VMCI_FD_ANY       (VMCI_FD_HOST + 1)
+#define VMCI_FD_MAX       (VMCI_FD_ANY + 1)
 
 /*
  * The filter list tracks VMCI Id ranges for a given filter.
@@ -892,7 +896,6 @@ typedef struct {
    uint32 len;    // Length of list
    uint8  dir;    // VMCI_FD_X
    uint8  proto;  // VMCI_FP_X
-   uint8  type;   // VMCI_FT_X
 } VMCIFilterInfo;
 
 /*
@@ -901,7 +904,7 @@ typedef struct {
  * direction. The VMCIFilters type captures all filters.
  */
 
-typedef VMCIFilterList VMCIProtoFilters[VMCI_FP_MAX][VMCI_FT_MAX];
+typedef VMCIFilterList VMCIProtoFilters[VMCI_FP_MAX];
 typedef VMCIProtoFilters VMCIFilters[VMCI_FD_MAX];
 
-#endif
+#endif // _VMCI_DEF_H_