summaryrefslogtreecommitdiff
path: root/pathd
AgeCommit message (Collapse)Author
2024-12-20pathd: Replace ctime_r() with time_to_string()Donatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-01*: Create termtable specific temp memoryDonald Sharp
When trying to track down a MTYPE_TMP memory leak it's harder to search for it when you happen to have some usage of ttable_dump. Let's just give it it's own memory type so that we can avoid confusion in the future. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-27lib: common debug status outputIgor Ryzhov
Implement common code for debug status output and remove daemon-specific code that is duplicated everywhere. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27lib: common debug config outputIgor Ryzhov
Implement common code for debug config output and remove daemon-specific code that is duplicated everywhere. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27lib: rework debug initIgor Ryzhov
The debug library allows to register a `debug_set_all` callback which should enable all debugs in a daemon. This callback is implemented exactly the same in each daemon. Instead of duplicating the code, rework the lib to allow registration of each debug type, and implement the common code only once in the lib. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-20pathd: rework debugsIgor Ryzhov
Pathd uses a single debug struct with additional option flags to configure different types of debug messages. This is not how debug library is supposed to be used. The idea of option flags is to allow more granular control of a single type, not to represent multiple types. This commit adds a separate debug struct for each type which greatly simplifies the code. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-12pathd: Cleanup shutdown memory leaksDonald Sharp
Just some code to cleanup the shutdown memory leaks that are in pathd. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-30pathd: clean up a log messageMark Stapp
Clean up a typo in a log message. Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-04-30pathd: retry synchronous label-manager zapi connectionMark Stapp
Be prepared to retry setting up pathd's synchronous zapi session that's used for label-manager. Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-02-01*: create a single registry of daemons' default port valuesMark Stapp
Create a single registry of default port values that daemons are using. Most of these are vty ports, but there are some others for features like ospfapi and zebra FPM. Signed-off-by: Mark Stapp <mjs@labn.net>
2024-01-27*: fix `frr_daemon_info` indentationDavid Lamparter
clang-format doesn't understand FRR_DAEMON_INFO is a long macro where laying out items semantically makes sense. (Also use only one `FRR_DAEMON_INFO(` in isisd so editors don't get confused with the mismatching `( ( )`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-01-18pathd: add 'show sr-te pcep session json' supportPhilippe Guibert
Add support to dump sr-te pcep session in json output. > ubuntu2204# show sr-te pcep session > PCE q > PCE IP 192.0.2.40 port 4189 > PCC IP 192.0.2.10 port 4189 > PCC MSD 10 > Session Status UP > Precedence 10, best candidate > Confidence normal > Timer: KeepAlive config 30, pce-negotiated 70 > Timer: DeadTimer config 120, pce-negotiated 120 > Timer: PcRequest 30 > Timer: SessionTimeout Interval 30 > Timer: Delegation Timeout 10 > No TCP MD5 Auth > PCE SR Version draft07 > Next PcReq ID 5 > Next PLSP ID 2 > Connected for 171 seconds, since 2023-10-28 09:36:44 UTC > PCC Capabilities: [PCC Initiated LSPs] [Stateful PCE] [SR TE PST] > PCE Capabilities: [Stateful PCE] [SR TE PST] > PCEP Message Statistics > Sent Rcvd > Message Open: 2 1 > Message KeepAlive: 1 6 > Message PcReq: 4 0 > Message PcRep: 0 0 > Message Notify: 4 0 > Message Error: 0 5 > Message Close: 0 0 > Message Report: 5 0 > Message Update: 0 1 > Message Initiate: 0 0 > Message StartTls: 0 0 > Message Erroneous: 0 0 > Total: 16 13 > PCEP Sessions => Configured 1 ; Connected 1 > ubuntu2204# show sr-te pcep session json > { > "pcepSessions":[ > { > "pceName":"q", > "pceAddress":"192.0.2.40", > "pcePort":4189, > "pccAddress":"192.0.2.10", > "pccPort":4189, > "pccMsd":10, > "sessionStatus":"UP", > "bestMultiPce":true, > "precedence":10, > "confidence":"normal", > "keepaliveConfig":30, > "deadTimerConfig":120, > "pccPcepRequestTimerConfig":30, > "sessionTimeoutIntervalSec":30, > "delegationTimeout":10, > "tcpMd5Authentication":false, > "draft07":true, > "draft16AndRfc8408":false, > "nextPcRequestId":5, > "nextPLspId":2, > "sessionKeepalivePceNegotiatedSec":70, > "sessionDeadTimerPceNegotiatedSec":120, > "sessionConnectionDurationSec":177, > "sessionConnectionStartTimeUTC":"2023-10-28 09:36:44", > "pccCapabilities":" [PCC Initiated LSPs] [Stateful PCE] [SR TE PST]", > "pceCapabilities":" [Stateful PCE] [SR TE PST]", > "messageStatisticsReceived":{ > "messageOpen":1, > "messageKeepalive":6, > "messagePcReq":0, > "messagePcRep":0, > "messageNotify":0, > "messageError":5, > "messageClose":0, > "messageReport":0, > "messageUpdate":1, > "messageInitiate":0, > "messageStartTls":0, > "messageErroneous":0, > "total":13 > }, > "messageStatisticsSent":{ > "messageOpen":2, > "messageKeepalive":1, > "messagePcReq":4, > "messagePcRep":0, > "messageNotify":4, > "messageError":0, > "messageClose":0, > "messageReport":5, > "messageUpdate":0, > "messageInitiate":0, > "messageStartTls":0, > "messageErrneous":0, > "total":16 > } > } > ], > "pcepSessionsConfigured":1, > "pcepSessionsConnected":1 > } Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-01-02pathd: add dynamic candidate path metric [computed] keywordPhilippe Guibert
Add the 'computed' keyword for a given metric. > [..] > metric te computed When set by the PCC, the PCE must send back a computed metric value in the PCResponse value. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-12-01Merge pull request #14925 from pguibert6WIND/doctring_pathd_fixJafar Al-Gharaibeh
pathd: fix excessive doc string on pcep msd command
2023-12-01pathd: fix excessive doc string on pcep msd commandPhilippe Guibert
The following message appears after starting pathd: > root@ubuntu2204:~# vtysh > 2023/10/31 05:59:10 [K2CCG-5Y7ZJ] Excessive docstring while parsing 'msd (1-32)' > 2023/10/31 05:59:10 [W7ENN-K2SVA] ---------- > 2023/10/31 05:59:10 [WCW75-6TZPF] PCC maximum SID depth value > 2023/10/31 05:59:10 [W7ENN-K2SVA] ---------- Remove the excessive doc string in the pcep msd command. Fixes: d6d2527448ef ("pathd: fix 'no msd' command not possible under pcc node") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-11-29lib: all: remove './' from xpath 22% speedupChristian Hopps
fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
2023-11-29Merge pull request #14762 from pguibert6WIND/show_pcep_portOlivier Dugeon
pathd: fix space before pcep port in running-config
2023-11-23*: add `zclient_options_sync`David Lamparter
... and use it instead of fiddling with the `.synchronous` field. (Make it const while at it.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-11-21pathd: fix 'no msd' command not possible under pcc nodePhilippe Guibert
It should be possible to reset the configured msd value, and not mentioning the previous msd value. > ubuntu2204(config-sr-te-pcep-pcc)# no msd > % Command incomplete: no msd > ubuntu2204(config-sr-te-pcep-pcc)# Fix this by defining the msd parameter optional, and separating the 'no msd' command from the 'msd' command. Fixe: efba0985fcdd ("pathd: Add optional support for PCEP to pathd") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-11-21pathd: fix space before pcep port in running-configPhilippe Guibert
The below running-configuration has extra spaces before the pce port configuration: > segment-routing > traffic-engineering > pce test > address ip 192.0.2.2 port 1234 > Fix this by keeping only one space. > address ip 192.0.2.2 port 1234 Fixes: efba0985fcdd ("pathd: Add optional support for PCEP to pathd") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-11-03pathd: rework debug pathd pcep commandFarid Mihoub
Rework "debug pathd pcep [...]" command to support the following configurations: - configure one debugging log type at a time. - deconfigure one debugging log type at a time. - configure all debugging logs in one shot. - deconfigure all debugging logs in one shot. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-10-31pathd: add no pcep commandFarid Mihoub
Add "no pcep" command in segment-routing/traffic-engineering context to deconfigure the whole pcep configuration (pce-config, pce and pcc). Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-10-31pathd: add no msd command in the pcc contextFarid Mihoub
Add the "no msd" command to deconfigure pcc/msd node. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-09-19pathd: replace ctime with ctime_rMark Stapp
No ctime - replace with ctime_r() Signed-off-by: Mark Stapp <mjs@labn.net>
2023-09-14pathd: reset pcc peer connection when pce options modifiedFarid Mihoub
Reset the PCC peer connection to take into account new changes of the PCE options. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-09-14pathd: add no command for pce/pce-config sub-commandsFarid MIHOUB
Add "no" command for pcep pce/pce-config sub-commands, this will mainly restart configured options to default values. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-06-26pathd: Stop and free synchronous Zebra client on pathd terminationDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-04-20Merge pull request #12933 from Orange-OpenSource/link_statePhilippe Guibert
lib: Update edge key in link state database
2023-04-07pathd: Update TE to new Link State Edge keyOlivier Dugeon
Following the modification of the edge key in link state database this patch updates the path_ted.c file to replace the old uint64_t edge key by the new ls_edge_key structure when searching for an edge. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2023-04-06*: Use a `struct prefix *p` instead of a `struct prefix` in functionsDonald Sharp
When passing a prefix into a function let's pass by address instead of pass by value. Let's save our stack space. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
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 `struct event_master` to `struct event_loop`Donald Sharp
Let's find a better name for it. 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 struct thread_master to struct event_master and it's ilkDonald Sharp
Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_cancelXXX to event_cancelXXXDonald Sharp
Modify the code base so that thread_cancel becomes event_cancel 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-17Merge pull request #12780 from opensourcerouting/spdx-license-idDonald Sharp
*: convert to SPDX License identifiers
2023-02-10pathd: Remove extraneous include of version.hDonald Sharp
It's not needed in these compiles. So let's remove it. 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>
2023-01-31pathd: Add missing enum's to switch statementDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-27*: fix non-const northbound XPath format stringsDavid Lamparter
Passing a pre-formatted buffer in these places needs a `"%s"` in front so it doesn't get formatted twice. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-27*: apply proper format string attributesDavid Lamparter
So that we get warnings about broken format strings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-12-19pathd: fix SA warning in path_pcep_configMark Stapp
Fix an SA warning about a possibly-uninited local. Signed-off-by: Mark Stapp <mjs@labn.net>
2022-11-14pathd: display SRTE policy status when removing policyPhilippe Guibert
Create a function that logs the status of a given SR-TE policy. Add a call to this function when a policy is being removed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: some traces are added to 'debug pathd ted' command.Philippe Guibert
Some traces initially displayed will be hidden behind the vty command: 'debug pathd ted'. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: use a define to store the the length of endpoint stringPhilippe Guibert
The endpoint string is a 46 byte length buffer. Use a single place to store the length of that buffer. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: add 'debug pathd policy' commandPhilippe Guibert
Add a new cli command to troubleshoort pathd daemon. Some traces initially enabled are hidden behind this cli command. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-11-14pathd: display path ted debugging statusPhilippe Guibert
On 'show debugging' call, display the status about ted debugging. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>