]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agoMerge pull request #9824 from idryzhov/nb-cli-const-lyd-node
Donald Sharp [Mon, 25 Oct 2021 11:55:39 +0000 (07:55 -0400)]
Merge pull request #9824 from idryzhov/nb-cli-const-lyd-node

lib: northbound cli show/cmd functions must not modify data nodes

3 years agoMerge pull request #9877 from opensourcerouting/ospf_gr_topo1-fix
Donald Sharp [Mon, 25 Oct 2021 11:00:19 +0000 (07:00 -0400)]
Merge pull request #9877 from opensourcerouting/ospf_gr_topo1-fix

tests: Fix frequent failure of ospf_gr_topo1 on slower systems

3 years agotests: Fix frequent failure of ospf_gr_topo1 on slower systems
Martin Winter [Sun, 24 Oct 2021 22:53:49 +0000 (00:53 +0200)]
tests: Fix frequent failure of ospf_gr_topo1 on slower systems

Test doesn't wait long enough when it checks the routers after
restart. On slower systems, it frequently failed as it ran out
of time

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #9670 from LabNConsulting/chopps/fix-valgrind-fail-check
Donald Sharp [Sun, 24 Oct 2021 12:30:29 +0000 (08:30 -0400)]
Merge pull request #9670 from LabNConsulting/chopps/fix-valgrind-fail-check

Chopps/fix valgrind fail check

3 years agoMerge pull request #9874 from donaldsharp/micro_scale_fixes
Martin Winter [Sat, 23 Oct 2021 16:08:36 +0000 (18:08 +0200)]
Merge pull request #9874 from donaldsharp/micro_scale_fixes

Micro scale fixes

3 years agoMerge pull request #9742 from elimbaum/add-vlan-actions
Jafar Al-Gharaibeh [Sat, 23 Oct 2021 05:06:16 +0000 (00:06 -0500)]
Merge pull request #9742 from elimbaum/add-vlan-actions

pbrd: add vlan actions to vty

3 years agotests: bfd_isis_topo1 expects unreasonable convergence times under load
Donald Sharp [Fri, 22 Oct 2021 19:27:50 +0000 (15:27 -0400)]
tests: bfd_isis_topo1 expects unreasonable convergence times under load

When our ci test system is under high load, expecting bfd to converge
in under 2 seconds is not going to happen.  Modify the test suites
to just ensure that things converge.  If we need actual functional
testing of bfd response times the topotests are not an appropriate place
to do this or we need to modify the test system to gather the data for
how long it takes after the tests are run.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Fix bgp_ecmp_topo3 to look for a bit more state
Donald Sharp [Fri, 22 Oct 2021 18:20:16 +0000 (14:20 -0400)]
tests: Fix bgp_ecmp_topo3 to look for a bit more state

During a local CI run, bgp_ecmp_topo3 was failing
to properly notice the fast-convergence command
issued before the interface is shut down.  As
such there exists a race condition where under
high load the zebra process can actually shut
an interface down before we have properly ensured
that fast convergence is on for ibgp.

Modify the test for in two ways:

1) Ensure that previous section makes sure
that we have properly converged for when we
bring back up the interfaces instead of
assuming that we have done so.

2) After issuing the fast-convergence command.
Ensure that bgp has fully processed it and is
ready to receive the interface down events
as triggers for shutting down the ibgp session.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Make test_ldp_topo1.py aware of how many neighbors it needs
Donald Sharp [Fri, 22 Oct 2021 18:18:33 +0000 (14:18 -0400)]
tests: Make test_ldp_topo1.py aware of how many neighbors it needs

On a local CI run.  The test_ldp_topo1.py showed fail to converge
on r3.  r3 has 2 neighbors but only 1 was up when we got to
further steps in the test suites.

Modify the neighbor checking to `know` how many neighbors
should be operational and continue looking for them until
they are up and running.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: fix --valgrind-memleaks option
Christian Hopps [Tue, 21 Sep 2021 00:39:09 +0000 (20:39 -0400)]
tests: fix --valgrind-memleaks option

Previously, when a valgrind memleak was discovered, would cause a
catastrophic pytest failure. Now correctly fails the current pytest as
intended.

As a result of this fix --valgrind-memleaks now works in distributed
pytest mode as well.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: revert default enable of memleak tests
Christian Hopps [Sun, 26 Sep 2021 05:52:11 +0000 (01:52 -0400)]
tests: revert default enable of memleak tests

