| Age | Commit message (Collapse) | Author |
|
After the change:
```
$ grep on-rib-process /etc/frr/frr.conf
zebra on-rib-process script script4
$ systemctl restart frr
$ vtysh -c 'show run' | grep on-rib-process
zebra on-rib-process script script4
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 1fe1f8d87c4ab46ae18536a2418c05ae5fd95185)
|
|
This reverts commit 0e3c5e8e5907321b35201f0985c1d3f4a1b0e639.
(cherry picked from commit 6a36b9ef49bfce59a7e674df233265da6d275257)
|
|
They are managed under `frr-route-map`, not under `frr-bgp-route-map`.
Fixes: https://github.com/FRRouting/frr/issues/17055
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit b9a9be492e8dde39a0040bd1140893ccab83c2be)
|
|
LabNConsulting/chopps/load-internal-ietf-yang-library
lib: add flag to have libyang load internal ietf-yang-library module
|
|
Mgmtd makes use of libyang's internal ietf-yang-library module to add
support for said module to FRR management. Previously, mgmtd was loading
this module explicitly; however, that required that libyang's
`ietf-yang-library.yang` module definition file be co-located with FRR's
yang files so that it (and ietf-datastore.yang) would be found when
searched for by libyang using FRRs search path. This isn't always the
case depending on how the user compiles and installs libyang so mgmtd
was failing to run in some cases.
Instead of doing it the above way we simply tell libyang to load it's
internal version of ietf-yang-library when we initialize the libyang
context.
This required adding a boolean to a couple of the init functions which
is why so many files are touched (although all the changes are minimal).
Signed-off-by: Christian Hopps <chopps@labn.net>
|
|
Signed-off-by: Donna Sharp <dksharp5@gmail.com>
|
|
Remove unused bfd defines
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
|
|
It's possible to specify via the cli and configure how many
nexthops that are allowed on the system. If you happen to
have > 255 then things are about to get interesting otherwise.
Let's allow up to 65k nexthops (ha!)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
Fix the following compiler warning:
```
lib/elf_py.c: In function _elffile_load_:
lib/elf_py.c:1310:34: warning: _calloc_ sizes specified with _sizeof_ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
1310 | w->sects = calloc(sizeof(PyObject *), w->ehdr->e_shnum);
| ^~~~~~~~
lib/elf_py.c:1310:34: note: earlier argument should specify number of elements, later size of each element
```
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
|
lib: Help text correction
|
|
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
No-one is using this, remove
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
We can't use even `string()` function because built-in functions are not
loaded.
Testing with:
```
$ cat /etc/frr/scripts/zebra.lua
function on_rib_process_dplane_results(ctx)
log.warn(string.upper("testas"))
return {}
end
```
This results to "TESTAS" in the logs.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
|
lib: Attach stdout to child only if --log=stdout and stdout FD is a tty
|
|
Signed-off-by: Christian Hopps <chopps@labn.net>
|
|
- This is used for various return values in RESTCONF
Signed-off-by: Christian Hopps <chopps@labn.net>
|
|
- Now if positive it's libyang LY_ERR, otherwise it's `-errno` value.
Signed-off-by: Christian Hopps <chopps@labn.net>
|
|
Signed-off-by: Christian Hopps <chopps@labn.net>
ang
|
|
Include SID structure information in seg6local nexthop data structure.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
|
|
Prior to this commit stdout of a process started in a daemon mode was
attached to a calling process.
As a result a calling process hung for infinity.
Signed-off-by: Vladislav Odintsov <vlodintsov@k2.cloud>
|
|
zebra: add LSP entry to nexthop via recursive (part 2)
|
|
Also, cleanup some unreachable code in `nb_op_sib_next()`.
Signed-off-by: Christian Hopps <chopps@labn.net>
|
|
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>
|
|
*: simplify frrlib debug
|
|
lib: Memory spike reduction for sh cmds at scale
|
|
Very handy for debugging.
In Lua script just use "log.trace(table)":
```
function on_rib_process_dplane_results(ctx)
log.trace(ctx.rinfo.zd_ng)
end
```
You will get something like:
```
Aug 28 17:04:36 donatas-laptop zebra[3782199]: [GCZ7N-MM9D9] {
1: {
type: 2
weight: 1
flags: 5
backup_idx: 0
vrf_id: 0
nh_encap_type: 0
gate: {
value: 5.87967e+08
string: "192.168.11.35"
}
nh_label_type: 0
srte_color: 0
ifindex: 0
backup_num: 0
}
2: {
type: 3
weight: 1
flags: 3
backup_idx: 0
vrf_id: 0
nh_encap_type: 0
nh_label_type: 0
srte_color: 0
ifindex: 4
backup_num: 0
}
}
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
|
Lua technically enumerates arrays from 1, not 0.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
|
The output buffer vty->obuf is a linked list where
each element is of 4KB.
Currently, when a huge sh command like <show ip route json>
is executed on a large scale, all the vty_outs are
processed and the entire data is accumulated.
After the entire vty execution, vtysh_flush proceeses
and puts this data in the socket (131KB at a time).
Problem here is the memory spike for such heavy duty
show commands.
The fix here is to chunkify the output on VTY shell by
flushing it intermediately for every 128 KB of output
accumulated and free the memory allocated for the buffer data.
This way, we achieve ~25-30% reduction in the memory spike.
Fixes: #16498
Note: This is a continuation of MR #16498
Signed-off-by: Srujana <skanchisamud@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
|
|
Implement common code for debug status output and remove daemon-specific
code that is duplicated everywhere.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|
Implement common code for debug config output and remove daemon-specific
code that is duplicated everywhere.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|
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>
|
|
Reduce the number of Singleton objects when using weight for NHG's
|
|
config: fix missing case when reporting version 'configured with'
|
|
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
|
|
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
Currently nexthop weight is a discriminator on whether or not
a nexthop matches. There is a need to no use the weight as
part of this comparison function so let's add a boolean to
allow us to say use this or not.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
mgmtd: fix a couple compilation warnings.
|
|
Don't store unnecessary `len` returned by snprintf and snprintfrr function.
Fixes the following compilation warnings:
```
error 15-Aug-2024 13:54:10 In file included from lib/bfd.c:16:
error 15-Aug-2024 13:54:10 In file included from ./lib/zclient.h:22:
error 15-Aug-2024 13:54:10 In file included from ./lib/nexthop.h:14:
error 15-Aug-2024 13:54:10 ./lib/srv6.h:338:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
error 15-Aug-2024 13:54:10 len += snprintf(str + len, size - len, " USP");
error 15-Aug-2024 13:54:10 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error 15-Aug-2024 13:54:10 ./lib/srv6.h:343:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
error 15-Aug-2024 13:54:10 len += snprintfrr(str + len, size - len, " nh6 %pI6", &ctx->nh6);
error 15-Aug-2024 13:54:10 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error 15-Aug-2024 13:54:10 ./lib/srv6.h:347:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
error 15-Aug-2024 13:54:10 len += snprintfrr(str + len, size - len, " nh4 %pI4", &ctx->nh4);
error 15-Aug-2024 13:54:10 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error 15-Aug-2024 13:54:10 ./lib/srv6.h:354:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
error 15-Aug-2024 13:54:10 len += snprintf(str + len, size - len, " vrf_id %u",
error 15-Aug-2024 13:54:10 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error 15-Aug-2024 13:54:10 ./lib/srv6.h:367:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
error 15-Aug-2024 13:54:10 len += snprintf(str + len, size - len, " unknown(%s)", __func__);
error 15-Aug-2024 13:54:10 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
|
|
Also an empty (thus non-replace) notify selectors message shouldn't
clear the selectors, it should just do nothing.
Signed-off-by: Christian Hopps <chopps@labn.net>
|
|
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
The events list is storing a `struct event *` allocated
as a MTYPE_TMP pointer, on shutdown ensure that it is
properly free'd up.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
|
lib: Don't print warning if not a daemon
|
|
lib: fix distribute-list deletion
|
|
Fix LYD_NEW_PATH_OUTPUT issue to support libyang v3.x
|
|
Fix the LYD_NEW_PATH_OUTPUT undeclared error to support the latest libyang v3.x version,
and also compatible with old version.
Signed-off-by: Lu Mao <lu.mao@molex.com>
|
|
When a whole distribute-list is deleted (can be done only using API),
all its children must be cleaned up manually.
Fixes #16538
Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
|
|
Tests memory shut
|
|
lib: add seg6localContext json attribute in nexthop information
|
|
vtysh will print out the `stupidly large FD limit` upon
every run of the program if the ulimit is set stupidly
large. Prevent this from being displayed for vtysh.
Fixes: #16516
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|