]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
7 months agotests: Add BGP configuration for ce4
Carmine Scarpitta [Fri, 6 Sep 2024 20:38:47 +0000 (22:38 +0200)]
tests: Add BGP configuration for ce4

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add json to verify ce3 rib
Carmine Scarpitta [Fri, 6 Sep 2024 20:38:15 +0000 (22:38 +0200)]
tests: Add json to verify ce3 rib

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add zebra configuration for ce3
Carmine Scarpitta [Fri, 6 Sep 2024 20:38:06 +0000 (22:38 +0200)]
tests: Add zebra configuration for ce3

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add BGP configuration for ce3
Carmine Scarpitta [Fri, 6 Sep 2024 20:38:00 +0000 (22:38 +0200)]
tests: Add BGP configuration for ce3

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add json to verify ce2 rib
Carmine Scarpitta [Fri, 6 Sep 2024 20:37:42 +0000 (22:37 +0200)]
tests: Add json to verify ce2 rib

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add zebra configuration for ce2
Carmine Scarpitta [Fri, 6 Sep 2024 20:37:35 +0000 (22:37 +0200)]
tests: Add zebra configuration for ce2

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add BGP configuration for ce2
Carmine Scarpitta [Fri, 6 Sep 2024 20:37:26 +0000 (22:37 +0200)]
tests: Add BGP configuration for ce2

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add json to verify ce1 rib
Carmine Scarpitta [Fri, 6 Sep 2024 20:37:13 +0000 (22:37 +0200)]
tests: Add json to verify ce1 rib

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add zebra configuration for ce1
Carmine Scarpitta [Fri, 6 Sep 2024 20:35:43 +0000 (22:35 +0200)]
tests: Add zebra configuration for ce1

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add BGP configuration for ce1
Carmine Scarpitta [Fri, 6 Sep 2024 20:35:34 +0000 (22:35 +0200)]
tests: Add BGP configuration for ce1

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agoMerge pull request #16757 from mjstapp/fix_ospfd_dlist_sa
Donald Sharp [Fri, 6 Sep 2024 16:16:45 +0000 (12:16 -0400)]
Merge pull request #16757 from mjstapp/fix_ospfd_dlist_sa

ospfd: add assert to resolve SA warning

7 months agoospfd: add assert to resolve SA warning
Mark Stapp [Fri, 6 Sep 2024 13:15:50 +0000 (09:15 -0400)]
ospfd: add assert to resolve SA warning

Resolve a couple of SA warnings by asserting that pointers are
valid.

Signed-off-by: Mark Stapp <mjs@cisco.com>
7 months agoMerge pull request #16746 from Jafaral/nhrp-test
Donatas Abraitis [Fri, 6 Sep 2024 06:43:00 +0000 (09:43 +0300)]
Merge pull request #16746 from Jafaral/nhrp-test

tests: nhrp, use unified config, remove misleading error log

7 months agoMerge pull request #16754 from sri-mohan1/srib-24-frr-a
Donatas Abraitis [Fri, 6 Sep 2024 06:39:01 +0000 (09:39 +0300)]
Merge pull request #16754 from sri-mohan1/srib-24-frr-a

babeld: changes for code maintainability

7 months agoMerge pull request #16220 from donaldsharp/zebra_fpm_backpressure
Donatas Abraitis [Fri, 6 Sep 2024 06:28:24 +0000 (09:28 +0300)]
Merge pull request #16220 from donaldsharp/zebra_fpm_backpressure

Zebra fpm backpressure

7 months agobabeld: changes for code maintainability
sri-mohan1 [Fri, 6 Sep 2024 01:32:51 +0000 (07:02 +0530)]
babeld: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
7 months agoMerge pull request #16751 from opensourcerouting/fix/solo_peer-group
Donald Sharp [Thu, 5 Sep 2024 21:42:20 +0000 (17:42 -0400)]
Merge pull request #16751 from opensourcerouting/fix/solo_peer-group

bgpd: Some peer-groups related changes/fixes

7 months agozebra: Modify show `zebra dplane providers` to give more data
Donald Sharp [Mon, 17 Jun 2024 14:42:41 +0000 (10:42 -0400)]
zebra: Modify show `zebra dplane providers` to give more data

The show zebra dplane provider command was ommitting
the input and output queues to the dplane itself.
It would be nice to have this insight as well.

New output:
r1# show zebra dplane providers
dataplane Incoming Queue from Zebra: 100
Zebra dataplane providers:
  Kernel (1): in: 6, q: 0, q_max: 3, out: 6, q: 14, q_max: 3
  dplane_fpm_nl (2): in: 6, q: 10, q_max: 3, out: 6, q: 0, q_max: 3
dataplane Outgoing Queue to Zebra: 43
r1#

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agozebra: Limit queue depth in dplane_fpm_nl
Donald Sharp [Wed, 12 Jun 2024 19:16:08 +0000 (15:16 -0400)]
zebra: Limit queue depth in dplane_fpm_nl

