summaryrefslogtreecommitdiff
path: root/pathd
AgeCommit message (Collapse)Author
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>
2022-11-03Merge pull request #12196 from opensourcerouting/xref-vtyshDonald Sharp
*: rewrite `extract.pl` using `xref` infra
2022-10-26build, vtysh: extract vtysh commands from .xrefDavid Lamparter
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>
2022-10-26pathd: Make pathd happy with clang-16Donald Sharp
Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2022-10-07*: Create and use infrastructure to show debugs in libDonald Sharp
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>
2022-09-27Merge pull request #12018 from pguibert6WIND/pathd_warning_notedDonald Sharp
pathd: change the vty output, when no ted is enabled on pathd
2022-09-27Merge pull request #11910 from fdumontet6WIND/NAI_AdjOlivier Dugeon
pathd: nai adjacency fix query type f for IPV6
2022-09-26pathd: change the vty output, when no ted is enabled on pathdPhilippe Guibert
Change the vty output, in case ted is not enabled. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-09-20pathd: 'no mpls-te on' command was not workingPhilippe Guibert
Fix the 'no mpls-te on' command. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-09-06 pathd: nai adjacency fix query type f for IPV6Francois Dumontet
This commit is dedicated to fix some issues in path_ted_query_type_f function. Issues are related to IPv6 implementation. -key is not based on the pertinent part of IPv6 address. -test on memcmp return value is mismatch. -wrong flag value tested (ipv4 against ipv6). -return adj_sid was the wrong one. Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>