]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agozebra: debug flags for MAC-IP sync
Anuradha Karuppiah [Sat, 28 Mar 2020 17:16:30 +0000 (10:16 -0700)]
zebra: debug flags for MAC-IP sync

Filters for zebra debug logs.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: local path changes to display the SYNC info
Anuradha Karuppiah [Sat, 28 Mar 2020 17:15:06 +0000 (10:15 -0700)]
bgpd: local path changes to display the SYNC info

Sample output -
root@torm-11:mgmt:~# net show bgp l2vpn evpn route vni 1000 mac 00:00:00:00:00:11
BGP routing table entry for [2]:[0]:[48]:[00:00:00:00:00:11]
Paths: (5 available, best #5)
  Not advertised to any peer
  Route [2]:[0]:[48]:[00:00:00:00:00:11] VNI 1000
  Imported from 27.0.0.16:14:[2]:[0]:[48]:[00:00:00:00:00:11], VNI 1000
  4435 5551
    27.0.0.16 from spine-2(swp4) (27.0.0.14)
      ESI 03:00:00:00:00:01:11:00:00:01 local-es
      Origin IGP, valid, external
      Extended Community: RT:5551:1000 RT:5551:4001 ET:8 Rmac:00:02:00:00:00:2d
      Last update: Fri Mar 27 02:26:35 2020

>>>>>>>>>>>>>>>>>>>> SNIP >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  Route [2]:[0]:[48]:[00:00:00:00:00:11] VNI 1000/4001
  Local
    27.0.0.15 from 0.0.0.0 (27.0.0.15)
      ESI 03:00:00:00:00:01:11:00:00:01 local-es peer-info: (active MM: 0) >>>
      Origin IGP, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (EVPN local ES path)
      Extended Community: ET:8 RT:5550:1000 RT:5550:4001 Rmac:00:02:00:00:00:25
      Last update: Fri Mar 27 02:26:35 2020

Displayed 5 paths for requested prefix
root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: Type-2/MAC-IP SYNC route handling
Anuradha Karuppiah [Sat, 28 Mar 2020 17:12:04 +0000 (10:12 -0700)]
bgpd: Type-2/MAC-IP SYNC route handling

SYNC routes are paths rxed from a local-ES peer. These routes result in
the installation of local dataplane entries i.e. with access port as
destination (vs. the remote-VTEP destination that results in the packet
being sent via the VxLAN overlay).

If a SYNC path is selected as the best path it is always turned around
into a local path which immediately lowers the status of the SYNC path
to non-best. However we need to keep track of the highest MM seq-number
and peer activity to continue advertising the local path. In order to
do that we need information from the "second-best" SYNC path to be
bubbled up to the local best path. This "SYNC" info is then consolidated
and sent to zebra which is responsible for the MM handling and local
path management.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: evpn path selection changes for MAC-IP SYNC route handling
Anuradha Karuppiah [Sat, 28 Mar 2020 16:51:14 +0000 (09:51 -0700)]
bgpd: evpn path selection changes for MAC-IP SYNC route handling

When a SYNC route i.e. a route with a local ES as destination is
rxed on a switch (say L11) from an ES peer (say L12) a local
MAC/neigh entry is created on L11 with the local access port
as dest port.

Creation of the local entry triggers a local path advertisement from
L11. This could be a "locally-active" path or a "locally-inactive"
path. Inactive paths are advertised with the proxy bit.

To ensure that the local entry is not deleted by a SYNC route it is
given absolute precedence over peer-paths.

If there are two non-local paths with the same dest ES and same MM
seq number the non-proxy path is preferred. This is done to ensure
that we don't lose track of the peer-activity.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: extended-community and attrs for MAC-IP SYNC route handling
Anuradha Karuppiah [Sat, 28 Mar 2020 16:35:08 +0000 (09:35 -0700)]
bgpd: extended-community and attrs for MAC-IP SYNC route handling

A new proxy flag has been added to the already existing NA extended
community to allow proxy advertisment of a local host by a VTEP that is
yet to indpendently establish local reachability.
Reference: draft-rbickhart-evpn-ip-mac-proxy-adv

The extendend mac-mobility sequence number needs to be synced across
the ES peers. However we cannot let a ES-peer path win over a local
path on the same ES. To accomplish that some parameters such as the
MM seq number are bubbled up from the non-best path to the local path.
This mechanism is explained further in the path-selection patch.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib: MAC-IP flags used by zebra and BGP for SYNC route handling
Anuradha Karuppiah [Thu, 26 Mar 2020 13:20:07 +0000 (06:20 -0700)]
lib: MAC-IP flags used by zebra and BGP for SYNC route handling

1. BGP informs zebra if a MAC-IP is a SYNC path and if it active on the
ES peer.
2. Zebra sends paths that are "local-inactive" with the proxy flag to
BGP.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolinux: UAPI for MAC sync
Anuradha Karuppiah [Wed, 25 Mar 2020 13:10:54 +0000 (06:10 -0700)]
linux: UAPI for MAC sync

MAC entries rxed from an ES-peer need to be marked as static to prevent them
from being aged out. However, for static entries, we still need to track
local activity to independently (independent of BGP) establish that a host
is still attached to the ES.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib, bgpd: Remove unused variable from structure
Donald Sharp [Sat, 13 Jun 2020 17:49:38 +0000 (13:49 -0400)]
lib, bgpd: Remove unused variable from structure

The `struct evpn_ead_addr` structure had a prefix length
associated with it.  This value was only ever set never
used.  Remove this from our system.  The other
nice thing about this change is that it puts back
the sizeof struct route_node to 192 bytes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Stub rt_socket functions for L2 NHG programming
Anuradha Karuppiah [Fri, 17 Apr 2020 21:59:29 +0000 (14:59 -0700)]
zebra: Stub rt_socket functions for L2 NHG programming

Stub functions to keep the BSD builds working. No new functionality.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: CLI commands to display ethernet segments
Anuradha Karuppiah [Sat, 28 Mar 2020 00:34:06 +0000 (17:34 -0700)]
zebra: CLI commands to display ethernet segments

1. ES sample display
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# show evpn es
Type: L local, R remote
ESI                            Type ES-IF                 VTEPs
00:00:00:00:00:00:00:00:00:00       -
03:00:00:00:00:01:11:00:00:01  LR   hostbond1             27.0.0.16
03:00:00:00:00:01:22:00:00:02  LR   hostbond2             27.0.0.16
03:00:00:00:00:01:22:00:00:03  LR   hostbond3             27.0.0.16
03:00:00:00:00:02:11:00:00:01  R    -                     27.0.0.17,27.0.0.18
03:00:00:00:00:02:22:00:00:02  R    -                     27.0.0.17,27.0.0.18
03:00:00:00:00:02:22:00:00:03  R    -                     27.0.0.17,27.0.0.18
torm-11#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

2. ES-EVI sample display
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# show evpn es-evi
Type: L local, R remote
VNI      ESI                            Type
1005     03:00:00:00:00:01:11:00:00:01  L
1005     03:00:00:00:00:01:22:00:00:02  L
1005     03:00:00:00:00:01:22:00:00:03  L
1002     03:00:00:00:00:01:11:00:00:01  L
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: triggers for maintaining a list of access vlans per-ES
Anuradha Karuppiah [Sat, 28 Mar 2020 00:32:46 +0000 (17:32 -0700)]
zebra: triggers for maintaining a list of access vlans per-ES

The linux kernel sends the VLAN list per-access port as bitmap. This
needs to be translated into a per-ES VNI list for generation of
EAD-EVI routes.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: Ethernet segment management and support for MAC-ECMP
Anuradha Karuppiah [Sat, 28 Mar 2020 00:14:45 +0000 (17:14 -0700)]
zebra: Ethernet segment management and support for MAC-ECMP

1. Local ethernet segments are configured in zebra by attaching a
local-es-id and sys-mac to a access interface -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!
interface hostbond1
 evpn mh es-id 1
 evpn mh es-sys-mac 00:00:00:00:01:11
!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
This info is then sent to BGP and used for the generation of EAD-per-ES
routes.

2. Access VLANs associated with an (ES) access port are translated into
ES-EVI objects and sent to BGP. This is used by BGP for the
generation of EAD-EVI routes.

3. Remote ESs are imported by BGP and sent to zebra. A list of VTEPs
is maintained per-remote ES in zebra. This list is used for the creation
of the L2-NHG that is used for forwarding traffic.

4. MAC entries with a non-zero ESI destination use the L2-NHG associated
with the ESI for forwarding traffic over the VxLAN overlay.

Please see zebra_evpn_mh.h for the datastruct organization details.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: support for adding L2NHG and mac-ecmp in the linux kernel
Anuradha Karuppiah [Fri, 27 Mar 2020 23:36:24 +0000 (16:36 -0700)]
zebra: support for adding L2NHG and mac-ecmp in the linux kernel

Multihoming support requires a new dataplane feature, MAC-ECMP, to
bridge traffic to remote ESs that are attached to more than one
active VTEP.

As a part of this support indirection has also been added via
L2-NHGs. Using a nexthop group allows for fast failover
of MAC entries when an access port attached to a remote-ES goes
down i.e. instead of updating many MAC entries this becomes a
single NHG update to the dataplane.

Note: Some of the code here needs to be reworked to the new
dataplane model.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: debug flags for evpn-mh ES and MAC-ECMP
Anuradha Karuppiah [Fri, 27 Mar 2020 22:05:45 +0000 (15:05 -0700)]
zebra: debug flags for evpn-mh ES and MAC-ECMP

Filters for MH debug logs

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: CLI changes for EAD routes and ES/ES-EVI display
Anuradha Karuppiah [Sat, 28 Mar 2020 16:23:40 +0000 (09:23 -0700)]
bgpd: CLI changes for EAD routes and ES/ES-EVI display

1. Sample ES display
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# sh bgp l2vpn evpn es
ES Flags: L local, R remote, I inconsistent
VTEP Flags: E ESR/Type-4, A active nexthop
ESI                            Flags RD                    #VNIs    VTEPs
03:00:00:00:00:01:11:00:00:01  LR    27.0.0.15:15          10       27.0.0.16(EA)
03:00:00:00:00:01:22:00:00:02  LR    27.0.0.15:16          10       27.0.0.16(EA)
03:00:00:00:00:01:22:00:00:03  LR    27.0.0.15:17          10       27.0.0.16(EA)
03:00:00:00:00:02:11:00:00:01  R     -                     10       27.0.0.17(A),27.0.0.18(A)
03:00:00:00:00:02:22:00:00:02  R     -                     10       27.0.0.17(A),27.0.0.18(A)
03:00:00:00:00:02:22:00:00:03  R     -                     10       27.0.0.17(A),27.0.0.18(A)
torm-11#

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

2. Sample ES-EVI display
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# sh bgp l2vpn evpn es-evi
Flags: L local, R remote, I inconsistent
VTEP-Flags: E EAD-per-ES, V EAD-per-EVI
VNI      ESI                            Flags VTEPs
1005     03:00:00:00:00:01:11:00:00:01  LR    27.0.0.16(EV)
1005     03:00:00:00:00:01:22:00:00:02  LR    27.0.0.16(EV)
1005     03:00:00:00:00:01:22:00:00:03  LR    27.0.0.16(EV)
1005     03:00:00:00:00:02:11:00:00:01  R     27.0.0.17(EV),27.0.0.18(EV)
1005     03:00:00:00:00:02:22:00:00:02  R     27.0.0.17(EV),27.0.0.18(EV)
1005     03:00:00:00:00:02:22:00:00:03  R     27.0.0.17(EV),27.0.0.18(EV)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

3. Sample EAD route display
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# sh bgp l2vpn evpn route type ead
BGP table version is 19, local router ID is 27.0.0.15
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
EVPN type-1 prefix: [4]:[ESI]:[EthTag]:[IPlen]:[VTEP-IP]
EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]:[IPlen]:[IP]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-4 prefix: [4]:[ESI]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[EthTag]:[IPlen]:[IP]

   Network          Next Hop            Metric LocPrf Weight Path
                    Extended Community