The dplane providers have a concept of input queues
and output queues.  These queues are chained together
during normal operation.  The code in zebra also has
a feedback mechanism where the MetaQ will not run when
the first input queue is backed up.  Having the dplane_fpm_nl
code grab all contexts when it is backed up prevents
this system from behaving appropriately.

Modify the code to not add to the dplane_fpm_nl's internal
queue when it is already full.  This will allow the backpressure
to work appropriately in zebra proper.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agozebra: Modify dplane loop to allow backpressure to filter up
Donald Sharp [Wed, 12 Jun 2024 18:14:48 +0000 (14:14 -0400)]
zebra: Modify dplane loop to allow backpressure to filter up

Currently when the dplane_thread_loop is run, it moves contexts
from the dg_update_list and puts the contexts on the input queue
of the first provider.  This provider is given a chance to run
and then the items on the output queue are pulled off and placed
on the input queue of the next provider.  Rinse/Repeat down through
the entire list of providers.  Now imagine that we have a list
of multiple providers and the last provider is getting backed up.
Contexts will end up sticking in the input Queue of the `slow`
provider.  This can grow without bounds.  This is a real problem
when you have a situation where an interface is flapping and an
upper level protocol is sending a continous stream of route
updates to reflect the change in ecmp.  You can end up with
a very very large backlog of contexts.  This is bad because
zebra can easily grow to a very very large memory size and on
restricted systems you can run out of memory.  Fortunately
for us, the MetaQ already participates with this process
by not doing more route processing until the dg_update_list
goes below the working limit of dg_updates_per_cycle.  Thus
if FRR modifies the behavior of this loop to not move more
contexts onto the input queue if either the input queue
or output queue of the next provider has reached this limit.
FRR will naturaly start auto handling backpressure for the dplane
context system and memory will not go out of control.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agozebra: Use the ctx queue counters
Donald Sharp [Mon, 17 Jun 2024 15:05:28 +0000 (11:05 -0400)]
zebra: Use the ctx queue counters

The ctx queue data structures already have a counter
associated with them.  Let's just use them instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16752 from opensourcerouting/skip_scale_on_32bit
Donald Sharp [Thu, 5 Sep 2024 17:45:19 +0000 (13:45 -0400)]
Merge pull request #16752 from opensourcerouting/skip_scale_on_32bit

tests: Skip bgp_l3vpn vrf tests on 32bit systems

7 months agoMerge pull request #15676 from cscarpitta/bgp-srv6-sid-manager
Russ White [Thu, 5 Sep 2024 15:40:48 +0000 (11:40 -0400)]
Merge pull request #15676 from cscarpitta/bgp-srv6-sid-manager

bgpd: Extend BGP to communicate with the SRv6 SID Manager to allocate/release SRv6 SIDs

7 months agotests: Skip bgp_l3vpn vrf tests on 32bit systems
Martin Winter [Thu, 5 Sep 2024 13:57:27 +0000 (15:57 +0200)]
tests: Skip bgp_l3vpn vrf tests on 32bit systems

Tests may fail because of limited memory on 32bit system

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 months agotests: Check if we can use `solo` with a peer-group
Donatas Abraitis [Thu, 5 Sep 2024 13:31:37 +0000 (16:31 +0300)]
tests: Check if we can use `solo` with a peer-group

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agobgpd: Show what is the real type of the peer-group
Donatas Abraitis [Thu, 5 Sep 2024 12:48:14 +0000 (15:48 +0300)]
bgpd: Show what is the real type of the peer-group

```
ton# sh ip bgp peer-group

BGP peer-group pg-a
  Peer-group type is auto
  Configured address-families: IPv4 Unicast;

BGP peer-group pg-e, remote AS 0
  Peer-group type is external
  Configured address-families: IPv4 Unicast;

BGP peer-group pg-i, remote AS 65001
  Peer-group type is internal
  Configured address-families: IPv4 Unicast;
ton#
```

`auto` should be handled accordingly.

Fixes: 0dfe25697f5299326046fcfb66f2c6beca7c423c ("bgpd: Implement neighbor X remote-as auto")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoMerge pull request #16749 from opensourcerouting/fix/issue_16747
Mark Stapp [Thu, 5 Sep 2024 12:21:54 +0000 (08:21 -0400)]
Merge pull request #16749 from opensourcerouting/fix/issue_16747

bgpd: Retry connecting to label manager if failed

7 months agobgpd: Allow using `solo` for peer-groups
Donatas Abraitis [Thu, 5 Sep 2024 12:16:05 +0000 (15:16 +0300)]
bgpd: Allow using `solo` for peer-groups

Inherit solo flag for peer-group members also.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agobgpd: Retry connecting to label manager if failed
Donatas Abraitis [Thu, 5 Sep 2024 09:35:51 +0000 (12:35 +0300)]
bgpd: Retry connecting to label manager if failed

