{
struct sw_flow **bucket = find_bucket(table, flows, hash);
struct sw_flow *flow = rcu_dereference(*bucket);
- return flow && !memcmp(&flow->key, key, sizeof key) ? flow : NULL;
+ if (flow && !memcmp(&flow->key, key, sizeof(struct odp_flow_key)))
+ return flow;
+ return NULL;
}
static u32 flow_hash0(const struct odp_flow_key *key)
for (i = 0; i < 2; i++) {
struct sw_flow *f = rcu_dereference(*buckets[i]);
if (f) {
- if (!memcmp(&f->key, target, sizeof f->key))
+ if (!memcmp(&f->key, target, sizeof(struct odp_flow_key)))
return buckets[i];
} else if (!empty_bucket)
empty_bucket = buckets[i];