Route Distinguisher: 27.0.0.15:5
*> [1]:[0]:[03:00:00:00:00:01:11:00:00:01]:[128]:[0.0.0.0]
                    27.0.0.15                          32768 i
                    ET:8 RT:5550:1009
*> [1]:[0]:[03:00:00:00:00:01:22:00:00:02]:[128]:[0.0.0.0]
                    27.0.0.15                          32768 i
                    ET:8 RT:5550:1009
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: support for Ethernet Segments and Type-1/EAD routes
Anuradha Karuppiah [Fri, 27 Mar 2020 21:43:50 +0000 (14:43 -0700)]
bgpd: support for Ethernet Segments and Type-1/EAD routes

This is the base patch that brings in support for Type-1 routes.
It includes support for -
- Ethernet Segment (ES) management
- EAD route handling
- MAC-IP (Type-2) routes with a non-zero ESI i.e. Aliasing for
  active-active multihoming
- Initial infra for consistency checking. Consistency checking
  is a fundamental feature for active-active solutions like MLAG.
  We will try to levarage the info in the EAD-ES/EAD-EVI routes to
  detect inconsitencies in access config across VTEPs attached to
  the same Ethernet Segment.

Functionality Overview -
========================
1. Ethernet segments are created in zebra and associated with
access VLANs. zebra sends that info as ES and ES-EVI objects to BGP.
2. BGP advertises EAD-ES and EAD-EVI routes for the locally attached
ethernet segments.
3. Similarly BGP processes EAD-ES and EAD-EVI routes from peers
and translates them into ES-VTEP objects which are then sent to zebra
as remote ESs.
4. Each ES in zebra is associated with a list of active VTEPs which
is then translated into a L2-NHG (nexthop group). This is the ES
"Alias" entry
5. MAC-IP routes with a non-zero ESI use the alias entry created in
(4.) to forward traffic i.e. a MAC-ECMP is done to these remote-ES
destinations.

