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:04:55 +0000 (13:04 -0700)
commit369ff4ed7a73813a8a7c7bf19a5d41d76d6bc154
tree615bc61818e79b432af76804e245af6ac7df0479
parent148a59afa8622f11f7a99617af62ddf9e59bec40
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