Flow->hash can be used to detect hash collisions and avoid flow key compare in flow lookup.
Signed-off-by: Pravin B Shelar <pshe...@nicira.com> --- datapath/flow_table.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/datapath/flow_table.c b/datapath/flow_table.c index c2a7aa5..ddb14da 100644 --- a/datapath/flow_table.c +++ b/datapath/flow_table.c @@ -426,7 +426,7 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti, hash = flow_hash(&masked_key, key_start, key_end); head = find_bucket(ti, hash); hlist_for_each_entry_rcu(flow, head, hash_node[ti->node_ver]) { - if (flow->mask == mask && + if (flow->mask == mask && flow->hash == hash && flow_cmp_masked_key(flow, &masked_key, key_start, key_end)) return flow; -- 1.7.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev