Commit Graph

37073 Commits

Author SHA1 Message Date
Donald Sharp
dbc4ba99a9 Revert "ospfd: update ospf_asbr_status when using no_area_nssa command"
This reverts commit 71aa5ab7f6.
2024-10-31 21:35:51 -04:00
Jafar Al-Gharaibeh
66ed5c1d9c
Merge pull request #17327 from donaldsharp/bgp_update_optimizations
Bgp update optimizations
2024-10-31 15:06:42 -05:00
Donald Sharp
66feece071
Merge pull request #17281 from nabahr/mrib-import
Add support to import alternate URIB tables into the main MRIB
2024-10-31 13:28:57 -04:00
Donald Sharp
d14dbdb897 bgpd: Move RFC 8212 check for inbound before filter in bgp_update
Currently the code to check to see if any input filters are
applicable is *before* the RFC 8212 check to see if we have
any filters at all.  As such we have already tested for this,
so let's move this check for RFC 8212 to immediately before
the input filter test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:35:01 -04:00
Donald Sharp
5592aecefd bgpd: Convert rcvd_attr_printed to a bool
No need for a integer to store this, use a bool

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:35:01 -04:00
Donald Sharp
c6400ca256 bgpd: Refactor bgp_update some for nexthop reachability
The nexthop reachability code was cut-n-pasted 2 times
with just a tiny bit of difference.  If we ever change
that it becomes `fun` to keep them in sync.  Since this
is more important than full on speed of code let's abstract
and get bgp_update() to be a bit easier to maintain.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:35:01 -04:00
Donald Sharp
e3519b3400 bgpd: In bgp_update() for mac addrs ensure we are dealing with evpn
The code is just arbitrarily checking to see if there are any
mac addresses associated with a prefix.  This makes no
sense from the perspective that it can only happen as
an evpn route.  Let's not make non-evpn people pay
the price to check this data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:35:01 -04:00
Donald Sharp
fb78a9b66b bgpd: In bgp_update try to optimize is_loop_check variable
The variable is_loop_check is being set and then later
we test against it multiple times.  Move the setting
of whether or not to check for as loops to where it
is tested against and stop testing it multiple times.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:35:00 -04:00
Donald Sharp
d9fd4901f0 bgpd: Only set bgp_labels in bgp_update if we have num_labels
In the interest of speeding up code, there is no point in
attempting to see if a label is usable if the number of labels
passed in is 0.  Since that is a much much quicker test than
the bgp_is_valid_label() call, let's test that first.

Additionally, there is no point in walking the label[] array
passed in unless we are in the if statement, so move it inside.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:35:00 -04:00
Donald Sharp
852e6c327d bgpd: allowas_in and aspath_loop_count only used in one if statement
In bgp_update(), the two variables allowas_in and aspath_loop_count
are only used when peer->change_local_as is true.  Move the retrieval
of the allowas_in data to inside the if statement to save some
(very) small amount of time in bgp_update not gathering this
data unless the particular peer has this set.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-31 10:35:00 -04:00
Jafar Al-Gharaibeh
35dbbacc3b
Merge pull request #17317 from opensourcerouting/feature/allow_setting_custom_params_for_daemons_unified_config
tests: Add an ability to specify daemon params with unified config
2024-10-31 08:55:23 -05:00
Mark Stapp
87941fa261
Merge pull request #17318 from opensourcerouting/fix/add_missing_new_line_for_zebra_help
zebra: Add missing new line for help string
2024-10-31 09:13:56 -04:00
Nathan Bahr
180e1a0d77 tests: Add zebra rib import-table tests
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-31 12:44:05 +00:00
Donatas Abraitis
25ae643996 zebra: Add missing new line for help string
```
  -A, --asic-offload        FRR is interacting with an asic underneath the linux kernel
      --v6-with-v4-nexthops Underlying dataplane supports v6 routes with v4 nexthops  -s, --nl-bufsize          Set netlink receive buffer size
```

