summaryrefslogtreecommitdiff
path: root/bfdd/dplane.c
AgeCommit message (Collapse)Author
2025-03-03bfdd: Add BFD "log-session-changes" feature.Acee Lindem
Add the BFD "log-session-changes" via the YANG and northbound API. Also add the configured value to show and operational state. Signed-off-by: Acee Lindem <acee@lindem.com>
2024-11-19bfdd: retain remote dplane client socketMark Stapp
When using bfd in remote-dataplane client mode, don't close a new client socket if we're going to try to use it. Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-07-25bfdd: remove control socket obsolete codeRafael Zalamena
Let's remove the obsolete BFD control socket. If the functionality is needed then YANG/northbound notifications / getting should be used instead. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_add_XXX functions to event_add_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-23*: Change thread->func to return void instead of intDonald Sharp
The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-28*: `frr-format` with unmodified GCCDavid Lamparter
Since there's very few locations where the `frr-format` actually prints false positive warnings, consensus seems to be to just work around the false positives even if the code is correct. In fact, there is only one pattern of false positives currently, in `bfdd/dplane.c` which does `vty_out("%"PRIu64, (uint64_t)be64toh(...))`. The workaround/fix for this is a replacement `be64toh` whose type is always `uint64_t` regardless of what OS we're on, making the cast unnecessary. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-06-29*: Do not check for XMALLOC/XCALLOC against NULLsDonatas Abraitis
We don't check this pattern anywhere in the code basically, so let's unify the code. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-22Merge pull request #8121 from opensourcerouting/macro-cleanupDonatas Abraitis
*: require ISO C11 + semicolons after file-scope macros
2021-03-17*: require semicolon after DEFINE_MTYPE & coDavid Lamparter
Back when I put this together in 2015, ISO C11 was still reasonably new and we couldn't require it just yet. Without ISO C11, there is no "good" way (only bad hacks) to require a semicolon after a macro that ends with a function definition. And if you added one anyway, you'd get "spurious semicolon" warnings on some compilers... With C11, `_Static_assert()` at the end of a macro will make it so that the semicolon is properly required, consumed, and not warned about. Consistently requiring semicolons after "file-level" macros matches Linux kernel coding style and helps some editors against mis-syntax'ing these macros. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-16bfdd: separate echo rx/tx timersIgor Ryzhov
Currently there is a single interval for both RX and TX echo functions. This commit introduces separate RX and TX timers for echo packets. The main advantage is to be able to set the receive interval to zero when we don't want to receive echo packets from the remote system. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-16*: fix format string SNAFUsDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2020-11-24bfdd: support connecting to BFD data planeRafael Zalamena
Add option to connect to a data plane server instead of receiving connections. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-11-24bfdd: distributed BFD show commandsRafael Zalamena
Show BFD sessions updated counters by asking the data plane for this information and show data plane statistics. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-11-24bfdd: integrate distributed BFDRafael Zalamena
Add hooks in the correct places so the BFD daemon uses the data plane instead of the software packet sending implementation to monitor the session. This code also adds some handlers to support fallback to FRR BFD session handling, however since this complicates the code it won't work at the moment (the BFD sockets are disabled by default when using data plane). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-11-24bfdd: import distributed BFD implementationRafael Zalamena
Distributed BFD is a term used for BFD implementations that do not run on the routing engine, instead it is run on a data plane (software or hardware based). The current code implements the basic communication between FRR BFD daemon with an external BFD data plane and defines the protocol format in the file `bfddp_packet.h`. To enable/use data plane you need to start BFD daemon with the command line `--dplaneaddr <type>:<address>`, then a socket will be opened to listen for incoming data plane connections. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>