Commit Graph

24657 Commits

Author SHA1 Message Date
Pat Ruddy
78156066b9 ospf6d: add write-multiplier configuration
allow amount of work done by read and write threads in a single
invocation to be tuned to between 1 and 100 packets (default 20)

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
bb382e24f1 ospf6d: add warning log for late hello packets
On transmit and receive calculate the time since the last hello was seen
and log a warning if it is late by more than the hello period.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
432b7daf3d ospf6d: add lsupdate messages to tx fifo
queue outgoing lsupdate messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
dd784cf9fa ospf6d: add lsack messages to tx fifo
queue outgoing lsack messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
571eed235d ospf6d: add lsreq messages to tx fifo
queue outgoing lsreq messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
d6a39b53f5 ospf6d: add dbdesc messages to tx FIFO
enqueue outgoing dbdesc messages to the end of the tx FIFO and
schedule the ospf6_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
3d9680313e ospf6d: add hello messages to tx fifo
queue outgoing hello messages to the interface tx FIFO and schedule
the ospf_write task to deal with them.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
531f925b4d ospf6d: add packet apis
Add APIs to create, queue and dequeue OSPFv3 packets

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
4f7bf1ab05 ospf6d: add tx fifo infrastructure
Add per interface fifo and per instance write list as a precursor
to implementing fairer sharing of the ospf6 oscket resources.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
aa6a96ba78 ospf6d: read ospf6 socket until failure
To ensure we read all the datagrams availabe from a socket when the
read task is scheduled, make the read helper return and error or
continue enum and loop unitl an error is received.
This requires the read from the socket to be non blocking

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
ec44732ea3 ospf6d: create an ospf_read_helper function
Take the contents of ospf6_receive and split the funtionality that
deals with a single packet receipt and place it in a separate helper
function.
This is the first step in a refactor process to allow the ospf6_read
task to read until failure.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:40:42 +01:00
Pat Ruddy
0e2deb5878 lib: add an MTYPE for bitfields
it is handy to be able to see allocated bitfields in the show
memory output.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-06-18 09:34:43 +01:00
Igor Ryzhov
763725cd5e lib: fix interface configuration after vrf change
This commit fixes the following problem:

- enter the interface node
- move the interface to another VRF
- try to continue configuring the interface

It is not possible to continue configuration because the XPath stored in
the vty doesn't correspond with the actual state of the system anymore.

For example:
```
nfware# conf
nfware(config)# interface enp2s0

<-- move the enp2s0 to a different VRF -->

nfware(config-if)# ip router isis 1
% Failed to get iface dnode in candidate DB
```

To fix the issue, go through all connected vty shells and update the
stored XPath.

Suggested-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-18 03:27:46 +03:00
Igor Ryzhov
3ae43012b2 isis: fix double-adding a circuit to the area
isis_circuit_enable can be called for an already enabled circuit. In this
case we would add the circuit to the area multiple times.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-18 03:27:29 +03:00
Igor Ryzhov
6eadfc2d41 isisd: fix adding a circuit to the wrong area
When creating a new area, we're adding all circuits in the same VRF to
this area. We should only add circuits configured with the same tag.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-18 03:27:29 +03:00
Jafar Al-Gharaibeh
161b567451
Merge pull request #8874 from idryzhov/ospf-routemap-fix
ospfd: fix routemap update
2021-06-17 18:27:23 -05:00
Igor Ryzhov
0fddd864b7 ospfd: fix routemap update
Currently, if the routemap already exists, we delete the pointer to it
when it is updated. We should delete the pointer only if the route-map
is actually deleted.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-17 19:31:03 +03:00
Donatas Abraitis
aa6fe908f3 lib: Do not double-assign freed pointer to NULL
It's already done by XFREE.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
a454d9ab44 bgpd: Drop return for void bgp_evpn_show_routes_mac_ip_es()
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
e6b457ac06 bgpd: Do not test for bgp_path_info in rfapiCopyUnEncap2VPN()
Already checked.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
6198b69489 bgpd: Remove double test against rfapi which is already checked
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
9c73cd41f7 bgpd: Do not check against aspath seg which is already checked before
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
707bb5a09c bgpd: Remove redundand check against BGP_EVPNES_EVI_LOCAL flag
It's already checked earlier at bgp_evpn_local_es_evi_do_del()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
eaf8028849 bgpd: Avoid dereferencing EVPN ES if NULL
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
734c6f0953 bgpd: Remove double check against match_packet_length_num
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
63fc789a10 bgpd: Do not test against bdc again since we already validated
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Donatas Abraitis
53048d33d1 bgpd: Remove useless reuselist_node assignment before while loop
Seems really not necessary pointing to initial value before while loop, where
it's assigned anyway.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Wesley Coakley
cbfb52986f
tools: reload recognizes pbr table range as single-line ctx
The line `pbr table range ...` does not start a new context so treat it
like a single-line context

Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
2021-06-16 20:34:30 -04:00
Quentin Young
9b1bc4d661
Merge pull request #8856 from LabNConsulting/chopps/topo-valgrind 2021-06-16 18:57:25 +00:00
Russ White
40e5282059
Merge pull request #8770 from gpnaveen/ospfv3_basic_functionality
tests: Adding ospfv3 basic functionality test cases
2021-06-16 09:09:57 -04:00
Christian Hopps
e58133a78e tests: add valgrind memleaks run options and detection
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-16 02:56:15 -04:00
Wesley Coakley
7266ad4588
docker: Use tini unilaterally and stop tailing /dev/null
tini is a hyper-minimal PID 0 which spawns a child process (watchfrr.sh
in our case), reaps zombies and forwards signals to the script. Starting
watchfrr.sh directly instead of through the old `tail /dev/null` or
`sleep 365d` helps keep things clean too :)