Fixes: https://github.com/FRRouting/frr/issues/16747
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agobgpd: add locator name in sid notify messages
Philippe Guibert [Sat, 8 Jun 2024 05:15:47 +0000 (07:15 +0200)]
bgpd: add locator name in sid notify messages

In the near future, some daemons may only register SIDs. This may be
the case for the pathd daemon when creating SRv6 binding SIDs.

When a locator is getting deleted at ZEBRA level, the daemon may have
an easy way to find out the SIds to unregister to.

This commit proposes to add the locator name to the SID_SRV6_NOTIFY
message whenever possible. Only case when an allocation failure happens,
the locator will not be present. In all other places, the notify API
at procol levels has the locator name extra-parameter.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Cleanup related to SRv6
Carmine Scarpitta [Sat, 23 Mar 2024 18:25:31 +0000 (19:25 +0100)]
bgpd: Cleanup related to SRv6

Remove unused SRv6 code.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Receive SRv6 SIDs notification from zebra
Carmine Scarpitta [Thu, 2 May 2024 15:08:07 +0000 (17:08 +0200)]
bgpd: Receive SRv6 SIDs notification from zebra

Zebra sends a `SRV6_SID_NOTIFY` notification to inform clients about the
result of a SID alloc/release operation.  This commit adds a handler to
process a `SRV6_SID_NOTIFY` notification received from zebra.

If the notification indicates that a SID allocation operation was
successful, then it stores the allocated SID in the SRv6 database,
installs the SID into the RIB, and advertises the SID to the other BGP
routers.

If the notification indicates that an operation has failed, it logs the
error.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Make `sid_register()` non-static
Carmine Scarpitta [Fri, 10 May 2024 10:50:27 +0000 (12:50 +0200)]
bgpd: Make `sid_register()` non-static

Make the `sid_register()` function non-static to allow other BGP modules
(e.g. bgp_zebra.c) to register SIDs.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Request SRv6 SIDs to SID Manager
Carmine Scarpitta [Sat, 23 Mar 2024 18:24:59 +0000 (19:24 +0100)]
bgpd: Request SRv6 SIDs to SID Manager

Currently, BGP allocates SIDs without interacting with Zebra.

Recently, the SRv6 implementation has been improved. Now, the daemons
need to interact with Zebra through ZAPI to obtain and release SIDs.

This commit extends BGP to request SIDs from Zebra instead of allocating
the SIDs on its own.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Release SIDs when disabling SRv6 in BGP
Carmine Scarpitta [Sat, 23 Mar 2024 18:23:52 +0000 (19:23 +0100)]
bgpd: Release SIDs when disabling SRv6 in BGP

When SRv6 VPN is unconfigured in BGP, BGP needs to interact with SID Manager to
release the SID and make it available to other daemons

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Add API to get/release SRv6 SIDs
Carmine Scarpitta [Sat, 23 Mar 2024 18:17:48 +0000 (19:17 +0100)]
bgpd: Add API to get/release SRv6 SIDs

Add an API to get/release SRv6 SIDs through the SRv6 SID Manager.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Receive SRv6 locator info from zebra
Carmine Scarpitta [Sat, 23 Mar 2024 18:16:36 +0000 (19:16 +0100)]
bgpd: Receive SRv6 locator info from zebra

This commit extends BGP to process locator information received from
SRv6 Manager (zebra) and save the locator info in the SRv6 database.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Deal with SRv6 locator instead of chunk
Carmine Scarpitta [Thu, 9 May 2024 13:45:10 +0000 (15:45 +0200)]
bgpd: Deal with SRv6 locator instead of chunk

Currently, when SRv6 is enabled in BGP, BGP requests a locator chunk
from Zebra. Zebra assigns a locator chunk to BGP, and then BGP can
allocate SIDs from the locator chunk.

Recently, the implementation of SRv6 in Zebra has been improved, and a
new API has been introduced for obtaining/releasing the SIDs.

Now, the daemons no longer need to request a chunk.

Instead, the daemons interact with Zebra to obtain information about the
locator and subsequently to allocate/release the SIDs.

This commit extends BGP to use the new SRv6 API. In particular, it
removes the chunk throughout the BGP code and modifies BGP to
request/save/advertise the locator instead of the chunk.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Add API to get SRv6 locator info
Carmine Scarpitta [Sat, 23 Mar 2024 18:07:33 +0000 (19:07 +0100)]
bgpd: Add API to get SRv6 locator info

Add an API to request information from the SRv6 SID Manager (zebra)
regarding a specific SRv6 locator.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: nhrp, use unified config, remove misleading error log
Jafar Al-Gharaibeh [Thu, 5 Sep 2024 04:51:39 +0000 (23:51 -0500)]
tests: nhrp, use unified config, remove misleading error log

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agoMerge pull request #16743 from lsang6WIND/vpn_leak_label
Donatas Abraitis [Wed, 4 Sep 2024 10:34:12 +0000 (13:34 +0300)]
Merge pull request #16743 from lsang6WIND/vpn_leak_label