EAD route management (route table and key) -
============================================
1. Local EAD-ES routes
a. route-table: per-ES route-table
key: {RD=ES-RD, ESI, ET=0xffffffff, VTEP-IP)
b. route-table: per-VNI route-table
Not added
c. route-table: global route-table
key: {RD=ES-RD, ESI, ET=0xffffffff)

2. Remote EAD-ES routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=ES-RD, ESI, ET=0xffffffff, VTEP-IP)
c. route-table: global route-table
key: {RD=ES-RD, ESI, ET=0xffffffff)

3. Local EAD-EVI routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=0, ESI, ET=0, VTEP-IP)
c. route-table: global route-table
key: {RD=L2-VNI-RD, ESI, ET=0)

4. Remote EAD-EVI routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=0, ESI, ET=0, VTEP-IP)
c. route-table: global route-table
key: {RD=L2-VNI-RD, ESI, ET=0)

Please refer to bgp_evpn_mh.h for info on how the data-structures are
organized.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: attr changes for EAD routes
Anuradha Karuppiah [Fri, 27 Mar 2020 21:37:16 +0000 (14:37 -0700)]
bgpd: attr changes for EAD routes

Add ESI as an inline attribute field along with the other EVPN
attributes. This may be re-worked when the rest of the EVPN
attributes find a new home.

Some cleanup has been done to get rid of stale/unused references
to ESI. And also to consolidate duplicate definitions of ES ID
types.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: extended community for EAD routes
Anuradha Karuppiah [Fri, 27 Mar 2020 20:56:08 +0000 (13:56 -0700)]
bgpd: extended community for EAD routes

1. EAD routes require support for ESI_LABEL extended community. The
primary info in this EC is a flags the specifies if the ES is
Single-active or active-acive.
2. Also fixed up ES_IMPORT_RT string. Support was added a long time
ago for ESR/Type-4 routes but it has not really been exercised for
MH functionality till now.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: new memory types for MH
Anuradha Karuppiah [Wed, 25 Mar 2020 12:17:46 +0000 (05:17 -0700)]
bgpd: new memory types for MH

Objects needed for Ethernet Segment management

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: debug flags for MH
Anuradha Karuppiah [Fri, 27 Mar 2020 14:55:59 +0000 (07:55 -0700)]
bgpd: debug flags for MH

Filters for MH debug logs

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolinux: UAPI for L2-NHG and MAC-ECMP
Anuradha Karuppiah [Wed, 25 Mar 2020 13:07:12 +0000 (06:07 -0700)]
linux: UAPI for L2-NHG and MAC-ECMP

linux headers needed for MH MAC-ECMP support

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib: timer: move the timer string api to lib
Anuradha Karuppiah [Fri, 27 Mar 2020 14:30:20 +0000 (07:30 -0700)]
lib: timer: move the timer string api to lib

This api was earlier present in the daemon code but as multiple daemons
need it moving it to lib will avoid unnecessary copy-paste.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib: prefix: Add VTEP-IP to the EAD route prefix
Anuradha Karuppiah [Wed, 25 Mar 2020 13:37:24 +0000 (06:37 -0700)]
lib: prefix: Add VTEP-IP to the EAD route prefix

In the global evpn routing table RD is part of the key. However in the
per-VNI routing table the key doesn't include the RD and we need more
than the ESI to distinguish between EAD routes from different VTEPs
attached to the same Ethernet Segment.

This commit also includes other definitions needed for managing an
ESI.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib: allow listnode memory to be managed by the app
Anuradha Karuppiah [Fri, 27 Mar 2020 14:28:32 +0000 (07:28 -0700)]
lib: allow listnode memory to be managed by the app

In most cases this memory is pre-allocated along with the base element.
Similarly it is stored in the base element to allow efficient del
without lookup (main reason for using DLL vs. SLL).

So (in most cases) there should be no need to manage the element/data
and listnode memories separately.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib: bitfield: new macros for bit processing
Anuradha Karuppiah [Wed, 25 Mar 2020 13:17:34 +0000 (06:17 -0700)]
lib: bitfield: new macros for bit processing

