projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a27375
)
mac-learning: Fix serious performance bug in the learning table.
author
Ethan Jackson
<ethan@nicira.com>
Fri, 22 Jul 2011 00:58:47 +0000
(17:58 -0700)
committer
Ethan Jackson
<ethan@nicira.com>
Fri, 22 Jul 2011 01:01:27 +0000
(18:01 -0700)
Due to a typo, the mac-learning hash table had dissolved into a
linked list. This caused a significant reduction in performance.
lib/mac-learning.c
patch
|
blob
|
history
diff --git
a/lib/mac-learning.c
b/lib/mac-learning.c
index f9f4db3d4bfbd2e9a2846c5d5a4861a70ebf6496..ff240e97a8fb17062186738d145d5158275ab18a 100644
(file)
--- a/
lib/mac-learning.c
+++ b/
lib/mac-learning.c
@@
-74,7
+74,7
@@
mac_table_bucket(const struct mac_learning *ml,
uint16_t vlan)
{
uint32_t hash = mac_table_hash(mac, vlan);
- const struct list *list = &ml->table[hash & MAC_HASH_
BITS
];
+ const struct list *list = &ml->table[hash & MAC_HASH_
MASK
];
return (struct list *) list;
}