diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-10-30 02:10:58 -0400 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2013-11-01 21:43:46 -0400 |
commit | 8ddd094675cfd453fc9838caa46ea108a4107183 (patch) | |
tree | 197ff564a74885ac227917a82c1e987454895878 /net/openvswitch/flow_table.c | |
parent | 5eb26b156e29eadcc21f73fb5d14497f0db24b86 (diff) |
openvswitch: Use flow hash during flow lookup operation.
Flow->hash can be used to detect hash collisions and avoid flow key
compare in flow lookup.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/flow_table.c')
-rw-r--r-- | net/openvswitch/flow_table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c index 536b4d2a42e2..e42542706087 100644 --- a/net/openvswitch/flow_table.c +++ b/net/openvswitch/flow_table.c | |||
@@ -421,7 +421,7 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti, | |||
421 | hash = flow_hash(&masked_key, key_start, key_end); | 421 | hash = flow_hash(&masked_key, key_start, key_end); |
422 | head = find_bucket(ti, hash); | 422 | head = find_bucket(ti, hash); |
423 | hlist_for_each_entry_rcu(flow, head, hash_node[ti->node_ver]) { | 423 | hlist_for_each_entry_rcu(flow, head, hash_node[ti->node_ver]) { |
424 | if (flow->mask == mask && | 424 | if (flow->mask == mask && flow->hash == hash && |
425 | flow_cmp_masked_key(flow, &masked_key, | 425 | flow_cmp_masked_key(flow, &masked_key, |
426 | key_start, key_end)) | 426 | key_start, key_end)) |
427 | return flow; | 427 | return flow; |