New macros have been added for the following -
1. to efficiently iterate and execute functions on already set bits
2. to check if a bit is in use
3. to check if a bitfield has been initialized (this is to safetly
handle cases where the bitfield is freed and re-allocated).
4. to check if two bitfields have the same bits set

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: pull the multihoming code out to a separate file
Anuradha Karuppiah [Fri, 27 Mar 2020 13:39:51 +0000 (06:39 -0700)]
bgpd: pull the multihoming code out to a separate file

Re-org only; no other code changes. This is being done to make maintanence
of MH functionality (which will have more code added to it) easy.

The code moved here was originally committed via -
'commit 50f74cf13105 ("*: support for evpn type-4 route")'

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoevpn-netns: Revert PR5077, has been re-worked post-refactor
Pat Ruddy [Wed, 3 Jun 2020 11:22:26 +0000 (12:22 +0100)]
evpn-netns: Revert PR5077, has been re-worked post-refactor

Revert "zebra: support for macvlan interfaces"

This reverts commit bf69e212fd053af3298fc3cba38458b396467849.

Revert "doc: add some documentation about bgp evpn netns support"

This reverts commit 89b97c33d7a6d9dc427d56fea52fa27334dde81d.

Revert "zebra: dynamically detect vxlan link interfaces in other netns"

This reverts commit de0ebb25404fe984f084a0d57b7f873618423876.

Revert "bgpd: sanity check when updating nexthop from bgp to zebra"

This reverts commit ee9633ed87f0ff5da1373a42d6c044f0a682c8d3.

Revert "lib, zebra: reuse and adapt ns_list walk functionality"

This reverts commit c4d466c830083e8ba58881d7ad03a90f6baf0754.

Revert "zebra: local mac entries populated in correct netnamespace"

This reverts commit 40424548910887f3bbbf544ce964d3b736048ae5.

Revert "zebra: when parsing local entry against dad, retrieve config"

This reverts commit 3acc394bc5e5c225e9258fd0d57a6cebea0c0ccd.

Revert "bgpd: evpn nexthop can be changed by default"

This reverts commit a2342a241253c41b798845cae155b4caab4bcda5.

Revert "zebra: zvni_map_to_vlan() adaptation for all namespaces"

This reverts commit db81d18647bbd81a2c335620c9a03e32e4a5b2be.

Revert "zebra: add ns_id attribute to mac structure"

This reverts commit 388d5b438e22cddc6740e362763c0922edbb242a.

Revert "zebra: bridge layer2 information records ns_id where bridge is"

This reverts commit b5b453a2d6af58692bee0e256fe1dffe99824801.

Revert "zebra, lib: new API to get absolute netns val from relative netns val"

This reverts commit b6ebab34f664ba1cc9479fc1287f127c12077509.

Revert "zebra, lib: store relative default ns id in each namespace"

This reverts commit 9d3555e06ccc68fe37e0a00100029ac4bad8dee2.

Revert "zebra, lib: add an internal API to get relative default nsid in other ns"

This reverts commit 97c9e7533bd22029ac19838c043cfca82d2f6eb3.

Revert "zebra: map vxlan interface to bridge interface with correct ns id"

This reverts commit 7c990878f20efff335c1211deda3ec50071ae2b5.

Revert "zebra: fdb and neighbor table are read for all zns"

This reverts commit f8ed2c5420106314a940cb67264494e0110fc4c0.

Revert "zebra: zvni_map_to_svi() adaptation for other network namespaces"

This reverts commit 2a9dccb6475bfc11af2b855c4c8ff9e500ba21f4.

Revert "zebra: display interface slave type"

This reverts commit fc3141393ad95651d31fccd144b5c029d00e5f3a.

Revert "zebra: zvni_from_svi() adaptation for other network namespaces"

This reverts commit 6fe516bd4b85569b3b8b4bcc2910afc5569aa026.

Revert "zebra: importation of bgp evpn rt5 from vni with other netns"

This reverts commit 28254125d06f65cc4344b6156eec76a37ec6aede.

Revert "lib, zebra: update interface name at netlink creation"

This reverts commit 1f7a68a2ff0ba1424131f30112e0cc1572f0bee3.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoMerge pull request #6860 from opensourcerouting/bgp-docs-missing
Donatas Abraitis [Wed, 5 Aug 2020 12:07:33 +0000 (15:07 +0300)]
Merge pull request #6860 from opensourcerouting/bgp-docs-missing

doc: update some BGP documentation items

4 years agoMerge pull request #6858 from donaldsharp/display_type_string
Donatas Abraitis [Wed, 5 Aug 2020 07:52:17 +0000 (10:52 +0300)]
Merge pull request #6858 from donaldsharp/display_type_string

zebra: When debugging route notifications use string instead of number

4 years agoMerge pull request #6861 from donaldsharp/pim_doc_fixups
Donatas Abraitis [Wed, 5 Aug 2020 05:35:49 +0000 (08:35 +0300)]
Merge pull request #6861 from donaldsharp/pim_doc_fixups

doc: Update doc for `ip pim use-source ..` command

4 years agodoc: Update doc for `ip pim use-source ..` command
Donald Sharp [Wed, 5 Aug 2020 00:19:43 +0000 (20:19 -0400)]
doc: Update doc for `ip pim use-source ..` command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: document addpath
Rafael Zalamena [Tue, 4 Aug 2020 22:31:11 +0000 (19:31 -0300)]
doc: document addpath

Document the commands `addpath-tx-all-paths`,
`addpath-tx-bestpath-per-AS` and attempt to provide an useful
explanation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6857 from mjstapp/fix_lsp_backup_update
Renato Westphal [Tue, 4 Aug 2020 22:12:57 +0000 (19:12 -0300)]
Merge pull request #6857 from mjstapp/fix_lsp_backup_update

zebra: reset LSP backup nh info on update

4 years agodoc: improve neighbor shutdown
Rafael Zalamena [Tue, 4 Aug 2020 21:47:54 +0000 (18:47 -0300)]
doc: improve neighbor shutdown

