Fix L2FIB learn counter and memory cleanup of mac_by_ip6 hash table 12/6612/2
authorJohn Lo <loj@cisco.com>
Fri, 5 May 2017 16:35:25 +0000 (12:35 -0400)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 5 May 2017 19:27:53 +0000 (19:27 +0000)
commitd48c8eb7354c6c8b5b875dc70d616d11c17e9fb8
treee24b478a6e7f9237c4e068ad5dfa6511bb8c842a
parentb1291e259cb246632f91ce0bbc30273354918e93
Fix L2FIB learn counter and memory cleanup of mac_by_ip6 hash table

Fix global_learn_count to be incremented or decremented by add and
deletion of non-static MAC entries from L2FIB only. Without this fix,
the counter may reach the threshold of 1M and stop MAC leanring even
though number of MAC entries in L2FIB is less than the threshold.

Cleanup indirect hash key memory used by mac_by_ip6 hash table on
BD deletion.

Change-Id: I13986c4e6304c7956122520dd3f83d6bb6e65a15
Signed-off-by: John Lo <loj@cisco.com>
src/vnet/l2/l2_bd.c
src/vnet/l2/l2_fib.c