bgpd: remove redundant loopback check in label update

7 months agobgpd: remove redundant loopback check in label update
Loïc Sang [Tue, 3 Sep 2024 16:36:25 +0000 (18:36 +0200)]
bgpd: remove redundant loopback check in label update

The "if_is_vrf" check is unnecessary because it’s already handled by
"if_get_vrf_loopback". Additionally, it ignores the default loopback and
could introduce potential bugs.

Fixes: 8b81f32e9787 ("bgpd: fix label lost when vrf loopback comes back")
Signed-off-by: Loïc Sang <loic.sang@6wind.com>
7 months agoMerge pull request #16724 from cscarpitta/fix/fix-srv6-frr-config
Donatas Abraitis [Wed, 4 Sep 2024 05:15:24 +0000 (08:15 +0300)]
Merge pull request #16724 from cscarpitta/fix/fix-srv6-frr-config

isisd: Add missing `exit` statement to `show running-config` output

7 months agoMerge pull request #16733 from gtataranni/fix/regex-string
Donatas Abraitis [Wed, 4 Sep 2024 05:13:19 +0000 (08:13 +0300)]
Merge pull request #16733 from gtataranni/fix/regex-string

tools: fix invalid escape on regex string

7 months agoMerge pull request #16736 from mjstapp/fix_bgp_evpn_if_clause
Donatas Abraitis [Wed, 4 Sep 2024 05:12:26 +0000 (08:12 +0300)]
Merge pull request #16736 from mjstapp/fix_bgp_evpn_if_clause

bgpd: fix duplicated test clause

7 months agobgpd: fix duplicated test clause
Mark Stapp [Tue, 3 Sep 2024 20:11:17 +0000 (16:11 -0400)]
bgpd: fix duplicated test clause

Fix a duplicated test clause - cut-and-paste mistake, maybe?

Signed-off-by: Mark Stapp <mjs@cisco.com>
7 months agotools: fix invalid escape on regex string
Giovanni Tataranni [Mon, 2 Sep 2024 17:10:26 +0000 (19:10 +0200)]
tools: fix invalid escape on regex string

fix usage of regex string without proper escaping

Signed-off-by: Giovanni Tataranni <g.tataranni@gmail.com>
7 months agoMerge pull request #16712 from opensourcerouting/fix/do_not_send_route_refresh_if_no_...
Russ White [Tue, 3 Sep 2024 14:57:09 +0000 (10:57 -0400)]
Merge pull request #16712 from opensourcerouting/fix/do_not_send_route_refresh_if_no_capability

bgpd: Do not send route-refresh if it wasn't negotiated in capabilities

7 months agoMerge pull request #16667 from louis-6wind/fix-isis-link-params-circuit-up
Russ White [Tue, 3 Sep 2024 14:55:39 +0000 (10:55 -0400)]
Merge pull request #16667 from louis-6wind/fix-isis-link-params-circuit-up

isisd: fix update link params after circuit is up

7 months agoMerge pull request #16713 from opensourcerouting/fix/bgpd_parse_received_err
Donald Sharp [Tue, 3 Sep 2024 14:36:16 +0000 (10:36 -0400)]
Merge pull request #16713 from opensourcerouting/fix/bgpd_parse_received_err

bgpd: Print errors as error not as information when parsing OPEN message

7 months agoMerge pull request #15605 from donaldsharp/evpn_local_table_warning
Russ White [Tue, 3 Sep 2024 14:19:34 +0000 (10:19 -0400)]
Merge pull request #15605 from donaldsharp/evpn_local_table_warning

bgpd: Ensure evpn local table display shows route send status

7 months agoMerge pull request #16725 from chiragshah6/bgp_dev1
Jafar Al-Gharaibeh [Tue, 3 Sep 2024 14:02:01 +0000 (10:02 -0400)]
Merge pull request #16725 from chiragshah6/bgp_dev1

bgpd: fix proper json format for unicast statistics for non exists vrf

7 months agoMerge pull request #16726 from LabNConsulting/native-munet-topotest
Donald Sharp [Tue, 3 Sep 2024 11:15:32 +0000 (07:15 -0400)]
Merge pull request #16726 from LabNConsulting/native-munet-topotest

fix native munet topotest

7 months agotests: improve example munet test
Christian Hopps [Tue, 3 Sep 2024 04:40:01 +0000 (00:40 -0400)]
tests: improve example munet test

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agotests: fix munet native topotest runs
Christian Hopps [Tue, 3 Sep 2024 04:41:03 +0000 (00:41 -0400)]
tests: fix munet native topotest runs

Enabe/fix using a munet.yaml config file for topology configuration.
Easier test writing.

This also uses the standard `frrinit.sh` to launch and teardown
FRR, so we actually test what most users use.

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agobgpd: fix proper json format for unicast statistics for non exists vrf
Sindhu Parvathi Gopinathan [Mon, 26 Aug 2024 07:02:46 +0000 (00:02 -0700)]
bgpd: fix proper json format for unicast statistics for non exists vrf

