From 6b2b63d08866f81fadac9944c4ef05c87b230047 Mon Sep 17 00:00:00 2001 From: Jarno Rajahalme Date: Mon, 16 Mar 2015 15:04:52 -0700 Subject: [PATCH] Revert "ofp-actions: Align struct ofpact to OFPACT_ALIGNTO." This reverts commit 18287cd35ebaffb9122e08b29832bc52e1608cda. The alignment, while correct, made also all derived ofpact structs bigger, which was not intended. Signed-off-by: Jarno Rajahalme --- lib/ofp-actions.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ofp-actions.h b/lib/ofp-actions.h index c2325132f..a1a5bb122 100644 --- a/lib/ofp-actions.h +++ b/lib/ofp-actions.h @@ -156,11 +156,7 @@ enum { * originate from OpenFlow, then setting 'raw' to zero should be fine: * code to translate the ofpact to OpenFlow must tolerate this case.) */ -/* Alignment. */ -#define OFPACT_ALIGNTO 8 -#define OFPACT_ALIGN(SIZE) ROUND_UP(SIZE, OFPACT_ALIGNTO) - -OVS_ALIGNED_STRUCT(OFPACT_ALIGNTO, ofpact) { +struct ofpact { /* We want the space advantage of an 8-bit type here on every * implementation, without giving up the advantage of having a useful type * on implementations that support packed enums. */ @@ -174,7 +170,11 @@ OVS_ALIGNED_STRUCT(OFPACT_ALIGNTO, ofpact) { uint16_t len; /* Length of the action, in bytes, including * struct ofpact, excluding padding. */ }; -BUILD_ASSERT_DECL(sizeof(struct ofpact) == OFPACT_ALIGNTO); +BUILD_ASSERT_DECL(sizeof(struct ofpact) == 4); + +/* Alignment. */ +#define OFPACT_ALIGNTO 8 +#define OFPACT_ALIGN(SIZE) ROUND_UP(SIZE, OFPACT_ALIGNTO) static inline struct ofpact * ofpact_next(const struct ofpact *ofpact) -- 2.20.1