]> git.proxmox.com Git - mirror_ovs.git/commitdiff
config: Define OVS_CT_EVENT_* mask macros.
authorJarno Rajahalme <jarno@ovn.org>
Fri, 28 Apr 2017 22:49:16 +0000 (15:49 -0700)
committerJarno Rajahalme <jarno@ovn.org>
Sat, 29 Apr 2017 01:04:15 +0000 (18:04 -0700)
Unconditionally define OVS_CT_EVENT_* macros for the datapath netlink
interface so that we do not need to include platform dependent files.
This fixes the build on non-Linux (and non-Windows) platforms.

Also define a macro for the default set of events set by OVS userspace.

Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
build-aux/extract-odp-netlink-h
ofproto/ofproto-dpif-xlate.c

index 7fb6ce836b504c36fadb9dab66652f7b94efd034..a509adb88f7932fcc9a1898ad5852f38a60abd40 100755 (executable)
@@ -19,9 +19,24 @@ $i\
 #ifdef _WIN32\
 #include "OvsDpInterfaceExt.h"\
 #include "OvsDpInterfaceCtExt.h"\
-#else\
-#include "linux/netfilter/nf_conntrack_common.h"\
 #endif\
+\
+/* IPCT_* enums may not be defined in all platforms, so do not use them. */\
+#define OVS_CT_EVENT_NEW       (1 << 0)   /* 1 << IPCT_NEW */\
+#define OVS_CT_EVENT_RELATED   (1 << 1)   /* 1 << IPCT_RELATED */\
+#define OVS_CT_EVENT_DESTROY   (1 << 2)   /* 1 << IPCT_DESTROY */\
+#define OVS_CT_EVENT_REPLY     (1 << 3)   /* 1 << IPCT_REPLY */\
+#define OVS_CT_EVENT_ASSURED   (1 << 4)   /* 1 << IPCT_ASSURED */\
+#define OVS_CT_EVENT_PROTOINFO (1 << 5)   /* 1 << IPCT_PROTOINFO */\
+#define OVS_CT_EVENT_HELPER    (1 << 6)   /* 1 << IPCT_HELPER */\
+#define OVS_CT_EVENT_MARK      (1 << 7)   /* 1 << IPCT_MARK */\
+#define OVS_CT_EVENT_SEQADJ    (1 << 8)   /* 1 << IPCT_SEQADJ */\
+#define OVS_CT_EVENT_SECMARK   (1 << 9)   /* 1 << IPCT_SECMARK */\
+#define OVS_CT_EVENT_LABEL     (1 << 10)  /* 1 << IPCT_LABEL */\
+\
+#define OVS_CT_EVENTMASK_DEFAULT \\\
+  (OVS_CT_EVENT_NEW | OVS_CT_EVENT_RELATED | OVS_CT_EVENT_DESTROY |\\\
+   OVS_CT_EVENT_MARK | OVS_CT_EVENT_LABEL)\
 
 # Use OVS's own struct eth_addr instead of a 6-byte char array.
 s,<linux/types\.h>,"openvswitch/types.h"\
index 32cb022ced5621c034b5527a4702b0b944dbb2e6..16dae15bba190d56fd81435e3c85997db35dc6d7 100644 (file)
@@ -5363,9 +5363,7 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc)
                         OVS_CT_ATTR_FORCE_COMMIT : OVS_CT_ATTR_COMMIT);
         if (ctx->xbridge->support.ct_eventmask) {
             nl_msg_put_u32(ctx->odp_actions, OVS_CT_ATTR_EVENTMASK,
-                           1 << IPCT_NEW | 1 << IPCT_RELATED |
-                           1 << IPCT_DESTROY | 1 << IPCT_MARK |
-                           1 << IPCT_LABEL);
+                           OVS_CT_EVENTMASK_DEFAULT);
         }
     }
     nl_msg_put_u16(ctx->odp_actions, OVS_CT_ATTR_ZONE, zone);