* Used for OFPIT11_WRITE_ACTIONS. */
struct ofpact_nest {
struct ofpact ofpact;
- uint8_t pad[OFPACT_ALIGN(sizeof(struct ofpact)) - sizeof(struct ofpact)];
+ uint8_t pad[PAD_SIZE(sizeof(struct ofpact), OFPACT_ALIGNTO)];
struct ofpact actions[];
};
-BUILD_ASSERT_DECL(offsetof(struct ofpact_nest, actions) == OFPACT_ALIGNTO);
+BUILD_ASSERT_DECL(offsetof(struct ofpact_nest, actions) % OFPACT_ALIGNTO == 0);
static inline size_t
ofpact_nest_get_action_len(const struct ofpact_nest *on)
* After using this function to add a variable-length action, add the
* elements of the flexible array (e.g. with ofpbuf_put()), then use
* ofpact_update_len() to update the length embedded into the action.
- * (Keep in mind the need to refresh the structure from 'ofpacts->l2' after
- * adding data to 'ofpacts'.)
+ * (Keep in mind the need to refresh the structure from 'ofpacts->frame'
+ * after adding data to 'ofpacts'.)
*
* struct <STRUCT> *ofpact_get_<ENUM>(const struct ofpact *ofpact);
*
int ovs_instruction_type_from_name(const char *name);
enum ovs_instruction_type ovs_instruction_type_from_ofpact_type(
enum ofpact_type);
+enum ofperr ovs_instruction_type_from_inst_type(
+ enum ovs_instruction_type *instruction_type, const uint16_t inst_type);
+
#endif /* ofp-actions.h */