]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Fix alignment of struct sw_flow_key.
authorJesse Gross <jesse@nicira.com>
Thu, 5 Sep 2013 19:17:05 +0000 (12:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2013 19:54:37 +0000 (15:54 -0400)
commit7b21974633663b496357e134cdb60830c2bb1f0e
tree45b6907b65ab9d68e76150440c571c3bc30dcece
parent182f0fca16e7a2eccfcbf337e20fcb0ed34dbf6b
openvswitch: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/flow.c
net/openvswitch/flow.h