2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

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.
This commit is contained in:
Ethan Jackson
2011-07-21 17:58:47 -07:00
parent 3a27375ead
commit 7bbe0453f5

View File

@@ -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;
}