summaryrefslogtreecommitdiff
path: root/include/openflow/openflow-common.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-01-14 21:03:23 -0800
committerBen Pfaff <blp@ovn.org>2016-01-20 09:29:47 -0800
commita930d4c5a46e8d0e5aaf3bd83161e54db10275f1 (patch)
tree7b02cd44827fef076fcb6d7721bd64cfc5e32c13 /include/openflow/openflow-common.h
parent2da7974c77dbfd95bd5bee303d2b805cea2df253 (diff)
downloadopenvswitch-a930d4c5a46e8d0e5aaf3bd83161e54db10275f1.tar.gz
ofp-util: Define struct ofputil_async_cfg to hold async message config.
This seems a little better than a pair of bare arrays. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
Diffstat (limited to 'include/openflow/openflow-common.h')
-rw-r--r--include/openflow/openflow-common.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h
index d2efa5f2a..39857052c 100644
--- a/include/openflow/openflow-common.h
+++ b/include/openflow/openflow-common.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2011, 2012, 2013, 2014 The Board of Trustees of The Leland Stanford
+/* Copyright (c) 2008, 2011, 2012, 2013, 2014, 2016 The Board of Trustees of The Leland Stanford
* Junior University
*
* We are making the OpenFlow specification and associated documentation
@@ -280,6 +280,13 @@ enum ofp_packet_in_reason {
OFPR_ACTION_SET, /* Output to controller in action set */
OFPR_GROUP, /* Output to controller in group bucket */
OFPR_PACKET_OUT, /* Output to controller in packet-out */
+
+#define OFPR10_BITS \
+ ((1u << OFPR_NO_MATCH) | (1u << OFPR_ACTION) | (1u << OFPR_INVALID_TTL))
+#define OFPR14_BITS \
+ (OFPR10_BITS | \
+ (1u << OFPR_ACTION_SET) | (1u << OFPR_GROUP) | (1u << OFPR_PACKET_OUT))
+
OFPR_N_REASONS
};
@@ -306,6 +313,16 @@ enum ofp_flow_removed_reason {
OFPRR_METER_DELETE, /* Meter was removed. */
OFPRR_EVICTION, /* Switch eviction to free resources. */
+#define OFPRR10_BITS \
+ ((1u << OFPRR_IDLE_TIMEOUT) | \
+ (1u << OFPRR_HARD_TIMEOUT) | \
+ (1u << OFPRR_DELETE))
+#define OFPRR14_BITS \
+ (OFPRR10_BITS | \
+ (1u << OFPRR_GROUP_DELETE) | \
+ (1u << OFPRR_METER_DELETE) | \
+ (1u << OFPRR_EVICTION))
+
OVS_OFPRR_NONE /* OVS internal_use only, keep last!. */
};
@@ -314,6 +331,11 @@ enum ofp_port_reason {
OFPPR_ADD, /* The port was added. */
OFPPR_DELETE, /* The port was removed. */
OFPPR_MODIFY, /* Some attribute of the port has changed. */
+
+#define OFPPR_BITS ((1u << OFPPR_ADD) | \
+ (1u << OFPPR_DELETE) | \
+ (1u << OFPPR_MODIFY))
+
OFPPR_N_REASONS /* Denotes number of reasons. */
};