summaryrefslogtreecommitdiffstats
path: root/isisd/isis_lsp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* isisd : Transformational changes to support different VRFs.Kaushik2020-08-141-23/+31
| | | | | | | | | 1. Created a structure "isis master". 2. All the changes are related to handle ISIS with different vrf. 3. A new variable added in structure "isis" to store the vrf name. 4. The display commands for isis is changed to support different VRFs. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
* isisd: don't attach Adj-SIDs to pseudo-node LSPsRenato Westphal2020-08-111-2/+2
| | | | | | No need to do this. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: remove PRI[udx](8|16|32)David Lamparter2020-07-141-34/+16
| | | | | | | | | | | These are completely pointless and break coccinelle string replacements. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* *: un-split strings across linesDavid Lamparter2020-07-141-10/+5
| | | | | | | | | | | | | | | | | Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: Fast RIB recovery from BFD recognized link failuresGalaxyGorilla2020-07-031-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately as the topotests show a fast recovery after failure detection due to BFD is currently not possible because of the following issue: There are multiple scheduling mechanisms within isisd to prevent overload situations. Regarding our problem these two are important: * scheduler for regenerating ISIS Link State PDUs scheduler for managing * consecutive SPF calculations In fact both schedulers are coupled, the first one triggers the second one, which again is triggered by isis_adj_state_change (which again is triggered by a BFD 'down' message). The re-calculation of SPF paths finally triggers updates in zebra for the RIB. Both schedulers work as a throttle, e.g. they allow the regeneration of Link State PDUs or a re-calculation for SPF paths only once within a certain time interval which is configurable (and by default different!). This means that a request can go through the first scheduler but might still be 'stuck' at the second one for a while. Or a request can be 'stuck' at the first scheduler even though the second one is ready. This also explains the 'random' behaviour one can observe testing since a 'fast' recovery is only possible if both schedulers are ready to process this request. Note that the solution in this commit is 'thread safe' in the sense that both schedulers use the same thread master such that the introduced flags are only used exactly one time (and one after another) for a 'fast' execution. Further there are some irritating comments and logs which I partially removed. They seems to be not valid anymore due to changes in thread management (or they were never valid in the first place). Signed-off-by: GalaxyGorilla <sascha@netdef.org>
* Merge pull request #6619 from Niral-Networks/niral_isis_debug_p2Donald Sharp2020-06-251-9/+9
|\ | | | | ISIS VRF: ISIS Debug structure modifications Type 2
| * ISIS VRF: ISIS Debug structure modificationsharios2020-06-241-9/+9
| | | | | | | | | | | | 1. The "isis->debug" variable dependency on debug logs print is removed. Signed-off-by: harios <hari@niralnetworks.com>
* | isisd: Add Segment Routing Local Block supportOlivier Dugeon2020-06-231-0/+9
|/ | | | | | | | | | | Segment Routing Local Block (SRLB) is part of RFC8667. This change introduces the possibility for isisd to advertize SRLB in LSP. Base and Range of SRLB could be configured through CLI or Yang. Adjacency-SID are now using this SRLB for label allocation. SRLB could also be used for SID-Binding (e.g. LDP to SR). Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: add support for segment routingRenato Westphal2020-04-301-6/+60
| | | | | | | | | | | | | | | | | | | | | | This is an implementation of the IS-IS SR draft [1] for FRR. The following features are supported: * IPv4 and IPv6 Prefix-SIDs; * IPv4 and IPv6 Adj-SIDs and LAN-Adj-SIDs; * Index and absolute labels; * The no-php and explicit-null Prefix-SID flags; * Full integration with the Label Manager. Known limitations: * No support for Anycast-SIDs; * No support for the SID/Label Binding TLV (required for LDP interop). * No support for persistent Adj-SIDs; * No support for multiple SRGBs. [1] draft-ietf-isis-segment-routing-extensions-25 Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* bgpd, isis, tools: style fixenQuentin Young2020-04-211-4/+2
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: sprintf -> snprintfQuentin Young2020-04-211-4/+6
| | | | | | | | | | | | | Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: split northbound callbacks into multiple filesRenato Westphal2019-10-301-0/+1
| | | | | | | | | | | | | | | | | Rearrange the isisd northbound callbacks as following: * isis_nb.h: prototypes of all northbound callbacks. * isis_nb.c: definition of all northbound callbacks and their associated YANG data paths. * isis_nb_config.c: implementation of YANG configuration nodes. * isis_nb_state.c: implementation of YANG state nodes. * isis_nb_notifications.c: implementation of YANG notifications. This should help to keep to code more organized and easier to maintain. No behavior changes intended. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* isisd: Update TLVs processing for TE, RI & SROlivier Dugeon2019-09-171-61/+22
| | | | | | | | | | | | | | | | | | | | | In preparation to Segment Routing: - Update the management of Traffic Engineering subTLVs to the new tlvs parser - Add Router Capability TLV 242 as per RFC 4971 & 7981 - Add Segment Routing subTLVs as per draft-isis-segment-routing-extension-25 Modified files: - isis_tlvs.h: add new structure to manage TE subTLVs, TLV 242 & SR subTLVs - isis_tlvs.c: add new functions (pack, copy, free, unpack & print) to process TE subTLVs, Router Capability TLV and SR subTLVs - isis_circuit.[c,h] & isis_lsp.[c,h]: update to new subTLVs & TLV processing - isis_te.[c,h]: remove all old TE structures and managment functions, and add hook call to set local and remote IP addresses as wellas update TE parameters - isis_zebra.[c,h]: add hook call when new interface is up - isis_mt.[c,h], isis_pdu.c & isis_northbound.c: adjust to new TE subTLVs - tests/isisd/test_fuzz_isis_tlv_tests.h.gz: adapte fuuz tests to new parser Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* *: rename new ForEach macros from the typesafe APIRenato Westphal2019-05-211-4/+4
| | | | | | | | | This is necessary to avoid a name collision with std::for_each from C++. Fixes the compilation of the gRPC northbound module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #3045 from opensourcerouting/atomsLou Berger2019-04-301-171/+126
|\ | | | | READY: lists/skiplists/rb-trees new API & sequence lock & atomic lists
| * isisd: replace dict_* with DECLARE_RBTREEDavid Lamparter2019-04-271-171/+126
| | | | | | | | | | | | | | | | Historically, isisd has been carrying around its own red-black tree to manage its LSP DB in. This replaces that with the newly-added DECLARE_RBTREE_*. This allows completely removing the dict_* code. Signed-off-by: David Lamparter <equinox@diac24.net>
* | isisd: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Solve issue #4032 - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te from global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* | Revert "isisd: Add IS-IS-TE support per Area"Russ White2019-04-231-2/+2
| |
* | Issue #4032: Add IS-IS-TE support per AreaOlivier Dugeon2019-04-151-2/+2
|/ | | | | | | | | | | - Change MPLS-TE from global to per Area - Add new mpls_te_area structure to area in replacement of global variable isisMPLS_TE - Move mpls-te frmo global to instance in frr-isisd.yang - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c, isis_lsp.c and isis_zebra.c accordingly Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* isisd: skip over deleted fragmentsDavid Lamparter2019-02-181-0/+21
| | | | | | | | | Since LSP fragments are also on our lspdb dict, lsp_tick() needs to skip over them after calling lsp_destroy(). Otherwise it ends up accessing free'd memory. Fixes: #3533 Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: implement the 'lsp-generation' notificationEmanuele Di Pascale2018-12-181-0/+6
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: implement the 'attempt-to-exceed-max-sequence' notificationEmanuele Di Pascale2018-12-181-0/+9
| | | | Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* isisd: Provide statistics over number of generated purgesChristian Franke2018-12-071-0/+2
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Provide statistics over number of LSP regenerationsChristian Franke2018-12-071-0/+2
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: Add `show openfabric flooding` commandChristian Franke2018-12-071-1/+3
| | | | | | Add a command to show to what neighbors an LSP has been flooded. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Make lspid_print non-staticChristian Franke2018-12-071-4/+4
| | | | | | | `lspid_print` is useful in other places, so make it available in `isis_lsp.h`. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Provide better flooding debuggingChristian Franke2018-12-071-1/+10
| | | | | | Show from where LSP flooding is triggered. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Always consider purges as newerChristian Franke2018-11-151-1/+2
| | | | | | | | | | | When receiving an LSP with same sequence number but different checksum as in the local database, we would always treat it as newer than the local LSP. That behavior is incorrect if the local LSP is indeed a purged LSP waiting for age-out and the received one is not. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* Merge pull request #3303 from ↵Olivier Dugeon2018-11-121-1/+12
|\ | | | | | | | | opensourcerouting/bugfix/isis-fragment-retransmission isisd: Fix issues with purged fragments
| * isisd: Fix issues with purged fragmentsChristian Franke2018-11-101-1/+12
| | | | | | | | | | | | | | Purged fragments would always be reoriginated by isisd. They should only be purged once and never be reoriginated. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #3305 from opensourcerouting/bugfix/isis-lsp-aggregate-timeDonald Sharp2018-11-121-1/+1
|\ \ | | | | | | isisd: Adjust duration until lsp is regenerated
| * | isisd: Adjust duration until lsp is regeneratedChristian Franke2018-11-091-1/+1
| |/ | | | | | | | | | | | | It turns out 50ms is actually too short to aggregate all changes in some cases, so allow for 100ms. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #3304 from opensourcerouting/bugfix/openfabric-floodingDonald Sharp2018-11-121-5/+5
|\ \ | | | | | | fabricd: never flood back through the incoming interface
| * | fabricd: never flood back through the incoming interfaceChristian Franke2018-11-101-5/+5
| |/ | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* / isisd: Fix lsp_build_list_nonzero_htChristian Franke2018-11-101-20/+8
|/ | | | | | | When `first` would be initialized to the same value as `last`, the function would return incorrect results. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: delay lsp regeneration while events are still coming inChristian Franke2018-10-241-2/+15
| | | | | | | | | | | | | | | When there is a stream of events coming in, where IS-IS learns about a lot of updates, IS-IS would regenerate its LSPs before the updates have been processed completely. This causes suboptimal convergence because the intermediate state will be flooded. Only after the configured `lsp_gen_interval`, a new update with the correct and final state will be generated. Resolve this by holding off LSP generation while there are still events coming in. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Combine lsp_l1/l2_refreshChristian Franke2018-10-241-49/+23
| | | | | | | | lsp_l1_refresh and lsp_l2_refresh are identical apart from the hardcoded IS-IS level they are referring to. So merge them and pass the level as part of the argument. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Log LSP-update trigger sourceChristian Franke2018-10-241-3/+7
| | | | | | | | For debugging the timing of LSP generation, it is useful to know which event caused a regeneration to be scheduled. Therefore, add this information to the debug log. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: adjust lsp size to area->lsp_size before packingChristian Franke2018-10-161-2/+15
| | | | | | | IS-IS would ignore any area lsp-mtu setting configured after initial creation of the LSP since move to the new tlv serialized/deserializer. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Unlink LSP fragments from LSP0 on lsp_destroyChristian Franke2018-10-161-7/+13
| | | | | | | isisd would crash when lsp fragments aged out, since they got freed correctly, but were not removed from LSP0's linked list of fragments. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: Replace isis_event_adjacency_state_change with a hookChristian Franke2018-10-051-0/+12
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: null check (Coverity 1424529)F. Aragon2018-10-031-0/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* *: list_delete_and_null() -> list_delete()David Lamparter2018-10-021-3/+3
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd: null check (Coverity 1473285)F. Aragon2018-09-201-1/+1
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* *: style for EC replacementsQuentin Young2018-09-131-4/+4
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: LIB_[ERR|WARN] -> EC_LIBQuentin Young2018-09-131-3/+3
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: add purge originator identification supportChristian Franke2018-09-051-16/+32
| | | | | | | Implement RFC 6232, optionally allowing to flood isisd's NET and hostname in purges it originates. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: implement flooding optimizationChristian Franke2018-09-051-3/+7
| | | | | | | | | | Regular IS-IS will flood any LSP updates out to all circuits except the one where it was received on. This is done in `lsp_flood`. Change `lsp_flood` for fabricd to use the optimized flooding algorithm instead. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: reimplement LSP transmission logicChristian Franke2018-09-051-65/+34
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, isisd/fabricd maintained a bitfield for each LSP to track the SRM bit for each circuit, which specifies whether an LSP needs to be sent on that circuit. Every second, it would scan over all LSPs in `lsp_tick` and queue them up for transmission accordingly. This design has two drawbacks: a) it scales poorly b) it adds unacceptable latency to the update process: each router takes a random amount of time between 0 and 1 seconds to forward an update. In a network with a diamter of 10, it might already take 10 seconds for an update to traverse the network. To mitigate this, a new design was chosen. Instead of tracking SRM in a bitfield, have one tx_queue per circuit and declare that an LSP is in that queue if and only if it would have SRM set for that circuit. This way, we can track SRM similarly as we did before, however, on insertion into the LSP queue, we can add a timer for (re)transmission, alleviating the need for a periodic scan with LSP tick and reducing the latency for forwarding of updates. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* fabricd: implement asymmetric metric for tier 0 as per Section 6.2Christian Franke2018-09-051-2/+9
| | | | | | | | To avoid passing of traffic via leaf nodes in the fabric, OpenFabric specifies that all links towards tier 0 nodes should be advertised with a very high metric. Signed-off-by: Christian Franke <chris@opensourcerouting.org>