diff options
| -rw-r--r-- | net/openvswitch/flow.c | 1 | ||||
| -rw-r--r-- | net/openvswitch/flow.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index ad1aeeb4f373..fb36f8565161 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c | |||
| @@ -1981,6 +1981,7 @@ nla_put_failure: | |||
| 1981 | * Returns zero if successful or a negative error code. */ | 1981 | * Returns zero if successful or a negative error code. */ |
| 1982 | int ovs_flow_init(void) | 1982 | int ovs_flow_init(void) |
| 1983 | { | 1983 | { |
| 1984 | BUILD_BUG_ON(__alignof__(struct sw_flow_key) % __alignof__(long)); | ||
| 1984 | BUILD_BUG_ON(sizeof(struct sw_flow_key) % sizeof(long)); | 1985 | BUILD_BUG_ON(sizeof(struct sw_flow_key) % sizeof(long)); |
| 1985 | 1986 | ||
| 1986 | flow_cache = kmem_cache_create("sw_flow", sizeof(struct sw_flow), 0, | 1987 | flow_cache = kmem_cache_create("sw_flow", sizeof(struct sw_flow), 0, |
diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h index b65f885ac3dc..212fbf7510c4 100644 --- a/net/openvswitch/flow.h +++ b/net/openvswitch/flow.h | |||
| @@ -125,7 +125,7 @@ struct sw_flow_key { | |||
| 125 | } nd; | 125 | } nd; |
| 126 | } ipv6; | 126 | } ipv6; |
| 127 | }; | 127 | }; |
| 128 | } __aligned(__alignof__(long)); | 128 | } __aligned(BITS_PER_LONG/8); /* Ensure that we can do comparisons as longs. */ |
| 129 | 129 | ||
| 130 | struct sw_flow { | 130 | struct sw_flow { |
| 131 | struct rcu_head rcu; | 131 | struct rcu_head rcu; |
