datapath: Fix alignment of struct sw_flow_key.
authorJesse Gross <jesse@nicira.com>
Thu, 5 Sep 2013 20:01:58 +0000 (13:01 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 5 Sep 2013 20:03:51 +0000 (13:03 -0700)
commit9a6fe4c1ae510f1ee9fb382e285a11a5d8e2722b
tree6391e0e303e961966360b21b04075e81878bc9a4
parent646b2a9c80fc14f6b7efc8a978bd58c25ffdd49b
datapath: Fix alignment of struct sw_flow_key.

sw_flow_key alignment was declared as " __aligned(__alignof__(long))".
However, this breaks on the m68k architecture where long is 32 bit in
size but 16 bit aligned by default. This aligns to the size of a long to
ensure that we can always do comparsions in full long-sized chunks. It
also adds an additional build check to catch any reduction in alignment.

CC: Andy Zhou <azhou@nicira.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/flow.c
datapath/flow.h