From: Jesse Gross Date: Wed, 3 Oct 2012 18:29:05 +0000 (-0700) Subject: flow: Fix struct flow size build assertion failure. X-Git-Tag: sliver-openvswitch-1.9.90-1~3^2~80 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c97a72ea2ed78ad87b471447e498f7e09c6f7c85;p=sliver-openvswitch.git flow: Fix struct flow size build assertion failure. The new struct flow_tnl contains an extra four bytes of padding on 64-bit machines but we currently assert that the total struct flow is a fixed size. The size difference isn't actually a problem because both are multiples of 4 and the build assertion is only intended to remind people to update FLOW_WC_SEQ when new fields are added. This changes the assertion to fix just the non-tunnel field size. Suggested-by: Ben Pfaff Signed-off-by: Jesse Gross --- diff --git a/lib/flow.h b/lib/flow.h index dcd77c2b5..9388f20ab 100644 --- a/lib/flow.h +++ b/lib/flow.h @@ -96,7 +96,8 @@ BUILD_ASSERT_DECL(sizeof(struct flow) % 4 == 0); #define FLOW_U32S (sizeof(struct flow) / 4) /* Remember to update FLOW_WC_SEQ when changing 'struct flow'. */ -BUILD_ASSERT_DECL(sizeof(struct flow) == 168 && FLOW_WC_SEQ == 17); +BUILD_ASSERT_DECL(sizeof(struct flow) == sizeof(struct flow_tnl) + 144 && + FLOW_WC_SEQ == 17); /* Represents the metadata fields of struct flow. */ struct flow_metadata {