Commit Graph

23768 Commits

Author SHA1 Message Date
Quentin Young
e024c08200
Merge pull request #7957 from idryzhov/ospf-instance 2021-02-24 13:30:10 -05:00
Quentin Young
7a32a3ec53
Merge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook
lib: add agentx_enabled hook
2021-02-24 13:24:33 -05:00
Quentin Young
a874b986f0 doc: more misc. cleanups
- Re-add wrongly removed ISIS commands
- Re-add distribution commands in BGP
- Remove nonexistent commands in pathd
- Fix typo in OSPF6
- Improve command defs in PIM

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-24 13:06:26 -05:00
Anuradha Karuppiah
3f589fa8ec zebra: fix problem with bypass getting set accidentally on all ESs
This was caused because of uninitialized netlint attrs in the bond-member
netlink parse API.

PS: It was caught by the upstream topotests on ARM8 (passed everywhere
else).

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2021-02-24 08:11:26 -08:00
Anuradha Karuppiah
6bf6282da9 tests: increase ping attempts in EVPN MH to fix failures on ARM
There are two fixes to handle slow convergence on ARM -
1. Ping on every re-try attempt to account for initial packet loss
2. Handle incomplete show outputs gracefully

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:26 -08:00
Anuradha Karuppiah
74be8313d4 bgpd: support for lacp bypass with EVPN MH
When a local ES is in LACP bypass state BGP doesn't advertise
reachability to it i.e. the Type-1/EAD-per-ES routes and Type-4
route for the ES is not advertised. This is the equivalent of
oper-down handling.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:26 -08:00
Anuradha Karuppiah
8e1337c5dd zebra: del/add remote mac if there is a change from es->non-es dst and vicevera
This is needed as kernel currently doesn't allow a mac replace if the dst
changes from a L2NHG to a single-VTEP and viceversa.

Ticket: CM-31561

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:26 -08:00
Anuradha Karuppiah
fd40906be9 zebra: flush macs linked to the bond when it moves out of bypass
When a ES-bond is in bypass state MACs learnt on it are linked to the
access port instead of the ES. When LACP converges on the bond it moves
out of bypass and the MACs previously learnt on it are flushed to force
a re-learn on new traffic.

Ticket: CM-31326

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:26 -08:00
Anuradha Karuppiah
8b07f173e8 zebra: link local MACs to destination port for efficient lacp-bypass processing
When an ES-bond comes out of bypass FRR needs to flush the local MACs learnt
while the bond was in bypass. To do that efficiently local MACs are linked
to the dest-access port. This only happens if the access-port is in
LACP-bypass or if it is non-ES.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:24 -08:00
Anuradha Karuppiah
00a7710c25 zebra: support for lacp bypass with EVPN MH
Feature overview:
=================
A 802.3ad bond can be setup to allow lacp-bypass. This is done to enable
servers to pxe boot without a LACP license i.e. allows the bond to go oper
up (with a single link) without LACP converging.

If an ES-bond is oper-up in an "LACP-bypass" state MH treats it as a non-ES
bond. This involves the following special handling -
1. If the bond is in a bypass-state the associated ES is placed in a
bypass state.
2. If an ES is in a bypass state -
a. DF election is disabled (i.e. assumed DF)
b. SPH filter is not installed.
3. MACs learnt via the host bond are advertised with a zero ESI.
When the ES moves out of "bypass" the MACs are moved from a zero-ESI to
the correct non-zero id. This is treated as a local station move.

Implementation:
===============
When (a) an ES is detached from a hostbond or (b) an ES-bond goes into
LACP bypass zebra deletes all the local macs (with that ES as destination)
in the kernel and its local db. BGP re-sends any imported MAC-IP routes
that may exist with this ES destination as remote routes i.e. zebra can
end up programming a MAC that was perviously local as remote pointing
to a VTEP-ECMP group.

When an ES is attached to a hostbond or an ES-bond goes
LACP-up (out of bypss) zebra again deletes all the local macs in the
kernel and its local db. At this point BGP resends any imported MAC-IP
routes that may exist with this ES destination as sync routes i.e.
zebra can end up programming a MAC that was perviously remote
as local pointing to an access port.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:09:33 -08:00
Igor Ryzhov
a4e2dac168 vtysh: fix show_per_daemon for multi-instance ospfd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-24 15:31:20 +03:00
Igor Ryzhov
409f98ab44 ospfd: don't rely on instance existence in vty
Store instance index at startup and use it when processing vty commands.
The instance itself may be created and deleted by the user in runtime
using `[no] router ospf X` command.

