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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user