aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd
AgeCommit message (Collapse)AuthorFilesLines
2021-02-11tests: tag the tests that do not work with multi-worker configurationAndrew Yourtchenko1-0/+2
If the multi-worker default VPP configuration is triggered by setting VPP_WORKER_CONFIG="workers 2", some of the tests fail for various reasons. It's a substantial number, so this change marks all of the testsets that have this issue, such that they can be addressed later independently. Type: test Change-Id: I4f77196499edef3300afe7eabef9cbff91f794d3 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-01-22tests: add generalized tags for tests, use them for run-solo testsAndrew Yourtchenko1-24/+7
We have accumulated several scenarios in prod or wishlists where it would be useful to have a general infra to say yes/no about a certain test, and potentially make decisions based on that, for example: - runs solo (aka 'time-dependent') - (wishlist) part of quick smoke-test set - (wishlist) intermittent failure unrelated to timing - (wishlist) test broken with a multi-worker config in vpp Refactor the current "run-solo" code to allow for this extension. Type: test Change-Id: Ia5b3810e57c0543753c8e0dc4dc0cfb4a30b36ac Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-12-22tests: move bfd tests to src/vnet/bfd/testDave Wallace2-0/+3201
- Refactor make test code to be co-located with the vpp feature source code. Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I3ef69bc915d2217357a9e2b1afa1cfd6c363faa0
2020-12-14misc: move to new pool_foreach macrosDamjan Marion3-21/+23
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-21vlib: print logs to stderr if interactive or nosyslog setDamjan Marion1-25/+19
If VPP is started in interactive mode, instead of sending logs to syslog server we print them directly to stderr. Output is colorized, but that can be turned off with unix { nocolor } Type: improvement Change-Id: I9a0f0803e4cba2849a6efa0b6a86b9614ed33ced Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-21misc: minimize dependencies on udp.hFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id13f33843b230a1d169560742c4f7b2dc17d8718
2020-09-25bfd: add missing unlockKlement Sekera1-0/+1
Thanks to Martin Sustrik for spotting the bug introduced by a316744 and submitting the fix. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I4984fc32503b0c7b6db3543834dfbbfed2a1f23c
2020-04-09bfd: always start timers with non-zero tick countsDave Barach1-0/+1
Otherwise the tw_timer_template code ASSERTs... Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I85e00a3e3486e3b238254ac4116d684a32984434
2020-02-17bfd: use tw_timer_template instead of legacy wheelKlement Sekera7-309/+336
Type: refactor Change-Id: I04e71a64e676910dc4c6cbc1ab54ffb0c29aa5b9 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-01-30vppinfra: improve clocks_per_second convergenceDave Barach1-1/+1
Apply exponential smoothing to the clock rate update calculation in clib_time_verify_frequency(), with a half-life of 1 minute and a sampling frequency of 16 seconds. Within 5 minutes or so, the calculation converges With each rate recalculation: reset total_cpu_time based on the kernel timebase delta since vpp started, and the new clock rate Improve the "show clock [verbose]" debug CLI command. BFD echo + echo fail tests marked off until the BFD code can be reworked a bit. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I24e88a78819b12867736c875067b386ef6115c5c
2020-01-30bfd: add missing castKlement Sekera1-1/+1
Add missing cast to time conversion function to to deal with arbitrary clocks-per-second values. Type: fix Change-Id: I5075a823e7a95c972c513ac765252337d5f59fbf Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-01-27bfd: reset peer discriminator on timeoutKlement Sekera1-0/+13
More RFC compliance. Ticket: VPP-1816 BFD: peer discriminator not reset on timeout Type: fix Change-Id: I68063c18097d282b3527e3fb485c1d0d1fd1b0c8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-01-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-2/+2
Type: docs Signed-off-by: John DeNisco <jdenisco@cisco.com> Change-Id: I7280e5c5ad10a66c0787a5282291a2ef000bff5f
2020-01-04misc: fix feature.yamlOle Troan1-1/+0
Add checkfeaturelist validation to checkstyle. Fix two files with errors. Type: docs Change-Id: I81eda0e25b271f2006b4da22efdf7218d52a67d3 Signed-off-by: Ole Troan <ot@cisco.com>
2020-01-03bfd: add feature.yamlKlement Sekera1-0/+9
Type: docs Change-Id: Ica2b4a9d4fe2ceaafd6d707ebe3c4a7fa0af1c07 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns2-5/+5
Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-10api: multiple connections per processDave Barach1-1/+1
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-11-16bfd: allow IPv6 link-local address as local addressAlexander Chernavin1-15/+30
Type: fix Change-Id: Ia3dacd2628591f7ba9710e8e4d68df97ae21935c Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2019-09-04bfd: API cleanupJakub Grajciar2-84/+66
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I4b91ebe8aadbec8b95716ed1cde4b0a13eee3a3f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-07-23api: binary api cleanupDave Barach2-5/+5
Multiple API message handlers call vnet_get_sup_hw_interface(...) without checking the inbound sw_if_index. This can cause a pool_elt_at_index ASSERT in a debug image, and major disorder in a production image. Given that a number of places are coded as follows, add an "api_visible_or_null" variant of vnet_get_sup_hw_interface, which returns NULL given an invalid sw_if_index, or a hidden sw interface: - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || memif_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a memif interface"); Rename two existing xxx_safe functions -> xxx_or_null to make it obvious what they return. Type: fix Change-Id: I29996e8d0768fd9e0c5495bd91ff8bedcf2c5697 Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-07bfd: midchain adjacency supportMatthew G Smith1-10/+51
Support an adjacency with lookup_next_index of IP_LOOKUP_NEXT_MIDCHAIN so tunnel interfaces can have BFD configured on them. Also, check if the interface a session is configured on is up and skip assembling the packet and calculating the checksum if the interface is down. Change-Id: I44f76478d0fc1592e3491dd9368819a5c957e74a Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra1-1/+1
Change-Id: I53ab8d17914e6563110354e4052109ac02bf8f3b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-12bfd: register udp ports only when enabledKlement Sekera1-14/+49
Change-Id: Iffb4b314be3ded0d9c6acb77ec1c6f22778f301d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-02-14Add -fno-common compile optionBenoît Ganne1-1/+1
-fno-common makes sure we do not have multiple declarations of the same global symbol across compilation units. It helps debug nasty linkage bugs by guaranteeing that all reference to a global symbol use the same underlying object. It also helps avoiding benign mistakes such as declaring enum as global objects instead of types in headers (hence the minor fixes scattered across the source). Change-Id: I55c16406dc54ff8a6860238b90ca990fa6b179f1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-01-20buffers: don't init metadata, as it is already initializedDamjan Marion2-3/+0
Change-Id: Ia083050389853c25b069f0f8286d50d3f4aef527 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach2-21/+22
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-23c11 safe string handling supportDave Barach3-20/+20
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-11bfd:fix handling session creation batchEyal Bari1-27/+34
when multiple session creating script is ran (via exec) only the first one actually starts Change-Id: I0fc36f65795c8921cf180e0b555c446e5a80be45 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-02BFD: add get echo source API (VPP-1367)Matus Fabian2-1/+87
Change-Id: I45f540128e038ddb17ba96ce30965e8f7c732067 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-14Remove scaffoldingDave Barach2-14/+1
Change-Id: I4acebbf76556428bb45356c8e5b85c72a85a1656 Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-29Address bfd rpc scale issuesDave Barach3-24/+280
Remove the expensive RPC call for every received packet and replace it with lock-protected direct calls. Reinstate RPC for the less frequent notification traffic. Adjust the wakeup event sending logic to minimize the number of events sent, by measuring the time it takes from sending the event to processing it, and subsequently not sending the event if the pending wake-up time is within 2x or the event propagation delay. Eventually: remove oingo / oingoes. Change-Id: I0b3d33c5d029527b54867a97ab07f35f346aaa3d Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Signed-off-by: Steve Shin <jonshin@cisco.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-08-09bfd:fix NULL session free/putEyal Bari1-1/+0
Change-Id: If9f1f8c16c098c453bb53591e50a4cbd7cb192e4 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-07BFD: Fix format_ip46_address() parameter ordering.Jon Loeliger1-1/+1
Change-Id: I2b50e3fc06b4e905395d4706083f12ebc76826ce Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-04-17Add logging supportDamjan Marion3-52/+124
Change-Id: Ieac9cf50156dbbb4962411e900d59256441915ef Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-16stats: allow configuring poller delayKlement Sekera1-16/+0
This introduces a startup config option for configuring stats poller delay. Use `stats { interval <seconds> }` to configure the delay at startup. The default value remains unchanged - 10 seconds. Change-Id: If12cb1f7f6f1f8ecfa461561bc77847cdf260388 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-13BFD: make CLI consume only one line at a timeKlement Sekera1-26/+78
This makes it possible to add BFD commands to scripts executed via `exec' CLI. Change-Id: Id0ed6c09baee6f8ac9ff183d305a470f55a1f885 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
This is a version of the VPP API generator in Python PLY. It supports the existing language, and has a plugin architecture for generators. Currently C and JSON are supported. Changes: - vl_api_version to option version = "major.minor.patch" - enum support - Added error checking and reporting - import support (removed the C pre-processor) - services (tying request/reply together) Version: option version = "1.0.0"; Enum: enum colours { RED, BLUE = 50, }; define foo { vl_api_colours_t colours; }; Services: service { rpc foo returns foo_reply; rpc foo_dump returns stream foo_details; rpc want_stats returns want_stats_reply events ip4_counters, ip6_counters; }; Future planned features: - unions - bool, text - array support (including length) - proto3 output plugin - Refactor C/C++ generator as a plugin - Refactor Java generator as a plugin Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-15bfd: fix bfd_auth_keys_dumpFlorin Coras1-1/+1
Change-Id: I58598f18b9af70e580be4d28a0c40ec0ffcd5dca Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11api: remove transport specific code from handlersFlorin Coras1-36/+34
This does not update api client code. In other words, if the client assumes the transport is shmem based, this patch does not change that. Furthermore, code that checks queue size, for tail dropping, is not updated. Done for the following apis: Plugins - acl - gtpu - memif - nat - pppoe VNET - bfd - bier - tapv2 - vhost user - dhcp - flow - geneve - ip - punt - ipsec/ipsec-gre - l2 - l2tp - lisp-cp/one-cp - lisp-gpe - map - mpls - policer - session - span - udp - tap - vxlan/vxlan-gpe - interface VPP - api/api.c OAM - oam_api.c Stats - stats.c Change-Id: I0e33ecefb2bdab0295698c0add948068a5a83345 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-09api: refactor vlibmemoryFlorin Coras1-4/+4
- separate client/server code for both memory and socket apis - separate memory api code from generic vlib api code - move unix_shared_memory_fifo to svm and rename to svm_fifo_t - overall declutter Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-16Use crc32 wrapper (VPP-1086)Gabriel Ganne1-4/+4
This allows arm platforms to also take advantage of crc32 hardware acceleration. * add a wrapper for crc32_u64. It's the only one really used. Using it instead of a call to clib_crc32c() eases building symmetrical hash functions. * replace #ifdef on SSE4 by a test on clib_crc32c_uses_intrinsics. Note: keep the test on i386 * fix typo in lb test log Change-Id: I03a0897b70f6c1717e6901d93cf0fe024d5facb5 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-11-10add warning control macro setGabriel Ganne1-11/+3
Add a way to toggle on and off a warning for a specific section of code. This supports clang and gcc, and has no effect for any other compilers. This follows commit bfc29ba442dbb65599f29fe5aa44c6219ed0d3a8 and provides a generic way to handle warnings in such corner cases. To disable a warning enabled by "-Wsome-warning" for a specific code: WARN_OFF(some-warning) // disable compiler warning ; /* some code */ WARN_ON(some-warning) // enable the warning again Change-Id: I0101caa0aa775e2b905c7b3b5fef3bbdce281673 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-11-07fix bfd cli with gcc >= 6Gabriel Ganne1-1/+1
Change-Id: Iff63238bcf87db3411493e95064c5ad3ed8fd166 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach1-0/+2
Add one of these statements to foo.api: vl_api_version 1.2.3 to generate a version tuple stanza in foo.api.h: /****** Version tuple *****/ vl_api_version_tuple(foo, 1, 2, 3) Change-Id: Ic514439e4677999daa8463a94f948f76b132ff15 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
2017-10-04[aarch64] Fixes CLI crashes on dpaa2 platform.Christophe Fontaine1-1/+1
- always use 'va_args' as pointer in all format_* functions - u32 for all 'indent' params as it's declaration was inconsistent Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79 Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-07-14vnet_buffer_t flags cleanupDamjan Marion1-2/+2
Change-Id: I123eccea98abafeb31f25d2a162501e2eded60d4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-14Introduce l{2,3,4}_hdr_offset fields in the buffer metadataDamjan Marion1-2/+2
To save space in the first cacheline following is changed: - total_length_not_including_first_buffer moved to the 2nd cacheline. This field is used only when VLIB_BUFFER_TOTAL_LENGTH_VALID and VLIB_BUFFER_NEXT_PRESENT are both set. - free_list_index is now stored in 4bits inside flags, which allows up to 16 free lists. In case we need more we can store index in the 2nd cachelin Change-Id: Ic8521350819391af470d31d3fa1013e67ecb7681 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10Add crc32c inline function, allows compilation on 32-bit systemsDamjan Marion1-1/+1
32-bit code still can use crc32c instructions, but it operates on 32 registers Change-Id: I9bb6b0b59635d6ea6a753584676ebcf59c8f6584 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-02BFD: don't crash if interface is deletedKlement Sekera1-33/+42
Instead, drop the BFD session associated with it.. Change-Id: Ie09877d5c94844be2e833900d9dde7f23edaf8cd Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-04-25"autoreply" flag: autogenerate standard xxx_reply_t messagesDave Barach1-121/+11
Change-Id: I72298aaae7d172082ece3a8edea4217c11b28d79 Signed-off-by: Dave Barach <dave@barachs.net>