From a64f0b0fcd00da464aa87a93d303f7564a29e1a1 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Thu, 2 Aug 2012 00:24:08 +0900 Subject: [PATCH] ofp-actions: export OVSINST_OFPIT11_xxx They will be used by ofp-parser.c. Signed-off-by: Isaku Yamahata Signed-off-by: Ben Pfaff --- 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 11642d1e1..b84ca63d1 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 d5497a821..e3bad180c 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 */ -- 2.43.0