Ticket: #4060069

show bgp vrf afi unicast statistics json output is not return in json
format for non exists vrf.

Fix:
Json output is formatted for non exists vrf cases.

Command supported:

```
show bgp vrf <VRFNAME> ipv4/ipv6 unicast statistics json
show bgp vrf <VRFNAME> l2vpn evpn statistics json
```

Before Fix:

```
leaf11#
leaf11# show bgp vrf test ipv4 unicast statistics json
View/Vrf test is unknown
leaf11#
leaf11#
leaf11# show bgp vrf test ipv6 unicast statistics json
View/Vrf test is unknown
leaf11#
leaf11#
leaf11# show bgp vrf default1 l2vpn evpn statistics json
View/Vrf default1 is unknown
leaf11#

```

After Fix:

```
leaf11#
leaf11# show bgp vrf test ipv4 unicast statistics json
{
  "warning":"View/Vrf is unknown"
}
leaf11#
leaf11#
leaf11# show bgp vrf test ipv6 unicast statistics json
{
  "warning":"View/Vrf is unknown"
}
leaf11#
leaf11# show bgp vrf default1 l2vpn evpn statistics json
{
  "warning":"View/Vrf is unknown"
}
leaf11#
```

Ticket: #4060069

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
7 months agoisisd: Add missing `exit` statement
Carmine Scarpitta [Mon, 2 Sep 2024 21:57:53 +0000 (23:57 +0200)]
isisd: Add missing `exit` statement

Add missing `exit` statement to `show running-config` output.

```
router isis ISIS_CORE
 is-type level-2-only
 net 49.0001.0000.0000.0004.00
 lsp-mtu 1300
 topology ipv6-unicast
 log-adjacency-changes
 segment-routing srv6
  locator ISIS_LOC
 exit   <<<<<<<<<<<<<<<<<<<<<<<<
exit
```

Fixes https://github.com/FRRouting/frr/issues/16694

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agoMerge pull request #16711 from donaldsharp/memory_type_stuff
Jafar Al-Gharaibeh [Sun, 1 Sep 2024 23:44:29 +0000 (19:44 -0400)]
Merge pull request #16711 from donaldsharp/memory_type_stuff

Memory type stuff

7 months agobgpd: Print errors as error not as information when parsing OPEN message
Donatas Abraitis [Sun, 1 Sep 2024 19:42:54 +0000 (22:42 +0300)]
bgpd: Print errors as error not as information when parsing OPEN message

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agobgpd: Do not send route-refresh if it wasn't negotiated in capabilities
Donatas Abraitis [Sun, 1 Sep 2024 19:35:22 +0000 (22:35 +0300)]
bgpd: Do not send route-refresh if it wasn't negotiated in capabilities

Fixes: 04dfcb14ff9a02b053dfed0b3f657c6643d73830 ("bgpd: Deprecate Prestandard Route Refresh capability (128)")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoMerge pull request #16698 from louis-6wind/fix-nhrp-redundancy
Donatas Abraitis [Sun, 1 Sep 2024 17:30:02 +0000 (20:30 +0300)]
Merge pull request #16698 from louis-6wind/fix-nhrp-redundancy

nhrpd, test: fix nhrp_redundancy topotest

7 months ago*: Create termtable specific temp memory
Donald Sharp [Fri, 30 Aug 2024 13:05:11 +0000 (09:05 -0400)]
*: Create termtable specific temp memory

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>
7 months agoisisd: in isis_mt.c use appropriate memory allocator
Donald Sharp [Fri, 30 Aug 2024 12:52:06 +0000 (08:52 -0400)]
isisd: in isis_mt.c use appropriate memory allocator

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16701 from Jafaral/unified-config
Donald Sharp [Sat, 31 Aug 2024 12:56:55 +0000 (08:56 -0400)]
Merge pull request #16701 from Jafaral/unified-config

tests: detect all daemons correctly when using frr.conf

7 months agoMerge pull request #16688 from donaldsharp/no_connected_nexthops_at_first
Jafar Al-Gharaibeh [Fri, 30 Aug 2024 21:36:17 +0000 (17:36 -0400)]
Merge pull request #16688 from donaldsharp/no_connected_nexthops_at_first

No connected/local/kernel nexthops at first

7 months agobgpd: Ensure evpn local table display shows route send status
Donald Sharp [Fri, 22 Mar 2024 20:04:19 +0000 (16:04 -0400)]
bgpd: Ensure evpn local table display shows route send status

evpn has a concept of `local` tables where the evpn routes
are actually converted into underlying routes/neighbor
table entries( or vice versa ).  Then this local route
is propagated to the global evpn l2vpn table and sent
to the peers.  Certain show commands in evpn look
operate on the local table but make the output look
like the data has not been sent to the peer.  This
is confusing for the operator.  Modify the code
such that local tables get a `Local BGP table not advertised`
in the place where the code talks about whom has received
the data or not.

