summaryrefslogtreecommitdiffstats
path: root/pathd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pathd: Cleanup shutdown memory leaksDonald Sharp2024-08-121-0/+15
| | | | | | | Just some code to cleanup the shutdown memory leaks that are in pathd. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* pathd: clean up a log messageMark Stapp2024-04-301-1/+1
| | | | | | Clean up a typo in a log message. Signed-off-by: Mark Stapp <mjs@cisco.com>
* pathd: retry synchronous label-manager zapi connectionMark Stapp2024-04-301-15/+50
| | | | | | | 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>
* *: create a single registry of daemons' default port valuesMark Stapp2024-02-011-2/+0
| | | | | | | | 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>
* *: fix `frr_daemon_info` indentationDavid Lamparter2024-01-271-5/+10
| | | | | | | | | | 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>
* pathd: add 'show sr-te pcep session json' supportPhilippe Guibert2024-01-181-19/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pathd: add dynamic candidate path metric [computed] keywordPhilippe Guibert2024-01-021-7/+17
| | | | | | | | | | | | 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>
* Merge pull request #14925 from pguibert6WIND/doctring_pathd_fixJafar Al-Gharaibeh2023-12-011-1/+0
|\ | | | | pathd: fix excessive doc string on pcep msd command
| * pathd: fix excessive doc string on pcep msd commandPhilippe Guibert2023-12-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | lib: all: remove './' from xpath 22% speedupChristian Hopps2023-11-293-50/+50
|/ | | | | | fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
* Merge pull request #14762 from pguibert6WIND/show_pcep_portOlivier Dugeon2023-11-291-4/+15
|\ | | | | pathd: fix space before pcep port in running-config
| * pathd: fix 'no msd' command not possible under pcc nodePhilippe Guibert2023-11-211-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * pathd: fix space before pcep port in running-configPhilippe Guibert2023-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | *: add `zclient_options_sync`David Lamparter2023-11-231-4/+1
|/ | | | | | | | ... and use it instead of fiddling with the `.synchronous` field. (Make it const while at it.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pathd: rework debug pathd pcep commandFarid Mihoub2023-11-032-20/+24
| | | | | | | | | | | 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>
* pathd: add no pcep commandFarid Mihoub2023-10-311-0/+30
| | | | | | | 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>
* pathd: add no msd command in the pcc contextFarid Mihoub2023-10-311-5/+10
| | | | | | Add the "no msd" command to deconfigure pcc/msd node. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
* pathd: replace ctime with ctime_rMark Stapp2023-09-191-1/+3
| | | | | | No ctime - replace with ctime_r() Signed-off-by: Mark Stapp <mjs@labn.net>
* pathd: reset pcc peer connection when pce options modifiedFarid Mihoub2023-09-141-10/+74
| | | | | | | Reset the PCC peer connection to take into account new changes of the PCE options. Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
* pathd: add no command for pce/pce-config sub-commandsFarid MIHOUB2023-09-141-16/+31
| | | | | | | 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>
* pathd: Stop and free synchronous Zebra client on pathd terminationDonatas Abraitis2023-06-261-0/+2
| | | | Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* Merge pull request #12933 from Orange-OpenSource/link_statePhilippe Guibert2023-04-201-4/+5
|\ | | | | lib: Update edge key in link state database
| * pathd: Update TE to new Link State Edge keyOlivier Dugeon2023-04-071-4/+5
| | | | | | | | | | | | | | | | 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>
* | *: Use a `struct prefix *p` instead of a `struct prefix` in functionsDonald Sharp2023-04-071-2/+2
|/ | | | | | | 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>
* *: Convert event.h to frrevent.hDonald Sharp2023-03-243-3/+3
| | | | | | | We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert `struct event_master` to `struct event_loop`Donald Sharp2023-03-2410-15/+15
| | | | | | Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-244-13/+13
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert struct thread_master to struct event_master and it's ilkDonald Sharp2023-03-2410-15/+15
| | | | | | | Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_cancelXXX to event_cancelXXXDonald Sharp2023-03-244-10/+10
| | | | | | Modify the code base so that thread_cancel becomes event_cancel Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_add_XXX functions to event_add_XXXDonald Sharp2023-03-243-24/+23
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename `struct thread` to `struct event`Donald Sharp2023-03-248-52/+52
| | | | | | | | | 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>
* *: Rename thread.[ch] to event.[ch]Donald Sharp2023-03-243-3/+3
| | | | | | | | | | | 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>
* Merge pull request #12780 from opensourcerouting/spdx-license-idDonald Sharp2023-02-1730-412/+30
|\ | | | | *: convert to SPDX License identifiers
| * *: auto-convert to SPDX License IDsDavid Lamparter2023-02-0930-412/+30
| | | | | | | | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | pathd: Remove extraneous include of version.hDonald Sharp2023-02-102-2/+0
|/ | | | | | It's not needed in these compiles. So let's remove it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* pathd: Add missing enum's to switch statementDonald Sharp2023-01-3110-49/+220
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: fix non-const northbound XPath format stringsDavid Lamparter2023-01-271-1/+1
| | | | | | | 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>
* *: apply proper format string attributesDavid Lamparter2023-01-271-1/+2
| | | | | | So that we get warnings about broken format strings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pathd: fix SA warning in path_pcep_configMark Stapp2022-12-191-2/+1
| | | | | | Fix an SA warning about a possibly-uninited local. Signed-off-by: Mark Stapp <mjs@labn.net>
* pathd: display SRTE policy status when removing policyPhilippe Guibert2022-11-141-4/+20
| | | | | | | 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>
* pathd: some traces are added to 'debug pathd ted' command.Philippe Guibert2022-11-141-6/+8
| | | | | | | Some traces initially displayed will be hidden behind the vty command: 'debug pathd ted'. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* pathd: use a define to store the the length of endpoint stringPhilippe Guibert2022-11-143-16/+30
| | | | | | | 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>
* pathd: add 'debug pathd policy' commandPhilippe Guibert2022-11-143-43/+115
| | | | | | | | 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>
* pathd: display path ted debugging statusPhilippe Guibert2022-11-143-0/+10
| | | | | | | On 'show debugging' call, display the status about ted debugging. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* Merge pull request #12196 from opensourcerouting/xref-vtyshDonald Sharp2022-11-034-11/+0
|\ | | | | *: rewrite `extract.pl` using `xref` infra
| * build, vtysh: extract vtysh commands from .xrefDavid Lamparter2022-10-264-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | pathd: Make pathd happy with clang-16Donald Sharp2022-10-261-1/+1
|/ | | | Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
* *: Create and use infrastructure to show debugs in libDonald Sharp2022-10-071-0/+2
| | | | | | | | | There are lib debugs being set but never show up in `show debug` commands because there was no way to show that they were being used. Add a bit of infrastructure to allow this and then use it for `debug route-map` Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* Merge pull request #12018 from pguibert6WIND/pathd_warning_notedDonald Sharp2022-09-271-1/+1
|\ | | | | pathd: change the vty output, when no ted is enabled on pathd
| * pathd: change the vty output, when no ted is enabled on pathdPhilippe Guibert2022-09-261-1/+1
| | | | | | | | | | | | Change the vty output, in case ted is not enabled. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>