summaryrefslogtreecommitdiff
path: root/include/openvswitch/ofp-actions.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-07-15 14:14:21 -0700
committerBen Pfaff <blp@ovn.org>2016-08-08 09:11:21 -0700
commit7b51295530c5a9b708ceffc7a557e8dc110f9a19 (patch)
treef765c8f0dd2f41383771267e749832868c2714cd /include/openvswitch/ofp-actions.h
parent0763bf08caa9ce880215d321a2c05dc50ee74609 (diff)
downloadopenvswitch-7b51295530c5a9b708ceffc7a557e8dc110f9a19.tar.gz
ofp-actions: Factor OFPACT_PADDED_MEMBERS out into a more general form.
This makes it easier to reuse this idea elsewhere. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
Diffstat (limited to 'include/openvswitch/ofp-actions.h')
-rw-r--r--include/openvswitch/ofp-actions.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/include/openvswitch/ofp-actions.h b/include/openvswitch/ofp-actions.h
index a0cefe322..310ec335b 100644
--- a/include/openvswitch/ofp-actions.h
+++ b/include/openvswitch/ofp-actions.h
@@ -185,19 +185,7 @@ BUILD_ASSERT_DECL(sizeof(struct ofpact) == 4);
/* Alignment. */
#define OFPACT_ALIGNTO 8
#define OFPACT_ALIGN(SIZE) ROUND_UP(SIZE, OFPACT_ALIGNTO)
-
-/* Expands to an anonymous union that contains:
- *
- * - MEMBERS in a nested anonymous struct.
- *
- * - An array as large as MEMBERS plus padding to a multiple of 8 bytes.
- *
- * The effect is to pad MEMBERS to a multiple of 8 bytes. */
-#define OFPACT_PADDED_MEMBERS(MEMBERS) \
- union { \
- struct { MEMBERS }; \
- uint8_t pad[OFPACT_ALIGN(sizeof(struct { MEMBERS }))]; \
- }
+#define OFPACT_PADDED_MEMBERS(MEMBERS) PADDED_MEMBERS(OFPACT_ALIGNTO, MEMBERS)
/* Returns the ofpact following 'ofpact'. */
static inline struct ofpact *