While tini was previously only used in the Alpine container it is useful
to apply this PID 0 to all containers except the special CI ones.

Fixes: #8788
Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
2021-06-15 22:23:50 -04:00
nguggarigoud
2448d00200 tests: Adding ospfv3 basic functionality test cases
1. Adding  APIs to configure and verify ospfv3.
2. Adding ospfv3 base functionality testcase.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-06-15 17:00:17 -07:00
Quentin Young
1bd67ed620
Merge pull request #8851 from opensourcerouting/ospf6-linkstateid-json
ospf6d: Link state ID in LSA database JSON output
2021-06-15 15:50:38 +00:00
Mark Stapp
de800c10af lib: cleanup and stop grpc pthread
At shutdown, try to stop the grpc module and its
dedicated pthread cleanly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-06-15 11:08:19 -04:00
Russ White
679b4f3bf9
Merge pull request #8833 from donaldsharp/zapi_message_count
Zapi message count
2021-06-15 11:05:15 -04:00
Martin Winter
05a7c65a15
Merge pull request #8814 from kuldeepkash/topojson_framework
tests: Fixing common pylint error for topojson
2021-06-15 17:03:57 +02:00
Russ White
ecaf7ab9d7
Merge pull request #8821 from anlancs/master-fix-doc-domainname
doc: add a note of domainname
2021-06-15 11:03:48 -04:00
Igor Ryzhov
f9fa6ee74c
Merge pull request #8838 from LabNConsulting/chopps/fix-nb-edit-cli
lib: do not attempt to create default nodes from NULL tree node
2021-06-15 12:18:29 +03:00
lynne
1b1f7b4f15 ospf6d: move error logs out from behind debug flags
The logging in ospf6 is very verbose.  If you turn on logging on a scaled
system you get too many logs.   The problem is that there are some errors
that occur that are hidden behind the debug flags, and to see these errors
we currently need to turn on the debug logging.  This change converts these
error logs to warnings and removes the debug flags.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-06-14 15:46:49 -04:00
Renato Westphal
994624c48d
Merge pull request #8836 from ton31337/fix/generalize_bgp_dest_locks
bgpd: Call bgp_dest_unlock_node() inside bgp_adj_in_remove()
2021-06-14 10:11:17 -03:00
Renato Westphal
60ff22619a
Merge pull request #8844 from sworleys/Term-Default-VRF-Last
lib: terminate default vrf last
2021-06-14 10:05:52 -03:00
David Schweizer
2804f2d241
ospf6d: Link state ID in LSA database JSON output
Added link state ID to JSON output of LSA database.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-06-14 08:41:10 +02:00
Christian Hopps
4da08e016b
lib: do not attempt to create default nodes from NULL tree node
Perform same NULL check for dependent node creation code too.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-12 09:10:18 +00:00
Stephen Worley
ea0d70b1c4 lib: terminate default vrf last
Always terminate default VRF last during FRR shutdown.

On shutdown we were simply looping over the RB tree and terminating
VRFs from the ROOT. This is not guaranteed to be the default last ever.

Instead switch to RB_SAFE and skip the default VRF till the very end.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2021-06-11 11:48:23 -04:00
Igor Ryzhov
240f48b36b isisd: per-instance dynamic hostname cache
Currently, the dynamic hostname cache is global. It is incorrect because
neighbors in different VRFs may have the same system ID and different
hostnames.

This also fixes a memory leak - when the instance is deleted, the cache
must be cleaned up and the cleanup thread must be cancelled.

Fixes #8832.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-11 18:30:47 +03:00
Mark Stapp
072b487b8f zebra: update pw dataplane info
Include the complete set of primary and backup nexthops from
the resolving route for a pseudowire. Add accessors for that
info. Modify the logic that creates the fib set of pw nexthops
so that only installed, labelled nexthops are included.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-06-11 09:30:09 -04:00
Mark Stapp
0d145d47c8 zebra: revise pw reachability logic
Modify the pseudowire reachability logic so that it returns
success if there is at least one installed labelled nexthop for
the route resolving the pw destination. We also check for
valid backup nexthops if necessary, in case there's been a
switchover event.
Only OpenBSD requires that _all_ nexthops be labelled, so we
have a more strict version of the logic also.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-06-11 09:30:09 -04:00
Mark Stapp
6fb3580882 zebra: add boolean to control pw reachability checking
Add a boolean to control whether pseudowire reachability
checking needs to be strict.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-06-11 09:29:13 -04:00
Mark Stapp
bc77c3bb8a zebra: use const in rib_match
Use const in common rib_match api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-06-11 09:29:13 -04:00