History

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.

Pravin B Shelar committed 13 years ago

Commit 8ddd0941 parent 5eb26b11 file · +1 −1Browse files

Unified · Split

net/openvswitch/flow_table.c+1−1
@@ -421,7 +421,7 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti, · 420 unmodified lines
421421 hash = flow_hash(&masked_key, key_start, key_end);
422422 head = find_bucket(ti, hash);
423423 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 &&
425425 flow_cmp_masked_key(flow, &masked_key,
426426 key_start, key_end))
427427 return flow;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t