diff mbox

[ovs-dev,01/10] types.h: Move mirror_mask_t here.

Message ID 1471560623-44639-2-git-send-email-jarno@ovn.org
State Superseded
Headers show

Commit Message

Jarno Rajahalme Aug. 18, 2016, 10:50 p.m. UTC
Move mirror_mask_t from ofproto/ofproto-dpif-mirror.h to
openvswitch/types.h to avoid including function definitions with
colliding names (e.g., mirror_destroy(), which is also the name of a
static function in bridge.c).

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
---
 include/openvswitch/types.h   | 5 +++++
 ofproto/ofproto-dpif-mirror.h | 4 +---
 ofproto/ofproto-dpif-rid.h    | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/include/openvswitch/types.h b/include/openvswitch/types.h
index 2f5fcca..4c6431e 100644
--- a/include/openvswitch/types.h
+++ b/include/openvswitch/types.h
@@ -152,4 +152,9 @@  struct eth_addr {
     };
 };
 
+/* Moved from ofproto/ofproto-dpif-mirror.h to avoid including the whole file,
+ * which introduces function name collisions. */
+#define MAX_MIRRORS 32
+typedef uint32_t mirror_mask_t;
+
 #endif /* openvswitch/types.h */
diff --git a/ofproto/ofproto-dpif-mirror.h b/ofproto/ofproto-dpif-mirror.h
index b00536a..5c2ed82 100644
--- a/ofproto/ofproto-dpif-mirror.h
+++ b/ofproto/ofproto-dpif-mirror.h
@@ -18,9 +18,7 @@ 
 #include <stdint.h>
 
 #include "util.h"
-
-#define MAX_MIRRORS 32
-typedef uint32_t mirror_mask_t;
+#include "openvswitch/types.h"
 
 struct ofproto_dpif;
 struct ofbundle;
diff --git a/ofproto/ofproto-dpif-rid.h b/ofproto/ofproto-dpif-rid.h
index 3bca817..d086871 100644
--- a/ofproto/ofproto-dpif-rid.h
+++ b/ofproto/ofproto-dpif-rid.h
@@ -21,9 +21,9 @@ 
 #include <stdint.h>
 
 #include "cmap.h"
-#include "ofproto-dpif-mirror.h"
 #include "openvswitch/list.h"
 #include "openvswitch/ofp-actions.h"
+#include "openvswitch/types.h"
 #include "ovs-thread.h"
 #include "uuid.h"