Add more neighbor shutdown documentation and reference the RFC.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: document allowas-in
Rafael Zalamena [Tue, 4 Aug 2020 21:35:53 +0000 (18:35 -0300)]
doc: document allowas-in

Document the command `allowas-in` and attempt to provide an useful
explanation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: document bgp AS override
Rafael Zalamena [Tue, 4 Aug 2020 21:19:27 +0000 (18:19 -0300)]
doc: document bgp AS override

Document the command `as-override` and attempt to provide an useful
explanation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6698 from deastoe/fpm-netlink-fixes
Donald Sharp [Tue, 4 Aug 2020 19:59:51 +0000 (15:59 -0400)]
Merge pull request #6698 from deastoe/fpm-netlink-fixes

zebra: always set kernel table ID in FPM netlink

4 years agozebra: When debugging route notifications use string instead of number
Donald Sharp [Tue, 4 Aug 2020 18:41:00 +0000 (14:41 -0400)]
zebra: When debugging route notifications use string instead of number

Current behavior:
eva# show mem
2020/08/04 18:07:38 ZEBRA: Not Notifying Owner: 2 about prefix 3.3.3.3/32(254) 2 vrf: 0

Fix it to show:

2020/08/04 18:07:38 ZEBRA: Not Notifying Owner: connected about prefix 3.3.3.3/32(254) 2 vrf: 0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6809 from opensourcerouting/staticd-disable-acl
Donald Sharp [Tue, 4 Aug 2020 18:01:26 +0000 (14:01 -0400)]
Merge pull request #6809 from opensourcerouting/staticd-disable-acl

vtysh: don't send access list commands to staticd

4 years agoMerge pull request #6727 from opensourcerouting/nb-cfg-backoff
Donald Sharp [Tue, 4 Aug 2020 17:54:55 +0000 (13:54 -0400)]
Merge pull request #6727 from opensourcerouting/nb-cfg-backoff

lib: introduce configuration back-off timer for YANG-modeled commands

4 years agoMerge pull request #6815 from donaldsharp/vtysh_goes_vroom
Renato Westphal [Tue, 4 Aug 2020 17:42:41 +0000 (14:42 -0300)]
Merge pull request #6815 from donaldsharp/vtysh_goes_vroom

vtysh: Speed up output of configuration across daemons

4 years agozebra: reset LSP backup nh info on update
Mark Stapp [Tue, 4 Aug 2020 16:46:26 +0000 (12:46 -0400)]
zebra: reset LSP backup nh info on update

If an existing LSP nh is updated, ensure any backup nh
info is also reset.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6812 from mjstapp/fix_dplane_ret_sa
Sri Mohana Singamsetty [Tue, 4 Aug 2020 16:06:17 +0000 (09:06 -0700)]
Merge pull request #6812 from mjstapp/fix_dplane_ret_sa

zebra: fix SA warning, handle return code

4 years agoMerge pull request #6834 from ton31337/feature/documentation_for_bgp_wide_option
Quentin Young [Tue, 4 Aug 2020 15:45:23 +0000 (11:45 -0400)]
Merge pull request #6834 from ton31337/feature/documentation_for_bgp_wide_option

doc: Add wide option for show bgp commands

4 years agoMerge pull request #6821 from Niral-Networks/niral_6VPE_6PE_fix
Stephen Worley [Tue, 4 Aug 2020 15:17:31 +0000 (11:17 -0400)]
Merge pull request #6821 from Niral-Networks/niral_6VPE_6PE_fix

BGP : Fix for nexthop as IPv4 mapped IPv6 address

4 years agoMerge pull request #6770 from opensourcerouting/fpm-race
Quentin Young [Tue, 4 Aug 2020 15:04:22 +0000 (11:04 -0400)]
Merge pull request #6770 from opensourcerouting/fpm-race

zebra: FPM fixes

4 years agovtysh: Speed up output of configuration across daemons
Donald Sharp [Tue, 28 Jul 2020 14:58:47 +0000 (10:58 -0400)]
vtysh: Speed up output of configuration across daemons

With a config that contains a large number of prefix-lists a 'show run' command
was an expensive operation:

sharpd@eva ~/frr_internal2 ((cl4.1.0))> time vtysh -c "show run" | grep ACTIVE | wc -l
32397
________________________________________________________
Executed in   14.53 secs   fish           external
   usr time   14.45 secs  591.00 micros   14.45 secs
   sys time    0.03 secs  189.00 micros    0.03 secs
sharpd@eva ~/frr_internal2 ((cl4.1.0))>

Effectively we are keeping a linked list of data to store the configuration.
When we received a new item we would look in the list to see if it already
does, by doing a string search across each element in the list.

Add to the master configuration a hash of items for O(1) lookup.
Keep the list for order so we don't mangle that up.

New time:
sharpd@eva ~/frr_internal1 (dev)> time vtysh -c "show run" | grep ACTIVE | wc -l
32397
________________________________________________________
Executed in  277.94 millis    fish           external
   usr time  237.46 millis   20.53 millis  216.93 millis
   sys time   14.31 millis    0.00 millis   14.31 millis

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib,zebra,bgpd: Fix for nexthop as IPv4 mapped IPv6 address
Kaushik [Wed, 29 Jul 2020 15:48:57 +0000 (08:48 -0700)]
lib,zebra,bgpd: Fix for nexthop as IPv4 mapped IPv6 address

Added a macro to validate the v4 mapped v6 address.
Modified bgp receive & send updates for v4 mapped v6 address as
nexthop and installing it as recursive nexthop in RIB.
Minor change in fpm while sending the routes for nexthop as
v4 mapped v6 address.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
4 years agoMerge pull request #6844 from donaldsharp/bestpath_routes
Donatas Abraitis [Tue, 4 Aug 2020 05:13:49 +0000 (08:13 +0300)]
Merge pull request #6844 from donaldsharp/bestpath_routes

Bestpath routes

4 years agostaticd,vtysh: no access list commands
Rafael Zalamena [Tue, 4 Aug 2020 00:22:52 +0000 (21:22 -0300)]
staticd,vtysh: no access list commands

