diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-07-21 17:58:47 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-07-22 11:45:11 -0700 |
commit | 44f2560c67fca0d5712a3bec309e4e93e9e63a7b (patch) | |
tree | 274cadb1d3ffcc2262daca9be1121367f6d5b67a /lib | |
parent | bd6ce3f24b740fc946fe88baa0619c945f02b434 (diff) |
mac-learning: Fix serious performance bug in the learning table.
Due to a typo, the mac-learning hash table had dissolved into a
linked list. This caused a significant reduction in performance.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mac-learning.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mac-learning.c b/lib/mac-learning.c index 42864ce0..b010406c 100644 --- a/lib/mac-learning.c +++ b/lib/mac-learning.c @@ -73,7 +73,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; } |