Revert the accidental enabling of the optional memleak tests that came
with the large micronet changeset.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: fix missing space in --valgrind-extra option
Christian Hopps [Sun, 26 Sep 2021 05:51:53 +0000 (01:51 -0400)]
tests: fix missing space in --valgrind-extra option

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9378 from AnuradhaKaruppiah/evpn-mh-cleanup
Sri Mohana Singamsetty [Fri, 22 Oct 2021 16:26:06 +0000 (09:26 -0700)]
Merge pull request #9378 from AnuradhaKaruppiah/evpn-mh-cleanup

evpn-mh: fixes for sync-MAC-IP handling on ES bond del/add

3 years agoMerge pull request #9860 from pguibert6WIND/nhrp_align_privs
Mark Stapp [Fri, 22 Oct 2021 14:19:34 +0000 (10:19 -0400)]
Merge pull request #9860 from pguibert6WIND/nhrp_align_privs

nhrpd: align nhrp privs with definition from others

3 years agoMerge pull request #9765 from idryzhov/lib-bool-thread-add
Mark Stapp [Fri, 22 Oct 2021 13:59:54 +0000 (09:59 -0400)]
Merge pull request #9765 from idryzhov/lib-bool-thread-add

lib: change thread_add_* API

3 years agoMerge pull request #9866 from ewlumpkin/comment_spelling_fixes
Donald Sharp [Fri, 22 Oct 2021 13:38:44 +0000 (09:38 -0400)]
Merge pull request #9866 from ewlumpkin/comment_spelling_fixes

lib: finish fixing spelling in lib files

3 years agolib: finish fixing spelling in lib files
ewlumpkin [Fri, 22 Oct 2021 02:56:56 +0000 (02:56 +0000)]
lib: finish fixing spelling in lib files

Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
3 years agonhrpd: align nhrp privs with definition from others
Philippe Guibert [Tue, 10 Dec 2019 09:54:27 +0000 (10:54 +0100)]
nhrpd: align nhrp privs with definition from others

nhrp_privs global context is aligned with other daemon contexts

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #9843 from opensourcerouting/vtysh-startup-cost
Donald Sharp [Wed, 20 Oct 2021 22:52:00 +0000 (18:52 -0400)]
Merge pull request #9843 from opensourcerouting/vtysh-startup-cost

vtysh: improve startup time by ca. ×6

3 years agoMerge pull request #9783 from mjstapp/fix_bgp_lu_lsp
Russ White [Wed, 20 Oct 2021 22:22:01 +0000 (18:22 -0400)]
Merge pull request #9783 from mjstapp/fix_bgp_lu_lsp

bgpd, tests: BGP-labeled-unicast advertise implicit-null in more cases

3 years agoMerge pull request #9856 from donaldsharp/always_true
Igor Ryzhov [Wed, 20 Oct 2021 20:16:58 +0000 (23:16 +0300)]
Merge pull request #9856 from donaldsharp/always_true

zebra: Fix code paths that always resolve to true

3 years agoMerge pull request #9855 from donaldsharp/ospf_fini
David Lamparter [Wed, 20 Oct 2021 17:19:43 +0000 (19:19 +0200)]
Merge pull request #9855 from donaldsharp/ospf_fini

3 years agolib: change thread_add_* API
Igor Ryzhov [Wed, 6 Oct 2021 19:06:23 +0000 (22:06 +0300)]
lib: change thread_add_* API

Do not return pointer to the newly created thread from various thread_add
functions. This should prevent developers from storing a thread pointer
into some variable without letting the lib know that the pointer is
stored. When the lib doesn't know that the pointer is stored, it doesn't
prevent rescheduling and it can lead to hard to find bugs. If someone
wants to store the pointer, they should pass a double pointer as the last
argument.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9811 from donaldsharp/rib_update_fix
Igor Ryzhov [Wed, 20 Oct 2021 16:44:45 +0000 (19:44 +0300)]
Merge pull request #9811 from donaldsharp/rib_update_fix

Various thread functional fixes

3 years agoMerge pull request #9847 from ton31337/feature/prefix-list_autocomplete
Igor Ryzhov [Wed, 20 Oct 2021 15:45:07 +0000 (18:45 +0300)]
Merge pull request #9847 from ton31337/feature/prefix-list_autocomplete

bgpd: Add autocomplete for set/match community/large/ext lists

3 years agozebra: Fix code paths that always resolve to true
Donald Sharp [Wed, 20 Oct 2021 14:15:41 +0000 (10:15 -0400)]
zebra: Fix code paths that always resolve to true

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: modify rib_update to be a bit smarter about malloc
Donald Sharp [Tue, 12 Oct 2021 17:23:40 +0000 (13:23 -0400)]
zebra: modify rib_update to be a bit smarter about malloc

