summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fwd.c
AgeCommit message (Collapse)AuthorFilesLines
2018-04-06Change l2-fwd node to allow possible feature before UU-FLOODJohn Lo1-6/+14
If l2-fwd node does not find an L2FIB entry for DMAC of packet, use input feature bitmap to find next node instead of always sending packet to l2-flood node to perform unknow unicast flood. It provides possibilty of using other feature to forward unknow unicast packet instead of flooding the BD. Change-Id: I56b277050537678c92bd548d96d87cadc8d2e287 Signed-off-by: John Lo <loj@cisco.com>
2017-08-03Add support for API client to receive L2 MAC eventsJohn Lo1-1/+2
Added APIs want_l2_macs_events and l2_macs_event to allow an API client to receive notification events from VPP for MAC learned or aged in L2FIB. Only one API client is allowed for L2 MAC events. The want_l2_macs_events API allow caller to specify MAC learn limit, event scan delay and max number of MACs that can be included in a event message. These parameters should be choosen properly as to not have too many MAC events sent by VPP and overwhelm the API share memory. They can all be left as 0's so VPP will setup reasonable defaults which are: 1000 learn limit, 100 msec scan delay and 100 MACs per event message. If want_l2_macs_events is never called, VPP learning and aging should behave as before except that MAC entries provisioned by API or CLI will not be aged, even if it is not set as static_mac. These non static MACs, however, can be overwritten by MAC learning on a MAC move as a leared MAC. Only learned MACs are subject to aging. Change-Id: Ia3757a80cf8adb2811a089d2eafbd6439461285c Signed-off-by: John Lo <loj@cisco.com>
2017-06-19L2FWD:fix seq_num overwritten + validate l2fib entries when forwardingEyal Bari1-24/+48
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-02-17l2 input: avoid per-packet trace checks in the fast pathDave Barach1-6/+14
Change-Id: Ib0c8572773499d8dd4d81b3a565c24412ccc3510 Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+544
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>