Fixes: 1f5611c06d ("zebra: Allow zebra cli to accept v6 routes with v4 nexthops")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-31 10:47:48 +02:00
Donatas Abraitis
879466731b tests: Add an ability to specify daemon params with unified config
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-31 10:43:28 +02:00
Donatas Abraitis
5f11235614
Merge pull request #17296 from LabNConsulting/liambrady/core-rlimit-respect-hard-limit
tests: respect RLIMIT_CORE hard limit
2024-10-31 10:19:55 +02:00
Jafar Al-Gharaibeh
7c1034087e
Merge pull request #17310 from opensourcerouting/fix/doc_build
doc: Create html_context before setting READTHEDOCS
2024-10-30 13:13:34 -05:00
Jafar Al-Gharaibeh
e2f3cfa518
Merge pull request #17311 from opensourcerouting/fix/syntax_topotests
doc: Use RST, not Markdown format for links
2024-10-30 12:49:43 -05:00
Donatas Abraitis
9397a5144b doc: Use RST, not Markdown format for links
Fixes: d155d62785 ("doc: Require unified config for all new topotests")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-30 14:26:07 +02:00
Donatas Abraitis
ef9f698e04 doc: Create html_context before setting READTHEDOCS
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 529, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/checkouts/latest/doc/user/conf.py", line 77, in <module>
    html_context["READTHEDOCS"] = True
    ^^^^^^^^^^^^
NameError: name 'html_context' is not defined

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-30 14:15:36 +02:00
Russ White
56d994aeca
Merge pull request #15563 from donaldsharp/bgp_musings
Bgp musings
2024-10-30 06:04:45 -04:00
Nathan Bahr
1c50a553fc doc: Document zebra table import command with additional mrib flag
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-29 20:17:59 +00:00
Nathan Bahr
be2a7ed6af zebra: Add ability to import alternate tables into the MRIB
Expanded the cli command to include an mrib flag for importing to
the main table MRIB instead of the main table URIB.
Piped through specifying the safi through the import table functions
rather than hardcoding to SAFI_UNICAST.
Import still only import routes from the URIB subtable, only added the
ability to import into the main table MRIB.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-29 20:17:59 +00:00
Donald Sharp
1115feedc3 bgpd: add some counters not displayed yet
Add some counters to keep track how often stuff is done.
This is mainly for us developers.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 14:11:06 -04:00
Donald Sharp
e2090bf4c6 bgpd: Further extend show bgp attribute-info
Fill out a bit more data about what is being held.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 14:11:06 -04:00
Donald Sharp
a7f223636f bgpd: Optimize the usage of jhash
There are a bunch of jhash_1word uses.  Let's convert
to jhash_3word and get rid of some calls.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 14:11:06 -04:00
Liam Brady
b4dc01b3de tests: respect RLIMIT_CORE hard limit
In the case that the RLIMIT_CORE hard limit cannot
be raised on a system, do not fail due to an exception.
Instead, attempt to increase the soft limit to as large
a value as possible (e.g. to the set hard limit).

Signed-off-by: Liam Brady <lbrady@labn.net>
2024-10-29 13:07:57 -04:00
Russ White
56495a88df
Merge pull request #17251 from donaldsharp/bgp_best_path_evpn_issue
bgpd: bestpath failure when you have a singlepath not in holddown
2024-10-29 10:16:37 -04:00
Russ White
574a71516a
Merge pull request #17226 from louis-6wind/fix-bmp-tests
tests: fix bmp tests random failure
2024-10-29 10:12:11 -04:00
Russ White
b5c3b44de1
Merge pull request #17190 from baozhen-H3C/202410180176
isisd: The command "'show isis vrf all summary json" has no output.
2024-10-29 10:08:28 -04:00
Russ White
4a6e1c0acb
Merge pull request #16990 from lsang6WIND/label-per-nexthop
bgpd: fix prefix same as nexthop in label per nexthop
2024-10-29 10:05:37 -04:00
Donatas Abraitis
e42dd44123
Merge pull request #17245 from fdumontet6WIND/fix1
bgpd:  fix crash when polling bgp4v2PathAttrTable
2024-10-29 14:12:05 +02:00
Donatas Abraitis
e534d9cc7b
Merge pull request #17278 from pguibert6WIND/bmp_listener
bgpd: fix blank line in running-config with bmp listener cmd
2024-10-29 10:57:05 +02:00
Donatas Abraitis
cf6a575cbd
Merge pull request #17189 from Shbinging/fix_some_ospf_unset_commands_syntax
ospfd:fix syntax of some ospf no commands
2024-10-29 10:43:53 +02:00
Donatas Abraitis
60f77de79d
Merge pull request #17257 from pguibert6WIND/srv6_debug
zebra: add 'debug zebra srv6' command
2024-10-29 10:32:20 +02:00
Jafar Al-Gharaibeh
2945258c7c
Merge pull request #17254 from donaldsharp/mrib_nht_wonky
Mrib nht wonky
2024-10-28 16:20:20 -05:00
Donald Sharp
3bff65abc7 zebra: When installing a mroute, allow it to flow
Currently the mroute code was not allowing the mroute
to be sent to the dataplane.  This leaves us with a
situation where the routes being installed where never
being set as installed and additionally nht against
the mrib would not work if the route came into existence
after the nexthop tracking was asked for.