rib_update() was mallocing memory then attempting to schedule
and if the schedule failed( it was already going to be run )
FRR would then free the memory.  Fix this memory usage pattern

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Add a thread_is_scheduled function
Donald Sharp [Tue, 12 Oct 2021 17:22:54 +0000 (13:22 -0400)]
lib: Add a thread_is_scheduled function

The function thread_is_scheduled allows us to know if
the particular thread is scheduled for execution or not.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9766 from opensourcerouting/typesafe-member-nhrp-zap
Mark Stapp [Wed, 20 Oct 2021 12:13:17 +0000 (08:13 -0400)]
Merge pull request #9766 from opensourcerouting/typesafe-member-nhrp-zap

lib: add typesafe membership-test functions

3 years agotests: When heavily loaded do not send SIGBUS so fast
Donald Sharp [Wed, 20 Oct 2021 12:02:10 +0000 (08:02 -0400)]
tests: When heavily loaded do not send SIGBUS so fast

Our topotests send SIGBUS 2 seconds after a SIGTERM is
initiated.  This is bad because under a heavily loaded
topotest system we may have a case where the system has
not had a chance to properly shut down the daemon.
Extend the time greatly before topotests send SIGBUS.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopathd: Call frr_fini() before exit
Donald Sharp [Wed, 20 Oct 2021 12:00:57 +0000 (08:00 -0400)]
pathd: Call frr_fini() before exit

pathd was never calling frr_fini and as such the
proper shutdown was not happening for libfrr.
This includes logging.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Close log files before exiting
Donald Sharp [Wed, 20 Oct 2021 12:00:02 +0000 (08:00 -0400)]
ospfd: Close log files before exiting

When doing a normal exit from ospf we should close
the log file as that we are leaving a bunch of
unterminated logging processes by not doing so.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Add autocomplete for community/large/extcommunity stuff
Donatas Abraitis [Tue, 19 Oct 2021 12:14:19 +0000 (15:14 +0300)]
bgpd: Add autocomplete for community/large/extcommunity stuff