Don't send access list commands to `staticd` since it doesn't use them.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotests: remove sharpd from route map output
Rafael Zalamena [Tue, 28 Jul 2020 12:33:08 +0000 (09:33 -0300)]
topotests: remove sharpd from route map output

`sharpd` doesn't handle any route map commands and neither should show
up in route map commands. This makes the CI pass again after not sending
route map commands to it again.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agosharpd,vtysh: no access list or route map commands
Rafael Zalamena [Mon, 3 Aug 2020 23:55:47 +0000 (20:55 -0300)]
sharpd,vtysh: no access list or route map commands

Don't send access list or route map commands to `sharpd` since it
doesn't use them.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agovtysh: recategorize access list commands
Rafael Zalamena [Tue, 28 Jul 2020 00:27:50 +0000 (21:27 -0300)]
vtysh: recategorize access list commands

Create a new category for access lists commands so we can avoid sending
configurations (which might be big) to daemons which do not use it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6832 from pguibert6WIND/ignore_nhrp
Renato Westphal [Mon, 3 Aug 2020 23:03:39 +0000 (20:03 -0300)]
Merge pull request #6832 from pguibert6WIND/ignore_nhrp

nhrpd: ignore zebra updates about our routes being deleted/added

4 years agolib: introduce configuration back-off timer for YANG-modeled commands
Renato Westphal [Thu, 2 Jul 2020 17:43:36 +0000 (14:43 -0300)]
lib: introduce configuration back-off timer for YANG-modeled commands

When using the default CLI mode, the northbound layer needs to create
a separate transaction to process each YANG-modeled command since
they are supposed to be applied immediately (there's no candidate
configuration nor the "commit" command like in the transactional
CLI). The problem is that configuration transactions have an overhead
associated to them, in big part because of the use of some heavy
libyang functions like `lyd_validate()` and `lyd_diff()`. As of
now this overhead is substantial and doesn't scale well when large
numbers of transactions need to be performed in sequence.

As an example, loading 50k prefix-lists using a single transaction
takes about 2 seconds on a modern CPU. Loading the same 50k
prefix-lists using 50k transactions can take more than an hour
to complete (which is unacceptable by any standard). To fix this
problem, some heavy optimization work needs to be done on libyang and
on the FRR northbound itself too (e.g. perform partial configuration
diffs whenever possible).  This, however, should be a long term
effort since these optimizations shouldn't be trivial to implement
and we're far from having the performance numbers we need.

In the meanwhile, this commit introduces a simple but efficient
workaround to alleviate the issue. In short, a new back-off timer
was introduced in the CLI to monitor and detect when too many
YANG-modeled commands are being received at the same time. When
a certain threshold is reached (100 YANG-modeled commands within
one second), the northbound starts to group all subsequent commands
into a single large transaction, which allows them to be processed
much faster (e.g. seconds and not hours).  It's essentially a
protection mechanism that creates dynamically-sized transactions
when necessary to prevent performance issues from happening. This
mechanism is enabled both when parsing configuration files and when
reading commands from a terminal.

The downside of this optimization is that, if several YANG-modeled
commands are grouped into the same transaction and at least one of
them fails, the whole transaction is rejected. This is undesirable
since users don't expect transactional behavior when that's not
enabled explicitly. To minimize this issue, the CLI will log all
commands that were rejected whenever that happens, to make the
user aware of what happened and have enough information to fix
the problem. Commands that fail due to parsing errors or CLI-level
validations in general are rejected separately.

Again, this proposed workaround is intended to be temporary. The
goal is to provided a quick fix to issues like #6658 while we work
on better long-term solutions.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years ago*: introduce DEFPY_YANG & friends
Renato Westphal [Mon, 6 Jul 2020 15:47:44 +0000 (12:47 -0300)]
*: introduce DEFPY_YANG & friends

DEFPY_YANG will allow the CLI to identify which commands are
YANG-modeled or not before executing them. This is going to be
useful for the upcoming configuration back-off timer work that
needs to commit pending configuration changes before executing a
command that isn't YANG-modeled.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #6845 from opensourcerouting/foreach-safi-formatting
Quentin Young [Mon, 3 Aug 2020 16:27:28 +0000 (12:27 -0400)]
Merge pull request #6845 from opensourcerouting/foreach-safi-formatting

clang-format: add FOREACH_SAFI to the ForEachMacros list

4 years agoMerge pull request #6781 from chiragshah6/mdev
Renato Westphal [Mon, 3 Aug 2020 15:57:45 +0000 (12:57 -0300)]
Merge pull request #6781 from chiragshah6/mdev

yang: create route-map leafref reference type

4 years agoclang-format: add FOREACH_SAFI to the ForEachMacros list
Renato Westphal [Mon, 3 Aug 2020 15:18:24 +0000 (12:18 -0300)]
clang-format: add FOREACH_SAFI to the ForEachMacros list

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agodoc: Add documentation for the new cli
Donald Sharp [Mon, 3 Aug 2020 14:33:03 +0000 (10:33 -0400)]
doc: Add documentation for the new cli

Document the `show bgp ipv4 uni neighbors 192.168.161.2 bestpath-routes`
command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Add `bestpath-routes` to neighbor command
Donald Sharp [Fri, 31 Jul 2020 16:12:37 +0000 (12:12 -0400)]
bgpd: Add `bestpath-routes` to neighbor command

Add the ability to list the bestpath-routes to the
`show bgp afi safi neighbor X` command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Abstract the header inclusion for show_adj_route
Donald Sharp [Fri, 31 Jul 2020 16:33:59 +0000 (12:33 -0400)]
bgpd: Abstract the header inclusion for show_adj_route

Cut-n-paste code can go away.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6833 from donaldsharp/pcount_selected
Donatas Abraitis [Sat, 1 Aug 2020 10:09:28 +0000 (13:09 +0300)]
Merge pull request #6833 from donaldsharp/pcount_selected

bgpd: Add to neighbor prefix-counts the count of best path selected

4 years agoyang: route-map model description format
Chirag Shah [Wed, 29 Jul 2020 20:03:35 +0000 (13:03 -0700)]
yang: route-map model description format