Turns out all the pieces where there to let this work.
Modify the code to pass it to the dplane and to send
it back up as having worked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-28 15:02:39 -04:00
Donald Sharp
811168ecc3 zebra: Add safi to some debugs
Trying to figure out what safi we are talking about is fun when
it is not put into the debugs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-28 14:29:31 -04:00
Donald Sharp
aff8eaa4a2 sharpd: Allow sharpd to watch nexthops in the mrib
Nothing special here, just allow sharpd to ask to watch
nexthops in the mrib.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-28 14:10:06 -04:00
Donald Sharp
ea0b8a0364
Merge pull request #17200 from opensourcerouting/vtysh-fix-list-find
vtysh: fix `find` and `list` commands
2024-10-28 14:05:29 -04:00
Philippe Guibert
9a33ee18bf bgpd: fix blank line in running-config with bmp listener cmd
An extra blank line is added in show running-config with BMP:

> ubuntu2204hwe(config)# router bgp 65500
> ubuntu2204hwe(config-router)# bmp targets tgt
> ubuntu2204hwe(config-bgp-bmp)# bmp monitor ipv4 unicast pre-policy
> ubuntu2204hwe(config-bgp-bmp)# bmp listener 192.0.2.100 port 44
> ubuntu2204hwe(config-bgp-bmp)# do show running-config
>
> router bgp 65500
> [..]
>  bmp targets tgt
>   bmp monitor ipv4 unicast pre-policy
>                                       <-- blank line
>   bmp listener 192.0.2.100 port 44
>  exit

Remove the blank line.

Fixes: ed18356f1f ("bgpd/bmp: BMP implementation")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-10-28 16:41:09 +01:00
Philippe Guibert
a7fec9c387 zebra: add 'debug zebra srv6' command
Add a specific debug command to handle srv6 troubleshooting.
Move the srv6 traces that initially were under 'debug zebra packet'
debug.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-10-28 16:40:33 +01:00
Donatas Abraitis
1668f3262a
Merge pull request #17243 from louis-6wind/fix-bgp-local-label
bgpd: fix display of local label in show bgp
2024-10-28 16:33:50 +02:00
David Lamparter
e4df480831
Merge pull request #16354 from Sokolmish/zebra-no-ra 2024-10-28 13:28:29 +01:00
Donatas Abraitis
dd48a0b791
Merge pull request #17250 from pguibert6WIND/flexalgo_uint8
isisd: fix change flex-algorithm number from uint32 to uint8
2024-10-28 12:30:46 +02:00
Jafar Al-Gharaibeh
f11421d4ec
Merge pull request #17160 from opensourcerouting/fix/keep_zebra_on-rib-process_in_frr.conf
lib, zebra: Keep `zebra on-rib-process script` in frr.conf
2024-10-27 18:23:36 -05:00
Donatas Abraitis
200d54f54e
Merge pull request #17216 from Jafaral/fix-bsr
pimd, tests: fix bsr assert and expand topotest to pimv6
2024-10-27 21:11:23 +02:00
Donald Sharp
e0fd591e94
Merge pull request #17255 from systemcrash/patch-1
docs: Update evpn.rst
2024-10-26 20:38:26 -04:00
Paul Donald
217435b9f4 docs: Update evpn.rst
spelling

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-10-26 14:27:35 +02:00
Donald Sharp
c3eebccdc6 bgpd: bestpath failure when you have a singlepath not in holddown
When you have multiple paths to a particular route and a single
path changes.  In addition of the other paths are either in
hold down or not established or really just not selected you
could end up with a situation where the bestpath choosen
was a path that was in hold down.

Modify the code such that when there is nothing worse
in bestpath selection for the choosen path, but were
unable to do any sorting, just put the path on the top
of the list and declare it the winner.  Else just
do the original and put it at the end.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-25 17:22:13 -04:00