```
exit1-debian-9(config)# route-map test1 permit 10
exit1-debian-9(config-route-map)# match community ?
  (1-99)               Community-list number (standard)
  (100-500)            Community-list number (expanded)
  COMMUNITY_LIST_NAME  Community-list name
     testas
exit1-debian-9(config-route-map)# match large-community ?
  (1-99)                Large Community-list number (standard)
  (100-500)             Large Community-list number (expanded)
  LCOMMUNITY_LIST_NAME  Large Community-list name
     LCL-ORIGINATED-ALL
exit1-debian-9(config-route-map)#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9848 from ton31337/feature/as-path_autocomplete
Russ White [Tue, 19 Oct 2021 23:18:28 +0000 (19:18 -0400)]
Merge pull request #9848 from ton31337/feature/as-path_autocomplete

bgpd: Add autocomplete for as-path filters

3 years agoMerge pull request #9839 from donaldsharp/test_ospf_summarization
Russ White [Tue, 19 Oct 2021 23:17:35 +0000 (19:17 -0400)]
Merge pull request #9839 from donaldsharp/test_ospf_summarization

Test ospf summarization

3 years agoMerge pull request #9656 from chiragshah6/mdev
Russ White [Tue, 19 Oct 2021 23:16:14 +0000 (19:16 -0400)]
Merge pull request #9656 from chiragshah6/mdev

zebra: add resolver flag for nexthop in json

3 years agoMerge pull request #9752 from opensourcerouting/ospf6d-nssa-ranges
Russ White [Tue, 19 Oct 2021 23:15:40 +0000 (19:15 -0400)]
Merge pull request #9752 from opensourcerouting/ospf6d-nssa-ranges

ospf6d: add support for NSSA Type-7 address ranges

3 years agoMerge pull request #9818 from idryzhov/lib-if-fixes
Mark Stapp [Tue, 19 Oct 2021 20:46:58 +0000 (16:46 -0400)]
Merge pull request #9818 from idryzhov/lib-if-fixes

lib: allow to create interfaces in non-existing VRFs

3 years agobgpd: Add autocomplete for filter-list
Donatas Abraitis [Tue, 19 Oct 2021 15:02:36 +0000 (18:02 +0300)]
bgpd: Add autocomplete for filter-list

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotools: remove Linux kernel bits from checkpatch
David Lamparter [Tue, 12 Oct 2021 22:01:43 +0000 (00:01 +0200)]
tools: remove Linux kernel bits from checkpatch

These aren't appropriate for use in FRR.  Among other things, this
enables running checkpatch by calling it in a git working tree with
`tools/checkpatch.pl -g origin/master..`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agotools: add iterators to checkpatch
David Lamparter [Tue, 12 Oct 2021 22:00:03 +0000 (00:00 +0200)]
tools: add iterators to checkpatch

For the purpose of allowing the space in `frr_each (`, copy the list of
iterators from .clang-format and wire it up appropriately.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobuild: add tests missed in .gitignore
David Lamparter [Wed, 29 Sep 2021 21:37:10 +0000 (23:37 +0200)]
build: add tests missed in .gitignore

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agonhrpd: drop list.h
David Lamparter [Sat, 27 Mar 2021 21:47:28 +0000 (22:47 +0100)]
nhrpd: drop list.h

`number_of_linked_lists_in_frr--;`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agonhrpd: convert zbuf queue to DLIST
David Lamparter [Sat, 27 Mar 2021 21:46:33 +0000 (22:46 +0100)]
nhrpd: convert zbuf queue to DLIST

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agonhrpd: convert SA list to DLIST
David Lamparter [Sat, 27 Mar 2021 21:41:44 +0000 (22:41 +0100)]
nhrpd: convert SA list to DLIST

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agonhrpd: convert reg list to DLIST
David Lamparter [Sat, 27 Mar 2021 21:37:25 +0000 (22:37 +0100)]
nhrpd: convert reg list to DLIST

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agonhrpd: convert mcast list to DLIST
David Lamparter [Wed, 29 Sep 2021 21:16:17 +0000 (23:16 +0200)]
nhrpd: convert mcast list to DLIST

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agonhrpd: convert nhs list to DLIST
David Lamparter [Sat, 27 Mar 2021 21:30:51 +0000 (22:30 +0100)]
nhrpd: convert nhs list to DLIST

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agonhrpd: convert notifier list to DLIST
David Lamparter [Sat, 27 Mar 2021 21:20:10 +0000 (22:20 +0100)]
nhrpd: convert notifier list to DLIST

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc/developer: add _member and _anywhere
David Lamparter [Wed, 29 Sep 2021 20:39:59 +0000 (22:39 +0200)]
doc/developer: add _member and _anywhere

New members in the typesafe.h API club.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: add unsorted typesafe_anywhere()
David Lamparter [Wed, 29 Sep 2021 17:59:27 +0000 (19:59 +0200)]
lib: add unsorted typesafe_anywhere()

*_anywhere(item) returns whether an item is on _any_ container.  Only
available for unsorted containers for now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: use sentinel for single-linked lists
David Lamparter [Wed, 29 Sep 2021 20:15:11 +0000 (22:15 +0200)]
lib: use sentinel for single-linked lists

Using a non-NULL sentinel allows distinguishing between "end of list"
and "item not on any list".  It's a compare either way, just the value
is different.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: typesafe *_member()
David Lamparter [Sat, 27 Mar 2021 21:05:07 +0000 (22:05 +0100)]
lib: typesafe *_member()

This provides a "is this item on this list" check, which may or may not
be faster than using *_find() for the same purpose.  (If the container
has no faster way of doing it, it falls back to using *_find().)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: null out deleted pointers in typesafe containers
David Lamparter [Wed, 29 Sep 2021 18:45:34 +0000 (20:45 +0200)]
lib: null out deleted pointers in typesafe containers

Some of the typesafe containers didn't null out their innards of items
after an item was deleted or popped off the container.  This is both a
bit unsafe as well as hinders the upcoming _member() from working
efficiently.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agotests: fix leak in test code
David Lamparter [Wed, 29 Sep 2021 20:13:01 +0000 (22:13 +0200)]
tests: fix leak in test code

Even if it doesn't matter for an unit test in general, it hides actual
leaks in the code being tested.  Fix so any leaks will be actual bugs.
(Currently there aren't any, yay.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobgpd: Add autocomplete for as-path filters
Donatas Abraitis [Tue, 19 Oct 2021 12:31:39 +0000 (15:31 +0300)]
bgpd: Add autocomplete for as-path filters

```
exit1-debian-9# show bgp as-path-access-list
  <cr>
  AS_PATH_FILTER_NAME  AS path access list name
     acl1 acl2
  json                 JavaScript Object Notation
exit1-debian-9(config)# route-map testas permit 10
exit1-debian-9(config-route-map)# match as-path ?
  AS_PATH_FILTER_NAME  AS path access-list name
     acl1 acl2
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agolib: allow to create interfaces in non-existing VRFs
Igor Ryzhov [Wed, 13 Oct 2021 12:06:38 +0000 (15:06 +0300)]
lib: allow to create interfaces in non-existing VRFs

It allows FRR to read the interface config even when the necessary VRFs
are not yet created and interfaces are in "wrong" VRFs. Currently, such
config is rejected.

For VRF-lite backend, we don't care at all about the VRF of the inactive
interface. When the interface is created in the OS and becomes active,
we always use its actual VRF instead of the configured one. So there's
no need to reject the config.

For netns backend, we may have multiple interfaces with the same name in
different VRFs. So we care about the VRF of inactive interfaces. And we
must allow to preconfigure the interface in a VRF even before it is
moved to the corresponding netns. From now on, we allow to create
multiple configs for the same interface name in different VRFs and
the necessary config is applied once the OS interface is moved to the
corresponding netns.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: keep element count in vector code
David Lamparter [Mon, 18 Oct 2021 13:29:17 +0000 (15:29 +0200)]
lib: keep element count in vector code

... to speed up vector_empty_slot() among other things.

Behavior should be 100% identical to previous.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agovtysh: defer CLI tree building
David Lamparter [Mon, 18 Oct 2021 09:51:09 +0000 (11:51 +0200)]
vtysh: defer CLI tree building

We don't need the CLI tree until we actually enter the node.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: assign CLI varnames while parsing
David Lamparter [Mon, 18 Oct 2021 12:30:01 +0000 (14:30 +0200)]
lib: assign CLI varnames while parsing

... rather than running a costly extra pass across the finished tree.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #9730 from AnuradhaKaruppiah/evpn-recv-lttng
Donatas Abraitis [Mon, 18 Oct 2021 07:17:19 +0000 (10:17 +0300)]
Merge pull request #9730 from AnuradhaKaruppiah/evpn-recv-lttng

bgp-evpn: lttng TPs for events received from zebra

3 years agoMerge pull request #9828 from idryzhov/if-lookup-optimize
Donatas Abraitis [Sat, 16 Oct 2021 08:17:57 +0000 (11:17 +0300)]
Merge pull request #9828 from idryzhov/if-lookup-optimize

lib: optimize if_lookup_by_name_all_vrf

3 years agozebra: defer local MAC dataplane install on an ES till the ES-EVI is created
Anuradha Karuppiah [Tue, 10 Aug 2021 21:31:34 +0000 (14:31 -0700)]
zebra: defer local MAC dataplane install on an ES till the ES-EVI is created

When an ES is deleted and re-added bgpd can start sending MAC-IP sync updates
before the dataplane and zebra have setup the VLAN membership for the ES. Such
MAC entries are not installed in the dataplane till the ES-EVI is created.

Ticket: #2668488

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agozebra: ignore sync updates from bgp if the dest ES is not ready
Anuradha Karuppiah [Tue, 10 Aug 2021 15:56:55 +0000 (08:56 -0700)]
zebra: ignore sync updates from bgp if the dest ES is not ready

In the window immediately after an ES deletion bgpd can send MAC-IP updates
using that ES. Zebra needs to ignore these updates to prevent creation
of stale entries.

Ticket: #2668488

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agozebra: deref the ES on interface delete even if it was not setup as a br-port
Anuradha Karuppiah [Mon, 9 Aug 2021 18:50:22 +0000 (11:50 -0700)]
zebra: deref the ES on interface delete even if it was not setup as a br-port

This addresses deletion of ES interfaces that are were not completely
configured.

Ticket: #2668488

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agotools: upstream linter is recommending double quotes
Anuradha Karuppiah [Mon, 4 Oct 2021 17:53:50 +0000 (10:53 -0700)]
tools: upstream linter is recommending double quotes

Replaced single quotes with double quotes for strings in
the frr_babeltrace.py utility.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agotools: add frr_babeltrace.py to /usr/lib/frr
Anuradha Karuppiah [Fri, 1 Oct 2021 16:52:24 +0000 (09:52 -0700)]
tools: add frr_babeltrace.py to /usr/lib/frr

Make the script available as a part of the FRR package install for
ease of use.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agobgpd: lttng tracepoint for local events received from zebra
Anuradha Karuppiah [Mon, 4 Oct 2021 16:41:43 +0000 (09:41 -0700)]
bgpd: lttng tracepoint for local events received from zebra

TPs -
=====
root@ibm-2410a1-01:mgmt:~# lttng list --userspace |grep frr_bgp:evpn.*recv
      frr_bgp:evpn_local_l3vni_del_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_local_l3vni_add_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_local_macip_del_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_local_macip_add_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_local_vni_del_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_local_vni_add_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_mh_local_es_evi_del_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_mh_local_es_evi_add_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_mh_local_es_del_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_mh_local_es_add_zrecv (loglevel: TRACE_INFO (6)) (type: tracepoint)
root@ibm-2410a1-01:mgmt:~#

Sample output -
===============
1. ES
frr_bgp:evpn_mh_local_es_add_zrecv {'esi': '03:44:38:39:ff:ff:01:00:00:01', 'vtep': '27.0.0.15', 'active': 0, 'bypass': 0, 'df_pref': 50000}
frr_bgp:evpn_mh_local_es_del_zrecv {'esi': '03:44:38:39:ff:ff:01:00:00:01'}

2. ES-EVI
frr_bgp:evpn_mh_local_es_evi_add_zrecv {'esi': '03:44:38:39:ff:ff:01:00:00:01', 'vni': 1004}
frr_bgp:evpn_mh_local_es_evi_del_zrecv {'esi': '03:44:38:39:ff:ff:01:00:00:01', 'vni': 1001}

3. L2-VNI
frr_bgp:evpn_local_vni_add_zrecv {'vni': 1004, 'vtep': '27.0.0.15', 'mc_grp': '239.1.1.104', 'vrf': 97}

4. L3-VNI
frr_bgp:evpn_local_l3vni_add_zrecv {'vni': 4001, 'vrf': 87, 'svi_rmac': '24:8a:07:cc:aa:5f', 'vrr_rmac': '24:8a:07:cc:aa:5f', 'vtep': '27.0.0.15', 'filter': 0, 'svi_ifindex': 95, 'anycast_mac': 'n'
frr_bgp:evpn_local_l3vni_del_zrecv {'vni': 4003, 'vrf': 107}

5. MAC-IP
frr_bgp:evpn_local_macip_add_zrecv {'vni': 1003, 'mac': '00:02:00:00:00:04', 'ip': 'fe80::202:ff:fe00:4', 'flags': 4, 'seq': 0, 'esi': '03:44:38:39:ff:ff:01:00:00:02'}
frr_bgp:evpn_local_macip_del_zrecv {'vni': 1000, 'mac': '00:02:00:00:00:04', 'ip': '2001:fee1::4', 'state': 1}

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agotests: Fix ospf_asbr_summary_topo1.py
Donald Sharp [Fri, 15 Oct 2021 15:43:44 +0000 (11:43 -0400)]
tests: Fix ospf_asbr_summary_topo1.py

This script is failing occassionally in our upstream topotests.
Where it was changing route-maps and attempting to see if
summarization was working correctly.  The problem was that
the code appeared to be attempting to add route-maps to
redistribution in ospf then modifying the route-maps behavior
to affect summarization as well as the metric type of that
summarization.

The problem is of course that ospf does not appear to modify
the summary routes metric-type when the components
of that summary change it's metric-type.  So the test
is testing nothing.  In addition the test had messed
up the usage of the route-map generation code and all
the generated config was in different sequence numbers
but route-map processing would never get to those
new sequence numbers because of how route-maps are processed.

Let's just remove this part of the test instead of trying
to unwind it into anything meaningfull

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Add `metric-type` to possible set operations
Donald Sharp [Fri, 15 Oct 2021 15:42:06 +0000 (11:42 -0400)]
lib: Add `metric-type` to possible set operations

Several tests used the route_map_create functionality
with `metric-type` but never bothered to add the
backend code to ensure it works correctly.
Add it in so it can be used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9813 from opensourcerouting/ospf-gr-fixes
Donald Sharp [Fri, 15 Oct 2021 13:21:40 +0000 (09:21 -0400)]
Merge pull request #9813 from opensourcerouting/ospf-gr-fixes

ospfd: more GR fixes

3 years agoMerge pull request #9836 from opensourcerouting/doc-developer-fixes
Donald Sharp [Fri, 15 Oct 2021 13:16:27 +0000 (09:16 -0400)]
Merge pull request #9836 from opensourcerouting/doc-developer-fixes

doc/developer: fix random sphinx warnings/typos/…

3 years agoMerge pull request #9826 from donaldsharp/isis_signed
Igor Ryzhov [Fri, 15 Oct 2021 09:51:04 +0000 (12:51 +0300)]
Merge pull request #9826 from donaldsharp/isis_signed

warnings that should be fixed in our compiles

3 years agoMerge pull request #9834 from idryzhov/pbr-null-deref
Donatas Abraitis [Fri, 15 Oct 2021 09:01:00 +0000 (12:01 +0300)]
Merge pull request #9834 from idryzhov/pbr-null-deref

pbrd: protect from a possible NULL dereference

3 years agoMerge pull request #9835 from idryzhov/ospf6-no-op
Donatas Abraitis [Fri, 15 Oct 2021 09:00:51 +0000 (12:00 +0300)]
Merge pull request #9835 from idryzhov/ospf6-no-op

ospf6d: remove no-op

3 years agodoc/developer: fix duplicate const prototypes
David Lamparter [Thu, 14 Oct 2021 17:19:23 +0000 (19:19 +0200)]
doc/developer: fix duplicate const prototypes

The const ones have const in the name.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc/developer: use :c:macro: where appropriate
David Lamparter [Thu, 14 Oct 2021 17:17:30 +0000 (19:17 +0200)]
doc/developer: use :c:macro: where appropriate

Sphinx tries to parse :c:function: as function prototype, which doesn't
quite work with macros.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc/developer: fix warnings in topotests doc
David Lamparter [Thu, 14 Oct 2021 17:11:02 +0000 (19:11 +0200)]
doc/developer: fix warnings in topotests doc

Sphinx warns about a few nits here, just fix.  (Note :option:`-E` can't
be used without a "option:: -E" definition, it's intended as a cross
reference.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc/developer: fix C struct references
David Lamparter [Thu, 14 Oct 2021 17:02:03 +0000 (19:02 +0200)]
doc/developer: fix C struct references

Sphinx wants `c:struct:: foo` rather than `c:type:: struct foo`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoospf6d: remove no-op
Igor Ryzhov [Thu, 14 Oct 2021 16:47:02 +0000 (19:47 +0300)]
ospf6d: remove no-op

ospf6_route_create already sets route->ospf6.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopbrd: protect from a possible NULL dereference
Igor Ryzhov [Thu, 14 Oct 2021 16:45:43 +0000 (19:45 +0300)]
pbrd: protect from a possible NULL dereference

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9817 from donaldsharp/link_type_ordering
Donatas Abraitis [Thu, 14 Oct 2021 13:25:02 +0000 (16:25 +0300)]
Merge pull request #9817 from donaldsharp/link_type_ordering

lib: Add missing enum values in switch statement for if_link_type_str

3 years agoMerge pull request #9825 from donaldsharp/one_sleep_twice_shy
Donatas Abraitis [Thu, 14 Oct 2021 12:31:23 +0000 (15:31 +0300)]
Merge pull request #9825 from donaldsharp/one_sleep_twice_shy

tests: BFD timing tests under system load need more leeway

3 years agoMerge pull request #9684 from opensourcerouting/printfrr-false-positive
Donald Sharp [Thu, 14 Oct 2021 11:34:20 +0000 (07:34 -0400)]
Merge pull request #9684 from opensourcerouting/printfrr-false-positive

*: `frr-format` with unmodified GCC

3 years agoMerge pull request #9759 from opensourcerouting/workflow-dev-tag
Donald Sharp [Thu, 14 Oct 2021 11:33:09 +0000 (07:33 -0400)]
Merge pull request #9759 from opensourcerouting/workflow-dev-tag

doc/developer: document dev tag on master

3 years agoMerge pull request #9822 from donaldsharp/ospf_testing
Renato Westphal [Thu, 14 Oct 2021 02:38:44 +0000 (23:38 -0300)]
Merge pull request #9822 from donaldsharp/ospf_testing

Ospf testing

3 years agoMerge pull request #9812 from donaldsharp/python_3_clippy_build
David Lamparter [Thu, 14 Oct 2021 00:40:38 +0000 (02:40 +0200)]
Merge pull request #9812 from donaldsharp/python_3_clippy_build

3 years agoMerge pull request #9751 from ewlumpkin/comment_spelling_fixes
Igor Ryzhov [Wed, 13 Oct 2021 23:05:44 +0000 (02:05 +0300)]
Merge pull request #9751 from ewlumpkin/comment_spelling_fixes

lib: fix spelling nits in more lib files' comments

3 years agoMerge pull request #9761 from mjstapp/fix_topo_debug_cli
Igor Ryzhov [Wed, 13 Oct 2021 22:48:41 +0000 (01:48 +0300)]
Merge pull request #9761 from mjstapp/fix_topo_debug_cli

tests: remove deprecated debug cli references

3 years agoMerge pull request #9796 from mjstapp/fix_topo_isis_vrf_cmds
Igor Ryzhov [Wed, 13 Oct 2021 22:44:03 +0000 (01:44 +0300)]
Merge pull request #9796 from mjstapp/fix_topo_isis_vrf_cmds

tests: in isis_topo1_vrf, only configure valid interfaces

3 years agoMerge pull request #9795 from opensourcerouting/ospf_get_name
Igor Ryzhov [Wed, 13 Oct 2021 22:42:29 +0000 (01:42 +0300)]
Merge pull request #9795 from opensourcerouting/ospf_get_name

ospfd: use ospf_get_name() wherever possible

3 years agoMerge pull request #9676 from donaldsharp/import_register
David Lamparter [Wed, 13 Oct 2021 20:28:03 +0000 (22:28 +0200)]
Merge pull request #9676 from donaldsharp/import_register

3 years agolib: optimize if_lookup_by_name_all_vrf
Igor Ryzhov [Wed, 13 Oct 2021 20:23:41 +0000 (23:23 +0300)]
lib: optimize if_lookup_by_name_all_vrf

We already have a VRF pointer, no need to search for it again.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9768 from ton31337/feature/catch_double_pointer_thread
Mark Stapp [Wed, 13 Oct 2021 20:19:33 +0000 (16:19 -0400)]
Merge pull request #9768 from ton31337/feature/catch_double_pointer_thread

tools: Catch double pointer of struct thread towards thread_add_*

3 years agobabeld: Prevent compiler warning about uninited value for n
Donald Sharp [Wed, 13 Oct 2021 18:34:08 +0000 (14:34 -0400)]
babeld: Prevent compiler warning about uninited value for n

the variable n, when used must have been set via the find_route_slot
but the compiler in question is probably getting confused with the
multiple levels of indention.  Just get around the whole problem
by setting n = 0 and being done with it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoisisd: Convert signed to time_t for addition
Donald Sharp [Wed, 13 Oct 2021 18:32:52 +0000 (14:32 -0400)]
isisd: Convert signed to time_t for addition

Convert a signed value to a time_t before addition
so that we can compare unsigned (time_t) to unsigned.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: BFD timing tests under system load need more leeway
Donald Sharp [Wed, 13 Oct 2021 18:12:51 +0000 (14:12 -0400)]
tests: BFD timing tests under system load need more leeway

We have this pattern in this test:

    # Let's kill the interface on rt2 and see what happens with the RIB and BFD on rt1
    tgen.gears["rt2"].link_enable("eth-rt1", enabled=False)

    # By default BFD provides a recovery time of 900ms plus jitter, so let's wait
    # initial 2 seconds to let the CI not suffer.
    topotest.sleep(2, 'Wait for BFD down notification')

    router_compare_json_output(
        "rt1", "show ip route ospf json", "step3/show_ip_route_rt2_down.ref", 1, 0
    )

Under a heavy CI load, interface down events and then reacting to them may not actually
happen within 2 seconds.  Allow some more grace time in the test to ensure that we
react to it in an appropriate manner.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9819 from donaldsharp/deprecation_python
Russ White [Wed, 13 Oct 2021 17:55:06 +0000 (13:55 -0400)]
Merge pull request #9819 from donaldsharp/deprecation_python

tests: Fix `Invalid escape sequence` warnings in test runs

3 years agolib: northbound cli show/cmd functions must not modify data nodes
Igor Ryzhov [Wed, 13 Oct 2021 17:08:37 +0000 (20:08 +0300)]
lib: northbound cli show/cmd functions must not modify data nodes

To ensure this, add a const modifier to functions' arguments. Would be
great do this initially and avoid this large code change, but better
late than never.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Convert over to using converged to test for ospf being converged
Donald Sharp [Wed, 13 Oct 2021 16:46:22 +0000 (12:46 -0400)]
tests: Convert over to using converged to test for ospf being converged

OSPF when it is deciding on whom it should elect for DR and backup
has a process that prioritizes network stabilty over the exact
same results of who is the DR / Backups.

Essentially if we have r1 ----- r2

Let's say r1 has a higher priority, but r2 comes up first, starts
sending hello packets and then decides that it is the DR.  At some
point in time in the future, r1 comes up and then connects to r2
at that point it sees that r2 has elected itself DR and it keeps
it that way.

This is by design of the system.  With our tight ospf timers as
well as high load being experienced on our test systems.  There
exists a bunch of ospf tests that we cannot guarantee that a
consistent DR will be elected for the test.  As such let's not
even pretend that we care a bunch and just look for `Full`.
If we care about `ordering` we need to spend more time getting
the tests to actually start routers, ensure that htey are up and
running in the right order so that priority can take place.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>