Added "." at the enf of each description of fields.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoyang: route-map style format
Chirag Shah [Tue, 21 Jul 2020 05:04:28 +0000 (22:04 -0700)]
yang: route-map style format

Align to yanglint format

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoyang: create route-map leafref reference type
Chirag Shah [Tue, 21 Jul 2020 04:47:03 +0000 (21:47 -0700)]
yang: create route-map leafref reference type

Create leafref reference type for route-map name.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agodoc: Add wide option for show bgp commands
Donatas Abraitis [Fri, 31 Jul 2020 19:14:00 +0000 (22:14 +0300)]
doc: Add wide option for show bgp commands

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Add to neighbor prefix-counts the count of best path selected
Donald Sharp [Fri, 31 Jul 2020 14:06:39 +0000 (10:06 -0400)]
bgpd: Add to neighbor prefix-counts the count of best path selected

When we have a prefix that has been selected, note that that
particular flag has been set and give that information to the
end user.

eva# show bgp ipv4 uni neighbors 192.168.161.131 prefix-counts
Prefix counts for 192.168.161.131, IPv4 Unicast
PfxCt: 814246

Counts from RIB table walk:

              Adj-in: 0
              Damped: 0
             Removed: 0
             History: 0
               Stale: 0
               Valid: 814246
             All RIB: 814246
       PfxCt counted: 814246
 PfxCt Best Selected: 0
             Useable: 814246
eva# show bgp ipv4 uni neighbors 192.168.161.2 prefix-counts
Prefix counts for 192.168.161.2, IPv4 Unicast
PfxCt: 814070

Counts from RIB table walk:

              Adj-in: 0
              Damped: 0
             Removed: 0
             History: 0
               Stale: 0
               Valid: 814070
             All RIB: 814070
       PfxCt counted: 814070
 PfxCt Best Selected: 814070
             Useable: 814070

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agonhrpd: ignore zebra updates about our routes being deleted/added
Philippe Guibert [Thu, 5 Mar 2020 14:50:37 +0000 (14:50 +0000)]
nhrpd: ignore zebra updates about our routes being deleted/added

nhrp listens for route entries to be deleted, in case some new routes
impact the current routes installed by nhrp. To prevent from
unconfiguring nhrp shortcut route, just prevent nhrp routes to be
processed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoMerge pull request #6778 from mjstapp/fix_topo_route_scale
Rafael Zalamena [Thu, 30 Jul 2020 20:59:42 +0000 (17:59 -0300)]
Merge pull request #6778 from mjstapp/fix_topo_route_scale

tests: rework route_scale topotest

4 years agoMerge pull request #6824 from liweitianux/patch-1
Donald Sharp [Thu, 30 Jul 2020 18:34:34 +0000 (14:34 -0400)]
Merge pull request #6824 from liweitianux/patch-1

ospfd: Fix Zebra route add message truncation issue

4 years agozebra: fix SA warning, handle return code
Mark Stapp [Tue, 28 Jul 2020 12:30:52 +0000 (08:30 -0400)]
zebra: fix SA warning, handle return code

Handle a return code, resolving an SA warning

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: Avoid top ecmp route_scale test case when memory limited
Mark Stapp [Wed, 29 Jul 2020 20:57:37 +0000 (16:57 -0400)]
tests: Avoid top ecmp route_scale test case when memory limited

Address-sanitizer runs in the CI appear to require more
memory than is available (at present), so skip the top
x32 route_scale testcase when running with <4G of ram.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: rework route_scale topotest
Mark Stapp [Mon, 20 Jul 2020 18:51:16 +0000 (14:51 -0400)]
tests: rework route_scale topotest

Make some changes to the route-scale topotest, in view of
issue #6734. Table-drive the test to eliminate some
repeated code. Assert and fail if a step in the progression
of scale fails. Wait a little longer between checking the show
output - it's costly to generate that output at scale. Add a
memleak testcase.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6825 from kuldeepkash/evpn_type2_tests
Mark Stapp [Thu, 30 Jul 2020 18:09:24 +0000 (14:09 -0400)]
Merge pull request #6825 from kuldeepkash/evpn_type2_tests

tests: Skipping evpn_type5_test_topo1 tests from CI runs

4 years agoospfd: Fix Zebra route add message truncation issue
Aaron LI [Thu, 30 Jul 2020 11:22:34 +0000 (19:22 +0800)]
ospfd: Fix Zebra route add message truncation issue

The `INET_ADDRSTRLEN` is 16 and is only enough to format an IPv4 address.
So when there is a prefix (`/xx`), the debug output may get truncated.
Use `PREFIX2STR_BUFFER` macro instead to fix the issue.

Signed-off-by: Aaron LI <aly@aaronly.me>
4 years agotests: Skipping evpn_type5_test_topo1 tests from CI runs
Kuldeep Kashyap [Thu, 30 Jul 2020 12:12:07 +0000 (12:12 +0000)]
tests: Skipping evpn_type5_test_topo1 tests from CI runs

1. evpn_type5_test_topo1 tests started failing in CI for all Ubuntu 18.04 machine,
which are having kernel version: 5.4.0-42-generic
2. We will enable these tests once issue is found and fixed.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agoMerge pull request #6732 from opensourcerouting/printfrr-prep
Quentin Young [Wed, 29 Jul 2020 18:29:34 +0000 (14:29 -0400)]
Merge pull request #6732 from opensourcerouting/printfrr-prep

*: preparations for printfrr coccinelle run

4 years agoMerge pull request #6769 from opensourcerouting/acl-regress
Donald Sharp [Wed, 29 Jul 2020 13:57:39 +0000 (09:57 -0400)]
Merge pull request #6769 from opensourcerouting/acl-regress

lib,yang: merge cisco/zebra access list styles

4 years agozebra,fpm: serialize zebra table walks
Rafael Zalamena [Fri, 17 Jul 2020 19:15:04 +0000 (16:15 -0300)]
zebra,fpm: serialize zebra table walks

We were not getting any benefits from attempting to walk all tables at the
same time and it made debugging harder, so lets execute one table walk
per time.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agozebra,fpm: fix race on completion detection
Rafael Zalamena [Fri, 17 Jul 2020 14:37:38 +0000 (11:37 -0300)]
zebra,fpm: fix race on completion detection

