summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_api.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-03Add support for API client to receive L2 MAC eventsJohn Lo1-6/+77
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-27L2-LEARN:fix l2fib entry seq num not updated on hit (VPP-888)Eyal Bari1-17/+11
fixed instability in l2bd_multi_instnce test - sometimes failing with extra packets captured it appears l2-learn was not updating hit entries but rather a copy of them. if the ager did not have a chance to run before the test was running the learning cycle - entries were not updated with the packet's seq num - causing packets to flood when hitting the stale seq_num in l2-fwd - hence the extra packets fixed handling of filter entries revert workaround for instability in test Change-Id: I16d918e6310a5bf40bad5b7335b2140c2867cb71 Signed-off-by: Eyal Bari <ebari@cisco.com> (cherry picked from commit 25ff2ea3a31e422094f6d91eab46222a29a77c4b)
2017-05-20API: Cleaning up message naming that does not follow the conventionsOle Troan1-36/+25
is_address_reachable - Disabled so deleted cli_request - Renamed to cli vnet_summary_stats_reply - Renamed to vnet_get_summary_stats_reply bridge_domain_sw_if_details - Deleted, incorporated in main message l2_fib_table_entry - Renamed to l2_fib_table_details Change-Id: I93b7e8769a3ba7b4989b3c270270f575f386464f Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Marek Gradzki <mgradzki@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2017-05-15L2BD/API:fix bd dump to ignore unknown bd_idEyal Bari1-19/+20
Change-Id: I417dfeba902ca8c3a080773942d4d2ce4335a9c1 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-08L2FIB:CLI/API to flush all non-static entriesEyal Bari1-5/+13
added CLI l2fib flush-mac all added API l2fib_flush_all flushes all non static l2fib entries on all valid BDs Change-Id: Ic963c88f4bed56308c03ab43106033132a0e87be Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-02Prevent Bridge Domain operations on BD 0.Jon Loeliger1-1/+18
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-24BD:unify bridge domain creation codeEyal Bari1-48/+15
Change-Id: I29082e7a0c556069180a157e55b3698cf8cd38c7 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-04-05L2FIB:add l2fib_flush_bd l2fib_flush_int apisEyal Bari1-0/+38
Change-Id: I0a6989c6963956f3e60e8c50835c57845fccef8c Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-04-04BD/API:add bridge_domain_set_mac_age apiEyal Bari1-8/+25
Change-Id: Ic2d33b31ba88f6d9602a22439865637d98cf4a33 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-03-02Clean up binary api message handler registration issuesDave Barach1-22/+0
Removed a fair number of "BUG" message handlers, due to conflicts with actual message handlers in api_format.c. Vpp itself had no business receiving certain messages, up to the point where we started building in relevant code from vpp_api_test. Eliminated all but one duplicate registration complaint. That one needs attention from the vxlan team since the duplicated handlers have diverged. Change-Id: Iafce5429d2f906270643b4ea5f0130e20beb4d1d Signed-off-by: Dave Barach <dave@barachs.net>
2017-01-27API refactoring : l2 (add)Pavel Kotucek1-1/+82
Change-Id: I693a73ba9a5e3b0cb5d2a6c5d363f671e19c1f24 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-01-10API refactoring : l2, mpls, srPavel Kotucek1-3/+370
Change-Id: Ic5f273dae607a1d3902489e65734c76f027dc30f Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+140
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>