Example:
torm11# show bgp l2vpn evpn route vni 1000 mac 8a:a1:cc:73:a3:ac ip 45.0.0.5
BGP routing table entry for [2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5]
Paths: (2 available, best #2)
  Local BGP table not advertised
  Route [2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5] VNI 1000
  Imported from 192.168.100.18:2:[2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5], VNI 1000
  65101 65005
    192.168.100.18(leaf2) from leaf2(192.168.5.1) (192.168.100.14)
      Origin IGP, valid, external
      Extended Community: RT:65005:1000 ET:8
      Last update: Thu Mar 21 14:29:04 2024
  Route [2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5] VNI 1000
  Imported from 192.168.100.18:2:[2]:[0]:[48]:[8a:a1:cc:73:a3:ac]:[32]:[45.0.0.5], VNI 1000
  65101 65005
    192.168.100.18(leaf1) from leaf1(192.168.1.1) (192.168.100.13)
      Origin IGP, valid, external, bestpath-from-AS 65101, best (Router ID)
      Extended Community: RT:65005:1000 ET:8
      Last update: Thu Mar 21 14:29:04 2024

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agotests: detect all daemons correctly when using frr.conf
Jafar Al-Gharaibeh [Fri, 30 Aug 2024 19:35:31 +0000 (14:35 -0500)]
tests: detect all daemons correctly when using frr.conf

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agotests: use private addresses in nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 12:52:49 +0000 (14:52 +0200)]
tests: use private addresses in nhrp_redundancy

Use private addresses in nhrp_redundancy.

> cd tests/topotests/nhrp_redundancy
> git grep 176.16  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|176.16|172.16|g' -i
> git grep 5.5.5.  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|5.5.5.|10.5.5.|g' -i
> git grep 4.4.4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|4.4.4.|10.4.4.|g' -i

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: check show ip nhrp shorcut in nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 12:41:08 +0000 (14:41 +0200)]
tests: check show ip nhrp shorcut in nhrp_redundancy

Check show ip nhrp shorcut in nhrp_redundancy

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agonhrpd: fix show nhrp shortcut json
Louis Scalbert [Fri, 30 Aug 2024 12:35:58 +0000 (14:35 +0200)]
nhrpd: fix show nhrp shortcut json

Fix show nhrp shortcut json

Fixes: 87b9e98203 ("nhrpd: add json support to show nhrp vty commands")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: fix iptables command in nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 12:22:45 +0000 (14:22 +0200)]
tests: fix iptables command in nhrp_redundancy

Replace --nflog-range argument by --nflog-range due to:

> 2024-08-30 10:44:54,816 INFO: topo: input: iptables -A FORWARD -i nhs3-gre0 -o nhs3-gre0 -m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 --hashlimit-mode srcip,dstip --hashlimit-srcmask 24 --hashlimit-dstmask 24 --hashlimit-name loglimit-0 -j NFLOG --nflog-group 1 --nflog-range 128
> 2024-08-30 10:44:54,819 INFO: topo: output: warn: --nflog-range has never worked and is no longer supported, please use --nflog-size insted

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: fix nhs1 down check in nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 12:12:27 +0000 (14:12 +0200)]
tests: fix nhs1 down check in nhrp_redundancy

Fully check the NHRP convergence after setting nhs1 down. Otherwise the
ping may pass because the previous shortcut is still present.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: fix nhc1 route check after nhs1 down
Louis Scalbert [Fri, 30 Aug 2024 12:08:51 +0000 (14:08 +0200)]
tests: fix nhc1 route check after nhs1 down

After setting down nhs1, the test is checking that nhc1 routing table
matches routes in nhc1/nhrp_route.json. It is incorrect because it
checks that the NHRP route to nhs1 is still present but it should have
disappeared.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: simplify nhrp_redundancy convergence
Louis Scalbert [Fri, 30 Aug 2024 12:14:17 +0000 (14:14 +0200)]
tests: simplify nhrp_redundancy convergence

Simplify nhrp_redundancy convergence code. Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: rename router variables in nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 09:23:42 +0000 (11:23 +0200)]
tests: rename router variables in nhrp_redundancy

Rename router variables in nhrp_redundancy to match the actual name.
Cosmetic change to help debugging.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: rename routers in nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 09:16:44 +0000 (11:16 +0200)]
tests: rename routers in nhrp_redundancy

Rename routers in nhrp_redundancy to match the diagram. Cosmetic change.

> cd tests/topotests/nhrp_redundancy
> git grep r1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r1|nhs1|g' -i
> git grep r2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r2|nhs2|g' -i
> git grep r3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r3|nhs3|g' -i
> git grep r4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r4|nhc1|g' -i
> git grep r5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r5|nhc2|g' -i
> git grep r6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r6|router|g' -i
> git grep r7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r7|host|g' -i
>
> git grep R1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R1|nhs1|g' -i
> git grep R2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R2|nhs2|g' -i
> git grep R3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R3|nhs3|g' -i
> git grep R4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R4|nhc1|g' -i
> git grep R5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R5|nhc2|g' -i
> git grep R6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R6|router|g' -i
> git grep R7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R7|host|g' -i
>
> mv r1 nhs1
> mv r2 nhs2
> mv r3 nhs3
> mv r4 nhc1
> mv r5 nhc2
> mv r6 router
> mv r7 host

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: apply black nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 12:53:55 +0000 (14:53 +0200)]
tests: apply black nhrp_redundancy