Zebra runs on a different thread than FPM, so we need to synchronize
them by using events. While here, implement completion detection for all
kinds of walk.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agozebra,fpm: fix input handling
Rafael Zalamena [Fri, 17 Jul 2020 17:37:55 +0000 (14:37 -0300)]
zebra,fpm: fix input handling

Two important fixes:

* `stream_read_try` does a dirty trick and converts the `-1` return to
  `-2` when errno is `EAGAIN`, `EWOULDBLOCK` or `EINTR`.
* Don't enable reads until the connection is complete.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6792 from chiragshah6/pim_dev
David Lamparter [Tue, 28 Jul 2020 13:13:00 +0000 (15:13 +0200)]
Merge pull request #6792 from chiragshah6/pim_dev

*: pim igmp yang registery to appropriate makefile

4 years agoMerge pull request #6787 from toreanderson/master
David Lamparter [Tue, 28 Jul 2020 13:09:15 +0000 (15:09 +0200)]
Merge pull request #6787 from toreanderson/master

tools: do not silently ignore errors when loading config during startup

4 years agoMerge pull request #6758 from chiragshah6/yang_nb6
Russ White [Tue, 28 Jul 2020 11:22:24 +0000 (07:22 -0400)]
Merge pull request #6758 from chiragshah6/yang_nb6

EVPN northbound conversion for vrf l3vni mapping command

4 years agoMerge pull request #6808 from ton31337/fix/dampening_reuse_limit_assert
Russ White [Tue, 28 Jul 2020 10:20:29 +0000 (06:20 -0400)]
Merge pull request #6808 from ton31337/fix/dampening_reuse_limit_assert

bgpd: Bypass SA tests regarding division by zero for reuse_limit in dampening

4 years agoMerge pull request #6806 from donaldsharp/tests_log_monitor
David Lamparter [Mon, 27 Jul 2020 22:15:22 +0000 (00:15 +0200)]
Merge pull request #6806 from donaldsharp/tests_log_monitor

tests: Remove 'log monitor' from tests

4 years agoMerge pull request #6805 from ton31337/fix/dead_code
Rafael Zalamena [Mon, 27 Jul 2020 21:35:20 +0000 (18:35 -0300)]
Merge pull request #6805 from ton31337/fix/dead_code

bgpd: Remove peer_afc_set()

4 years agoMerge pull request #6804 from donaldsharp/remove_cisco_compatability
Rafael Zalamena [Mon, 27 Jul 2020 20:15:02 +0000 (17:15 -0300)]
Merge pull request #6804 from donaldsharp/remove_cisco_compatability

doc: Remove `Cisco Compatability` section

4 years agobgpd: Bypass SA tests regarding division by zero for reuse_limit in dampening
Donatas Abraitis [Mon, 27 Jul 2020 17:38:42 +0000 (20:38 +0300)]
bgpd: Bypass SA tests regarding division by zero for reuse_limit in dampening

reuse_limit can't be zero basically, Coverity just does not know how the
value comes in.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6765 from mjstapp/backup_nhg_netlink
Renato Westphal [Mon, 27 Jul 2020 15:49:36 +0000 (12:49 -0300)]
Merge pull request #6765 from mjstapp/backup_nhg_netlink

lib,zebra: support multiple backup nexthops

4 years agotests: Remove 'log monitor' from tests
Donald Sharp [Mon, 27 Jul 2020 15:09:16 +0000 (11:09 -0400)]
tests: Remove 'log monitor' from tests

The `log monitor' command is a no-op and actually
outputs a `this doesn't do anything` warning.  Let's remove
this cli line from our tests as that don't do anything and
people will look at these configs for guidance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6803 from donaldsharp/coverity_moo_moo
Donatas Abraitis [Mon, 27 Jul 2020 14:20:51 +0000 (17:20 +0300)]
Merge pull request #6803 from donaldsharp/coverity_moo_moo

Coverity code cleanup

4 years agobgpd: Remove peer_afc_set()
Donatas Abraitis [Mon, 27 Jul 2020 14:16:32 +0000 (17:16 +0300)]
bgpd: Remove peer_afc_set()

Dead code.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6662 from kuldeepkash/evpn_type2_tests
Mark Stapp [Mon, 27 Jul 2020 12:16:31 +0000 (08:16 -0400)]
Merge pull request #6662 from kuldeepkash/evpn_type2_tests

tests: Adding test suites evpn_type5_test_topo1

4 years agodoc: Remove `Cisco Compatability` section
Donald Sharp [Mon, 27 Jul 2020 11:57:13 +0000 (07:57 -0400)]
doc: Remove `Cisco Compatability` section

This code was deprecated in 5.0 and removed after a year.
It has not been in the code base and we forgot to update the
doc.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Deref after null check in bgp_evpn_vty.c
Donald Sharp [Mon, 27 Jul 2020 11:10:41 +0000 (07:10 -0400)]
bgpd: Deref after null check in bgp_evpn_vty.c

Coverity has noticed that we are using bgp_evpn after
we have already NULL checked it one time.  Add an assert
to make Coverity happy here, if we get to this point
something terrible has happened.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Prevent Null pointer usage
Donald Sharp [Mon, 27 Jul 2020 10:59:45 +0000 (06:59 -0400)]
bgpd: Prevent Null pointer usage

Coverity rightly points out that bgp_table_top might return
NULL and immediately deref'ing it might be a problem.
Add a bit of safety.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Comment out dead code for future
Donald Sharp [Mon, 27 Jul 2020 10:54:23 +0000 (06:54 -0400)]
bgpd: Comment out dead code for future

I wanted to preserve the old code flow to see what might
be needed in the future in commit:
23ca3269da5f9d898cb54d42c560d519b9cb9915

Coverity doesn't like dead code.  So let's comment it out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6802 from donaldsharp/various
Donatas Abraitis [Mon, 27 Jul 2020 07:36:24 +0000 (10:36 +0300)]
Merge pull request #6802 from donaldsharp/various

Various