zebra: Reduce size of vni hash tables to a more reasonable start size

We are creating 2 hash tables per vni in zebra.  Once we start to
scale the number of vni's we start to see some serious memory
usage in zebra.  Let's reduce the memory usage at startup
for scale of vni's.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2021-04-26 09:24:48 -04:00
parent 38078b1d5a
commit da55bcbcb3
2 changed files with 2 additions and 2 deletions

View File

@ -1323,7 +1323,7 @@ int zebra_evpn_mac_send_del_to_client(vni_t vni, struct ethaddr *macaddr,
*/
struct hash *zebra_mac_db_create(const char *desc)
{
return hash_create(mac_hash_keymake, mac_cmp, desc);
return hash_create_size(8, mac_hash_keymake, mac_cmp, desc);
}
/* program sync mac flags in the dataplane */

View File

@ -85,7 +85,7 @@ int neigh_list_cmp(void *p1, void *p2)
struct hash *zebra_neigh_db_create(const char *desc)
{
return hash_create(neigh_hash_keymake, neigh_cmp, desc);
return hash_create_size(8, neigh_hash_keymake, neigh_cmp, desc);
}
uint32_t num_dup_detected_neighs(zebra_evpn_t *zevpn)