aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_bd.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-19L2FWD:fix seq_num overwritten + validate l2fib entries when forwardingEyal Bari1-3/+2
l2_classify memeber table_index was overlaid over l2.l2fib_seq_num which over written when table_index gets initialized in l2_input_classify solved by overlaying both table_index and opaque_index as only one is used seperated l2fib seq num from l2_input configs for better handling of theoretical ABA issue where an entry for a deleted interface is considered valid by the ager because a different interface with same sw_if_index and seq_num was created before the ager got a chance to delete Change-Id: I7b0eeded971627406f1c80834d7e02c0ebe62136 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-19Enforce Bridge Domain ID range to match 24-bit VNI rangeJohn Lo1-6/+11
Enforce bridge domain ID range to allow a maximum value of 16M which matches the range of 24-bit VNI used for virtual overlay network ID. Fix "show bridge-domain" output to allow full 16M BD ID range to be displayed using 8-digit spaces. Change-Id: I80d9c76ea7c001bcccd3c19df1f3e55d2970f01c Signed-off-by: John Lo <loj@cisco.com>
2017-05-05Fix L2FIB learn counter and memory cleanup of mac_by_ip6 hash tableJohn Lo1-2/+11
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>
2017-05-03L2FIB:flush interface learned macs on downEyal Bari1-9/+6
Change-Id: I80a723f55fcf2ecc3209a35e8297c88b45b1abfb Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-02Prevent Bridge Domain operations on BD 0.Jon Loeliger1-1/+44
The default bridge domain, 0, is created automatically with static features. It should be modified by neither the CLI nor the API. So add tests for, and reject any operation on BD 0. The new API error message BD_NOT_MODIFIABLE is returned in such cases. Change-Id: Iaf3dd80c4f43cf41689ca55756a0a3525420cd12 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-04-28Fix memory leak on deletion of BD (bridge domain)John Lo1-3/+9
On BD deletion, free memory used by members vector and mac_by_ip4 and mac_by_ip6 hash tables. Change-Id: Ied467e79bb6636fd8788bdeddee660c66391bb7e Signed-off-by: John Lo <loj@cisco.com>
2017-04-24BD:unify bridge domain creation codeEyal Bari1-49/+43
Change-Id: I29082e7a0c556069180a157e55b3698cf8cd38c7 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-04-06VPP-686: create bridge-domainChoonho Son1-2/+4
- update default flags - add missing flag learn Change-Id: I50a1a001848769836468838775b59d3414d27710 Signed-off-by: Choonho Son <choonho.son@gmail.com>
2017-04-04BD/API:add bridge_domain_set_mac_age apiEyal Bari1-2/+1
Change-Id: Ic2d33b31ba88f6d9602a22439865637d98cf4a33 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-04-01CLI: create/delete bridge-domainChoonho Son1-1/+189
Added new CLI command - create bridge-domain <bridge-domain-id> - create bridge-domain <bridge-domain-id> del Change-Id: I1a7d632c7daa3c37b7f424a184e8fabd489518e9 Signed-off-by: Choonho Son <choonho.son@gmail.com>
2017-03-28Implement MAC Flush for BD or Interface from the L2FIBJohn Lo1-15/+26
Allow non-static MACs in the L2FIB which is associated with an interface or a bridge domain (BD) be flushed. MAC flush are initiated automatically when an interface is removed from a BD or when a BD is deleted. MAC flush can also be invoked manually via the following CLI: l2fib mac-flush interface <if-name> l2fib mac-flush bridge-domain <bd-id> Change-Id: Ie33243622834810a765f48ebcd22bdb8e8fc87a4 Signed-off-by: John Lo <loj@cisco.com>
2017-03-02bridge domain: fix members reordered when removingEyal Bari1-1/+1
since adding support for multicast vxlan flooding (flood class tunnel master) correct flood functionality depends on the order of the memebers vector solved by using vec_delete instead of vec_del1 which swaps members before deleting the last element Change-Id: I234f218d49172b4142c567db9699a5cb274e4a66 Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+1079
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>