ofp-actions: sort OVSINST_OFPIT11_xxx value in execution order
authorIsaku Yamahata <yamahata@valinux.co.jp>
Wed, 1 Aug 2012 15:24:09 +0000 (00:24 +0900)
committerBen Pfaff <blp@nicira.com>
Tue, 14 Aug 2012 16:58:15 +0000 (09:58 -0700)
This order is used by parser from text string to check if the instruction
is given in this order.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-actions.h

index e3bad180c8899ff42950fcf9eeb07bef8d95cf94..604b56c264e87a40cf5dadbaec90738c912aac02 100644 (file)
@@ -493,28 +493,30 @@ OFPACTS
 void ofpact_update_len(struct ofpbuf *, struct ofpact *);
 void ofpact_pad(struct ofpbuf *);
 
-/* OpenFlow 1.1 instructions. */
-
+/* OpenFlow 1.1 instructions.
+ * The order is sorted in execution order. Not in the value of OFPIT11_xxx.
+ * It is enforced on parser from text string.
+ */
 #define OVS_INSTRUCTIONS                                    \
-    DEFINE_INST(OFPIT11_GOTO_TABLE,                         \
-                ofp11_instruction_goto_table,     false,    \
-                "goto_table")                               \
+    DEFINE_INST(OFPIT11_APPLY_ACTIONS,                      \
+                ofp11_instruction_actions,        true,     \
+                "apply_actions")                            \
                                                             \
-    DEFINE_INST(OFPIT11_WRITE_METADATA,                     \
-                ofp11_instruction_write_metadata, false,    \
-                "write_metadata")                           \
+    DEFINE_INST(OFPIT11_CLEAR_ACTIONS,                      \
+                ofp11_instruction,                false,    \
+                "clear_actions")                            \
                                                             \
     DEFINE_INST(OFPIT11_WRITE_ACTIONS,                      \
                 ofp11_instruction_actions,        true,     \
                 "write_actions")                            \
                                                             \
-    DEFINE_INST(OFPIT11_APPLY_ACTIONS,                      \
-                ofp11_instruction_actions,        true,     \
-                "apply_actions")                            \
+    DEFINE_INST(OFPIT11_WRITE_METADATA,                     \
+                ofp11_instruction_write_metadata, false,    \
+                "write_metadata")                           \
                                                             \
-    DEFINE_INST(OFPIT11_CLEAR_ACTIONS,                      \
-                ofp11_instruction,                false,    \
-                "clear_actions")
+    DEFINE_INST(OFPIT11_GOTO_TABLE,                         \
+                ofp11_instruction_goto_table,     false,    \
+                "goto_table")
 
 enum ovs_instruction_type {
 #define DEFINE_INST(ENUM, STRUCT, EXTENSIBLE, NAME) OVSINST_##ENUM,