Apply black nhrp_redundancy

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agodoc: Update documentation to talk about nhe changes
Donald Sharp [Thu, 29 Aug 2024 15:38:26 +0000 (11:38 -0400)]
doc: Update documentation to talk about nhe changes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agozebra: Allow for initial deny of installation of nhe's
Donald Sharp [Thu, 29 Aug 2024 15:29:55 +0000 (11:29 -0400)]
zebra: Allow for initial deny of installation of nhe's

Currently the FRR code will receive both kernel and
connected routes that do not actually have an underlying
nexthop group at all.  Zebra turns around and creates
a `matching` nexthop hash entry and installs it.
For connected routes, this will create 2 singleton
nexthops in the dplane per interface (v4 and v6).
For kernel routes it would just create 1 singleton
nexthop that might be used or not.

This is bad because the dplane has a limited amount
of space available for nexthop entries and if you
happen to have a large number of interfaces then
all of a sudden you have 2x(# of interfaces) singleton
nexthops.

Let's modify the code to delay creation of these singleton
nexthops until they have been used by something else in the
system.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agotests: fix prefix length in nhrp_redundancy
Louis Scalbert [Fri, 30 Aug 2024 11:54:36 +0000 (13:54 +0200)]
tests: fix prefix length in nhrp_redundancy

The expected prefix should be 5.5.5.0/24 otherwise the hosts behind NHRP
client 1 nhc1 (aka. r5) are not reachable via NHRP.

The issue was not seen in the FRR official CI because the tests were
skipped because iptables were missing in CI machines.

It solves the 16690 issue.

Fixes: https://github.com/FRRouting/frr/issues/16690
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
8 months agoMerge pull request #16689 from donaldsharp/blackhole_and_afi
Jafar Al-Gharaibeh [Fri, 30 Aug 2024 02:13:03 +0000 (22:13 -0400)]
Merge pull request #16689 from donaldsharp/blackhole_and_afi

Blackhole and afi

8 months agoMerge pull request #16692 from donaldsharp/zebra_avoid_ng_null
Jafar Al-Gharaibeh [Fri, 30 Aug 2024 02:11:03 +0000 (22:11 -0400)]
Merge pull request #16692 from donaldsharp/zebra_avoid_ng_null

zebra: Convince SA that the ng will always be valid

8 months agozebra: Convince SA that the ng will always be valid
Donald Sharp [Thu, 29 Aug 2024 22:10:30 +0000 (18:10 -0400)]
zebra: Convince SA that the ng will always be valid

There is a code path that could theoretically get you
to a point where the ng->nexthop is a NULL value.
Let's just make sure the SA system believes that
cannot happen anymore.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
8 months agoMerge pull request #16687 from Jafaral/isis-test-fix
Donald Sharp [Thu, 29 Aug 2024 19:10:54 +0000 (15:10 -0400)]
Merge pull request #16687 from Jafaral/isis-test-fix

tests: increase the timeout for packet padding check

8 months agozebra: Allow blackhole singleton nexthops to be v6
Donald Sharp [Thu, 29 Aug 2024 19:06:31 +0000 (15:06 -0400)]
zebra: Allow blackhole singleton nexthops to be v6

A blackhole nexthop, according to the linux kernel,
can be v4 or v6.  A v4 blackhole nexthop cannot be
used on a v6 route, but a v6 blackhole nexthop can
be used with a v4 route.  Convert all blackhole
singleton nexthops to v6 and just use that.
Possibly reducing the number of active nexthops by 1.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
8 months agozebra: Display afi of the nexthop hash entry
Donald Sharp [Thu, 29 Aug 2024 18:49:36 +0000 (14:49 -0400)]
zebra: Display afi of the nexthop hash entry

Let's display the afi of the nexthop hash entry.  Right
now it is impossible to tell the difference between v4 or
v6 nexthops, especially since it is important for the kernel.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
8 months agotests: increase the timeout for packet padding check
Jafar Al-Gharaibeh [Thu, 29 Aug 2024 16:40:50 +0000 (11:40 -0500)]
tests: increase the timeout for packet padding check

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
8 months agoMerge pull request #16664 from mjstapp/igor_debug_simplify
Jafar Al-Gharaibeh [Thu, 29 Aug 2024 15:51:53 +0000 (11:51 -0400)]
Merge pull request #16664 from mjstapp/igor_debug_simplify

*: simplify frrlib debug

8 months agoMerge pull request #16685 from opensourcerouting/fix/document_reverts
Jafar Al-Gharaibeh [Thu, 29 Aug 2024 15:39:27 +0000 (11:39 -0400)]
Merge pull request #16685 from opensourcerouting/fix/document_reverts

doc: Document the git revert flow

8 months agoMerge pull request #16680 from donaldsharp/route_scale_minor_changes
Mark Stapp [Thu, 29 Aug 2024 12:17:34 +0000 (08:17 -0400)]
Merge pull request #16680 from donaldsharp/route_scale_minor_changes

tests: Fix route-scale at higher ecmp

8 months agodoc: Document the git revert flow
Donatas Abraitis [Thu, 29 Aug 2024 06:04:28 +0000 (09:04 +0300)]
doc: Document the git revert flow

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
8 months agoMerge pull request #16683 from donaldsharp/test_ospf_netns_vrf_failure
Jafar Al-Gharaibeh [Thu, 29 Aug 2024 05:12:40 +0000 (01:12 -0400)]
Merge pull request #16683 from donaldsharp/test_ospf_netns_vrf_failure

tests: ospf_netns_vrf should give more time for coming up

8 months agoMerge pull request #16682 from donaldsharp/bgp_suppress_test
Jafar Al-Gharaibeh [Thu, 29 Aug 2024 05:12:17 +0000 (01:12 -0400)]
Merge pull request #16682 from donaldsharp/bgp_suppress_test

tests: Ensure bgp suppress fib has a chance to transmit data to peer

8 months agoMerge pull request #16681 from donaldsharp/zebra_re_after_rn
Jafar Al-Gharaibeh [Thu, 29 Aug 2024 03:43:40 +0000 (23:43 -0400)]
Merge pull request #16681 from donaldsharp/zebra_re_after_rn

zebra: Move prefix lookup to outside re loop

8 months agoMerge pull request #16673 from donaldsharp/default_original_sin
Jafar Al-Gharaibeh [Wed, 28 Aug 2024 19:30:12 +0000 (15:30 -0400)]
Merge pull request #16673 from donaldsharp/default_original_sin

tests: Fix bgp_default_originate_topo1_3

8 months agoMerge pull request #16672 from raja-rajasekar/vty_out_mem_spike_srujana
Mark Stapp [Wed, 28 Aug 2024 19:29:23 +0000 (15:29 -0400)]
Merge pull request #16672 from raja-rajasekar/vty_out_mem_spike_srujana

lib: Memory spike reduction for sh cmds at scale

8 months agotests: Fix route-scale at higher ecmp
Donald Sharp [Tue, 27 Aug 2024 14:29:13 +0000 (10:29 -0400)]
tests: Fix route-scale at higher ecmp

Recent commits moved the default retries to 60, but
the higher ecmp counts were over-riding to 40.  Let's
make it 80.

Noticed this when I went looking at failures on 386 platforms
in our ci.  Route scale is timing out when deleting routes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
8 months agotests: ospf_netns_vrf should give more time for coming up
Donald Sharp [Wed, 28 Aug 2024 19:10:04 +0000 (15:10 -0400)]
tests: ospf_netns_vrf should give more time for coming up

Test fails:

            test_func = partial(
                topotest.router_json_cmp,
                router,
                "show ip ospf vrf {0}-ospf-cust1 json".format(rname),
                expected,
            )
            _, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
            assertmsg = '"{}" JSON output mismatches'.format(rname)
>           assert diff is None, assertmsg
E           AssertionError: "r1" JSON output mismatches
E           assert Generated JSON diff error report:
E
E             > $->r1-ospf-cust1->areas->0.0.0.0->nbrFullAdjacentCounter: output has element with value '1' but in expected it has value '2'

/home/sharpd/frr2/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py:239: AssertionError

Support bundle has this data:
r1# show ip ospf vrf all neighbor
% 2024/08/28 14:55:54.763

VRF Name: r1-ospf-cust1

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
10.0.255.3        1 Full/DR         10.547s           39.456s 10.0.3.1        r1-eth1:10.0.3.2                     0     0     0
10.0.255.2        1 Full/Backup     0.543s            38.378s 10.0.3.3        r1-eth1:10.0.3.2                     1     0     0

So immediately after the test fails this test, the neighbor comes up.
Let's give the test a bit more time for failure to not happen

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
8 months agotests: Ensure bgp suppress fib has a chance to transmit data to peer
Donald Sharp [Wed, 28 Aug 2024 19:05:40 +0000 (15:05 -0400)]
tests: Ensure bgp suppress fib has a chance to transmit data to peer

Giving only 5 seconds to pass bgp data to peers on a heavily
loaded system is a recipe for not having fun.  Add more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
8 months agoMerge pull request #16679 from donaldsharp/nhrp_test_documentation
Mark Stapp [Wed, 28 Aug 2024 18:11:18 +0000 (14:11 -0400)]
Merge pull request #16679 from donaldsharp/nhrp_test_documentation

doc: Update topotest doc to include iptables is needed