They will be used by other files like ofp-parser.c.

Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp>
---
v3
- no change

v2
- newly introduced
---
 lib/ofp-actions.c |   33 ---------------------------------
 lib/ofp-actions.h |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 33 deletions(-)

diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index 0874cc4..122066c 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -673,39 +673,6 @@ ofpacts_from_openflow11(const union ofp_action *in, size_t 
n_in,
 
 /* OpenFlow 1.1 instructions. */
 
-#define OVS_INSTRUCTIONS                                    \
-    DEFINE_INST(OFPIT11_GOTO_TABLE,                         \
-                ofp11_instruction_goto_table,     false,    \
-                "goto_table")                               \
-                                                            \
-    DEFINE_INST(OFPIT11_WRITE_METADATA,                     \
-                ofp11_instruction_write_metadata, false,    \
-                "write_metadata")                           \
-                                                            \
-    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_CLEAR_ACTIONS,                      \
-                ofp11_instruction,                false,    \
-                "clear_actions")
-
-enum ovs_instruction_type {
-#define DEFINE_INST(ENUM, STRUCT, EXTENSIBLE, NAME) OVSINST_##ENUM,
-    OVS_INSTRUCTIONS
-#undef DEFINE_INST
-};
-
-enum {
-#define DEFINE_INST(ENUM, STRUCT, EXTENSIBLE, NAME) + 1
-    N_OVS_INSTRUCTIONS = OVS_INSTRUCTIONS
-#undef DEFINE_INST
-};
-
 #define DEFINE_INST(ENUM, STRUCT, EXTENSIBLE, NAME)             \
     static inline void                                          \
     instruction_init_##ENUM(struct STRUCT *s)                   \
diff --git a/lib/ofp-actions.h b/lib/ofp-actions.h
index 7c9cb05..10ab301 100644
--- a/lib/ofp-actions.h
+++ b/lib/ofp-actions.h
@@ -493,4 +493,39 @@ OFPACTS
 void ofpact_update_len(struct ofpbuf *, struct ofpact *);
 void ofpact_pad(struct ofpbuf *);
 
+/* OpenFlow 1.1 instructions. */
+
+#define OVS_INSTRUCTIONS                                    \
+    DEFINE_INST(OFPIT11_GOTO_TABLE,                         \
+                ofp11_instruction_goto_table,     false,    \
+                "goto_table")                               \
+                                                            \
+    DEFINE_INST(OFPIT11_WRITE_METADATA,                     \
+                ofp11_instruction_write_metadata, false,    \
+                "write_metadata")                           \
+                                                            \
+    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_CLEAR_ACTIONS,                      \
+                ofp11_instruction,                false,    \
+                "clear_actions")
+
+enum ovs_instruction_type {
+#define DEFINE_INST(ENUM, STRUCT, EXTENSIBLE, NAME) OVSINST_##ENUM,
+    OVS_INSTRUCTIONS
+#undef DEFINE_INST
+};
+
+enum {
+#define DEFINE_INST(ENUM, STRUCT, EXTENSIBLE, NAME) + 1
+    N_OVS_INSTRUCTIONS = OVS_INSTRUCTIONS
+#undef DEFINE_INST
+};
+
 #endif /* ofp-actions.h */
-- 
1.7.1.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to