Fixes #7908

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-24 15:31:20 +03:00
Igor Ryzhov
db1f688d44 zebra: fix duplicated definitions
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-24 14:51:00 +03:00
Igor Ryzhov
9082b3eb3d zebra: fix vni configuration in default vrf
VNI configuration is done without NB layer in default VRF. It leads to
the following problems:

```
vtysh -c "conf" -c "vni 1"
vtysh -c "conf" -c "vrf default" -c "no vni"
```
Second command does nothing, because the NB node is not created by the
first command.

```
vtysh -c "conf" -c "vrf default" -c "vni 1"
vtysh -c "conf" -c "no vni 1"
```
Second command doesn't delete the NB node created by the first command.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-24 14:51:00 +03:00
Patrick Ruddy
0ff7911386
Merge pull request #7879 from AnuradhaKaruppiah/advertise-svi-mac
evpn-mh: Advertise SVI MAC as a type-2 route if EVPN MH is enabled
2021-02-24 10:20:24 +00:00
David Lamparter
3cb0eab36f doc: add libelf to build docs
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-24 07:15:38 +01:00
Quentin Young
689d992703
Merge pull request #8134 from ton31337/fix/doc_formatting
doc: Format highlighted syntax properly for Systemtap examples
2021-02-23 18:50:18 -05:00
Quentin Young
f41ddc27cb doc: clean up a couple snafus in doc changes
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-23 15:57:56 -05:00
Mark Stapp
15869cd81d
Merge pull request #8035 from qlyoung/remove-more-sprintf
*: remove more sprintf()
2021-02-23 15:55:02 -05:00
Quentin Young
bfadc5c0cb doc: fix dupe bug-reports label, index entry
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-23 15:49:19 -05:00
Quentin Young
e1ac6ff442 doc: update docs on docs
- Don't document 'no' commands
- Don't use .. index:: for clicmds
- Don't document all possible variants

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-23 15:43:13 -05:00
Donatas Abraitis
ccc1af3998 doc: Format highlighted syntax properly for Systemtap examples
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-02-23 22:40:06 +02:00
lynne
3e67830c5f ospf6d: fix display of unknown LSAs in show ipv6 ospf6 database command
When an unknown LSA is in the database and the user issues the
"show ipv6 ospf6 database" command there is a crash.  The code currently
doesn't properly handle display of unknown LSAs.

Signed-off-by: Lynne Morrison <lynne@voltaio.net>
2021-02-23 13:04:06 -05:00
ckishimo
600d28e311 ospf6d: add DN bit in prefix options
According to RFC 5340 appendix A.4.1.1

     0  1  2  3  4  5  6  7
    +--+--+--+--+--+-+--+--+
    |  |  |  |DN| P|x|LA|NU|
    +--+--+--+--+--+-+--+--+

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-02-23 18:04:27 +01:00
ckishimo
8ae79ff269 ospf6d: remove redundant code when printing prefix options
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-02-23 18:04:18 +01:00
Russ White
33d1282f3d
Merge pull request #8095 from idryzhov/fix-nb-stale-pointers
fix stale pointers in northbound nodes
2021-02-23 11:15:31 -05:00
Russ White
a09016c833
Merge pull request #8020 from ton31337/feature/test_aggregator_as_with_0_exabgp
tests: Test if BGP AGGREGATOR attribute is discarded if ASN comes as 0
2021-02-23 11:06:34 -05:00
David Lamparter
9e6c14a46b doc: quick HOWTO on python/xrelfo.py
Just a few paragraphs on what it does and how to invoke it.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
David Lamparter
a971f0718d python/xrelfo: cross-platform xrefstructs.json
Just get names, types and order from pahole; ditch offset & size since
they're different on 32/64 bit.  None of the structs has padding
currently;  if we really need that it can be implemented in the future.

(Padding will raise an exception, so it won't break silently.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
David Lamparter
5e085e529d lib: get rid of padding in struct cmd_element
This makes the Python code looking at xrefs much easier.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
David Lamparter
2621bb8b8d lib/xref: record log message format args
Apparently you can do `#__VA_ARGS__` and it actually does something
sensible, so here we go recording the format parameters for log messages
into the xref.

This allows some more checking in xrelfo.py, e.g. hints to use `%pFX`
and co.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
David Lamparter
a1e6ab1e93 build: extract xrefs
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
David Lamparter
36a8fdfd74 python/xrelfo: the ELF xref extractor
This creates JSON dumps of all the xref structs littered around FRR.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
David Lamparter
5609b3af49 lib/clippy: add libelf wrapper
This adds _clippy.ELFFile, which provides a fast wrapper around libelf.
The API is similar to / a subset of pyelfutils, which unfortunately is
painfully slow (to the tune of minutes instead of seconds.)

The idea is that xrefs can be read out of ELF files by reading out the
"xref_array" section or "FRRouting/XREF" note.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-02-23 16:56:58 +01:00
ckishimo
66721aaee7 ospf6d: print prefix options for lsa type 3 and 5
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-02-23 15:39:25 +01:00
Donald Sharp
68009c04f3
Merge pull request #8130 from ton31337/feature/document_systemtap_usdt
doc: Instruction how to use Systemtap with FRRouting
2021-02-23 07:25:19 -05:00
Donatas Abraitis
4fe016fe13
Merge pull request #7435 from sudhanshukumar22/bgp-peer-group-issue
Bgp peer group issue
2021-02-23 09:14:24 +02:00
Donatas Abraitis
2a267d5aca
Merge pull request #7460 from pguibert6WIND/remove_bgp_constraint
bgpd: upon bgp deletion, do not systematically ask to remove main bgp
2021-02-23 09:02:04 +02:00
Donatas Abraitis
c952f18422 doc: Instruction how to use Systemtap with FRRouting
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-02-22 23:36:01 +02:00
Anuradha Karuppiah
736475cdf6 zebra: disable setting weak override flag in neigh updates
This is causing problems with VM move i.e. transition from remote
neigh to local neigh. This transition involves changing the NUD_STATE
NUD_NOARP to NUD_STALE. And the weak override flag prevents changing
the state from connected (REACHABLE, NOARP, PERMANENT) to STALE.

PS: Weak-override was originally used to prevent race conditions where
FRR can end up making a REACHABLE neigh STALE. We may need to revisit
and address that case at a later point.

Ticket: CM-30273

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-22 11:56:30 -08:00
Quentin Young
03750f1eb6 doc: remove 'no' form of commands
These don't need to be documented, most of the time they are obvious,
when they aren't the behavior can just be described in the command
description.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-22 14:38:21 -05:00
Quentin Young
8ed09fbf5a doc: automatically generate index entries for cli
- Generate index entries automatically
- Remove manual command index entries
- Clean up a few other manual index entries

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-22 14:38:21 -05:00
Quentin Young
1e31580f8a doc: clean up duplicate/wrong commands
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-02-22 14:38:21 -05:00
Mark Stapp
76787f231d
Merge pull request #8105 from donaldsharp/reduce_monotime
lib: Reduce getrusage/monotime for event handling
2021-02-22 13:04:43 -05:00
Igor Ryzhov
2ada626940 lib: register dependency between control plane protocol and vrf nb nodes
When the control plane protocol is created, the vrf structure is
allocated, and its address is stored in the northbound node.
The vrf structure may later be deleted by the user, which will lead to
a stale pointer stored in this node.

Instead of this, allow daemons that use the vrf pointer to register the
dependency between the control plane protocol and vrf nodes. This will
guarantee that the nodes will always be created and deleted together, and
there won't be any stale pointers.

Add such registration to staticd and pimd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-22 18:53:24 +03:00
Igor Ryzhov
09b150ef2a lib: add definitions for vrf xpaths
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-22 18:53:24 +03:00
Igor Ryzhov
3fa607beba bgpd: don't rely on northbound control plane protocol vrf pointer
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-22 18:53:24 +03:00
Igor Ryzhov
f182d8d8a2 lib: add ability to register dependencies between northbound nodes
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-22 18:53:24 +03:00
Donald Sharp
fa17cdc70f
Merge pull request #8125 from opensourcerouting/topotest-labn-jsoncmp
tests: JSON comparison command for LabN topotests
2021-02-22 09:38:03 -05:00
Donald Sharp
5e8229578a lib: Reduce getrusage/monotime for event handling
When handling a large number of events at one time
FRR will call monotime and getrusage 2 times for each
event.  With this change modify the code to change
this to (X events / 2) + 1 calls of getrusage and monotime

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-22 09:20:33 -05:00