]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agobgpd: yang defination 5702/head
vdhingra [Wed, 27 May 2020 08:30:34 +0000 (01:30 -0700)]
bgpd: yang defination

Yang files for bgpd to use northbound APIs

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: vishaldhingra <vdhingra@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
4 years agoMerge pull request #6755 from xThaid/dplane_batching
Donald Sharp [Tue, 11 Aug 2020 17:59:12 +0000 (13:59 -0400)]
Merge pull request #6755 from xThaid/dplane_batching

zebra: dataplane batching

4 years agoMerge pull request #6885 from GalaxyGorilla/ospf_sr_ri_fix
Donald Sharp [Tue, 11 Aug 2020 17:13:28 +0000 (13:13 -0400)]
Merge pull request #6885 from GalaxyGorilla/ospf_sr_ri_fix

ospfd: fix processing of SR RI LSAs

4 years agoMerge pull request #6894 from mjstapp/fix_sa_vxlan
Donald Sharp [Tue, 11 Aug 2020 17:12:08 +0000 (13:12 -0400)]
Merge pull request #6894 from mjstapp/fix_sa_vxlan

zebra: clean up SA warning in vxlan code

4 years agoMerge pull request #6893 from DmitriyEshenko/dmvpn-example
Donald Sharp [Tue, 11 Aug 2020 17:05:24 +0000 (13:05 -0400)]
Merge pull request #6893 from DmitriyEshenko/dmvpn-example

docs: Add dmvpn example

4 years agoMerge pull request #6870 from donaldsharp/test_fixups
Mark Stapp [Tue, 11 Aug 2020 16:40:52 +0000 (12:40 -0400)]
Merge pull request #6870 from donaldsharp/test_fixups

Test fixups

4 years agoMerge pull request #6801 from ton31337/feature/force_maximum-prefix_for_filtered_routes
Russ White [Tue, 11 Aug 2020 15:52:05 +0000 (11:52 -0400)]
Merge pull request #6801 from ton31337/feature/force_maximum-prefix_for_filtered_routes

bgpd: Add a knob to force maximum-prefix even for filtered routes

4 years agozebra: clean up SA warning in vxlan code 6894/head
Mark Stapp [Tue, 11 Aug 2020 12:39:25 +0000 (08:39 -0400)]
zebra: clean up SA warning in vxlan code

Resolve an SA warning in the vxlan code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodocs: Add dmvpn example 6893/head
DmitriyEshenko [Mon, 10 Aug 2020 19:45:50 +0000 (22:45 +0300)]
docs: Add dmvpn example

Signed-off-by: Dmitriy Eshenko <dmitriy.eshenko@vyos.io>
4 years agoMerge pull request #6888 from qlyoung/doc-ebgp-mulithop
Donald Sharp [Tue, 11 Aug 2020 12:20:11 +0000 (08:20 -0400)]
Merge pull request #6888 from qlyoung/doc-ebgp-mulithop

doc: document effect of ebgp-multihop

4 years agoMerge pull request #6886 from opensourcerouting/grpc-doc
Quentin Young [Mon, 10 Aug 2020 20:53:48 +0000 (16:53 -0400)]
Merge pull request #6886 from opensourcerouting/grpc-doc

doc: initial documentation for gRPC

4 years agodoc: add documentation for the dataplane batching 6755/head
Jakub Urbańczyk [Mon, 10 Aug 2020 18:34:31 +0000 (20:34 +0200)]
doc: add documentation for the dataplane batching

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agotests: zebra netlink testcases
Jakub Urbańczyk [Mon, 3 Aug 2020 18:23:56 +0000 (20:23 +0200)]
tests: zebra netlink testcases

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: design changes in netlink batching code
Jakub Urbańczyk [Mon, 3 Aug 2020 14:51:56 +0000 (16:51 +0200)]
zebra: design changes in netlink batching code

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: remove old kernel one-update-at-a-time api
Jakub Urbańczyk [Thu, 30 Jul 2020 22:15:51 +0000 (00:15 +0200)]
zebra: remove old kernel one-update-at-a-time api

The old one is replaced by the api that is suitable for the batching.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: netlink message batching
Jakub Urbańczyk [Wed, 15 Jul 2020 13:14:08 +0000 (15:14 +0200)]
zebra: netlink message batching

Integrate existing functions with batching infrastructure.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agoMerge pull request #6887 from donaldsharp/pim_sec_addr_fixup
Jafar Al-Gharaibeh [Mon, 10 Aug 2020 19:40:57 +0000 (14:40 -0500)]
Merge pull request #6887 from donaldsharp/pim_sec_addr_fixup

pimd: Allow multiple secondary addresses to work

4 years agodoc: initial documentation for gRPC 6886/head
Rafael Zalamena [Sun, 9 Aug 2020 21:04:30 +0000 (18:04 -0300)]
doc: initial documentation for gRPC

Give the FRR users some examples of gRPC usage in scripts to let them
start experimenting with the new configuration interface provided by
YANG/northbound.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: document effect of ebgp-multihop 6888/head
Quentin Young [Mon, 10 Aug 2020 19:32:38 +0000 (15:32 -0400)]
doc: document effect of ebgp-multihop

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agozebra: add netlink message batching infrastructure
Jakub Urbańczyk [Wed, 15 Jul 2020 13:13:18 +0000 (15:13 +0200)]
zebra: add netlink message batching infrastructure

Add helpers to batch several messages into one single netlink datagram.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: remove "PENDING" dplane request state
Jakub Urbańczyk [Wed, 15 Jul 2020 13:12:22 +0000 (15:12 +0200)]
zebra: remove "PENDING" dplane request state

This request state is redundant with new message batching interface.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agozebra: prepare dplane for batching
Jakub Urbańczyk [Wed, 15 Jul 2020 13:11:21 +0000 (15:11 +0200)]
zebra: prepare dplane for batching

Extend kernel interface to allow the data plane to send many kernel
updates at once.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agoMerge pull request #6783 from opensourcerouting/feature/sr-te
Russ White [Mon, 10 Aug 2020 19:31:35 +0000 (15:31 -0400)]
Merge pull request #6783 from opensourcerouting/feature/sr-te

lib, zebra: Add SR-TE policy infrastructure to zebra

4 years agopimd: Allow multiple secondary addresses to work 6887/head
Donald Sharp [Mon, 10 Aug 2020 14:32:17 +0000 (10:32 -0400)]
pimd: Allow multiple secondary addresses to work

Suppose you have more than 2 addresses on a pim interface:
lo              up      default         10.255.0.1/32
                                        10.255.0.101/32
                                        10.255.0.254/32

A `show ip pim int lo` gives us this:

eva# show ip pim interface lo
Interface  : lo
State      : up
Address    : 10.255.0.1 (primary)
             10.255.0.101/32

When we go look at the code that pulls secondary addresses in
we are using a prefix_cmp to know if we know about a secondary already
but were expecting true values instead of -1/0/1 being returned.

Modify code so that pim sees all secondary addresses

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoospfd: fix processing of SR RI LSAs 6885/head
GalaxyGorilla [Mon, 10 Aug 2020 10:25:16 +0000 (10:25 +0000)]
ospfd: fix processing of SR RI LSAs

Router Information are contained in opaque LSAs and when such a LSA
is received a new SR node for the advertising router is created.

However, the RI related data is currently not set when such a SR node
already exists. This can happen when e.g. link and prefix information
arrive before the RI and therefore an SR node is created.

This is now fixed by setting the data everytime the RI is received,
independent of the SR node already existing or not.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agoMerge pull request #6483 from sylane/router-id-v6
Donald Sharp [Mon, 10 Aug 2020 12:39:51 +0000 (08:39 -0400)]
Merge pull request #6483 from sylane/router-id-v6

zebra: add IPv6 router-id

4 years agoMerge pull request #6877 from opensourcerouting/misc-docstring-fix
Donatas Abraitis [Sun, 9 Aug 2020 18:49:03 +0000 (21:49 +0300)]
Merge pull request #6877 from opensourcerouting/misc-docstring-fix

bgpd,lib: add missing doc strings

4 years agoMerge pull request #6879 from LabNConsulting/working/lb/valgrind-supp-libyang
Donald Sharp [Sun, 9 Aug 2020 00:15:16 +0000 (20:15 -0400)]
Merge pull request #6879 from LabNConsulting/working/lb/valgrind-supp-libyang

bgpd: suppress new libyang_1.0 related loss reports

4 years agobgpd: suppress new libyang_1.0 related loss reports 6879/head
Lou Berger [Sat, 8 Aug 2020 21:56:18 +0000 (17:56 -0400)]
bgpd: suppress new libyang_1.0 related loss reports

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agolib: fix missing doc string in route map 6877/head
Rafael Zalamena [Fri, 7 Aug 2020 17:37:02 +0000 (14:37 -0300)]
lib: fix missing doc string in route map

Add the missing route map doc string for call command.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobgpd: fix missing doc string in evpn
Rafael Zalamena [Fri, 7 Aug 2020 17:32:58 +0000 (14:32 -0300)]
bgpd: fix missing doc string in evpn

Add the missing EVPN doc string in the show command.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6875 from opensourcerouting/bgpd-fsm-legacy-cleanup
Donald Sharp [Fri, 7 Aug 2020 16:44:48 +0000 (12:44 -0400)]
Merge pull request #6875 from opensourcerouting/bgpd-fsm-legacy-cleanup

bgpd: fsm legacy thread reset cleanup

4 years agoMerge pull request #6517 from vishaldhingra/submodule
Donald Sharp [Fri, 7 Aug 2020 15:09:25 +0000 (11:09 -0400)]
Merge pull request #6517 from vishaldhingra/submodule

lib: Add support to load submodules in embedded modules framework

4 years agoMerge pull request #6872 from vincentbernat/fix/bgp4mib-vrf
Donatas Abraitis [Fri, 7 Aug 2020 15:04:47 +0000 (18:04 +0300)]
Merge pull request #6872 from vincentbernat/fix/bgp4mib-vrf

bgpd: implement bgpPeerTable accross VRFs

4 years agobgpd: fsm legacy thread reset cleanup 6875/head
David Schweizer [Thu, 6 Aug 2020 14:58:45 +0000 (16:58 +0200)]
bgpd: fsm legacy thread reset cleanup

* Removed old timer thread resets, since this has been taken care of
  after execution of the threads by the thread_fetch function in
  lib/thread.c for quite some time now.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
4 years agolib, zebra: Add SR-TE policy infrastructure to zebra 6783/head
Sebastien Merle [Mon, 20 Jul 2020 11:43:54 +0000 (13:43 +0200)]
lib, zebra: Add SR-TE policy infrastructure to zebra

For the sake of Segment Routing (SR) and Traffic Engineering (TE)
Policies there's a need for additional infrastructure within zebra.
The infrastructure in this PR is supposed to manage such policies
in terms of installing binding SIDs and LSPs. Also it is capable of
managing MPLS labels using the label manager, keeping track of
nexthops (for resolving labels) and notifying interested parties about
changes of a policy/LSP state. Further it enables a route map mechanism
for BGP and SR-TE colors such that learned BGP routes can be mapped
onto SR-TE Policies.

This PR does not introduce any usable features by now, it is just
infrastructure for other upcoming PRs which will introduce 'pathd',
a new SR-TE daemon.

Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agolib: add possibility to search non-recursively for NB node entries
GalaxyGorilla [Tue, 10 Mar 2020 09:30:20 +0000 (09:30 +0000)]
lib: add possibility to search non-recursively for NB node entries

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agozebra: Fix selection of label chunks in label manager
GalaxyGorilla [Thu, 27 Feb 2020 12:57:13 +0000 (12:57 +0000)]
zebra: Fix selection of label chunks in label manager

For allocating a new label range the label manager will loop
the existing label chunks and compare the start and end labels
with the label range in question. In case a label range should
be re-allocated to the existing label chunk, the end label
of the chunk is not honored correctly, e.g. the new label
range has to be a true subset of the existing label chunk.

This is very easy reproducable by re-allocating a single label.
e.g. a label range of size 1.

This problem is fixed by allowing the mentioned 'end' labels to
be equal.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agolib: add generic struct ipaddr comparison function
Sebastien Merle [Wed, 11 Dec 2019 15:40:39 +0000 (16:40 +0100)]
lib: add generic struct ipaddr comparison function

Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agoMerge pull request #6616 from mobash-rasool/yang-fix
Renato Westphal [Thu, 6 Aug 2020 22:07:56 +0000 (19:07 -0300)]
Merge pull request #6616 from mobash-rasool/yang-fix

ospfd: YANG Model definition for OSPFv2

4 years agotests: `no learning` is not accepted 6870/head
Donald Sharp [Thu, 30 Jul 2020 13:43:42 +0000 (09:43 -0400)]
tests: `no learning` is not accepted

The vxlan `ip... ` command is failing because we are passing in
`no learning` and that is failing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Add some small clues to what dut is having the issue
Donald Sharp [Thu, 30 Jul 2020 13:42:52 +0000 (09:42 -0400)]
tests: Add some small clues to what dut is having the issue

Add a bit of a clue to the test_evpn_type5_topo1.py script
to what dut is failing, when things go south.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Fix off by one error in no vni command
Donald Sharp [Thu, 6 Aug 2020 12:29:34 +0000 (08:29 -0400)]
zebra: Fix off by one error in no vni command

Commit: e2bcfa3946aadc62af53cf53ff8d2f9fe7e5bab1

Introduced a off by one error in the `no vni XXX` command:
@@ -2337,12 +2336,10 @@ DEFUN (no_vrf_vni_mapping,
        "VNI-ID\n"
        "prefix-routes-only\n")
 {
-       int ret = 0;
        int filter = 0;
-       char err[ERR_STR_SZ];
-       vni_t vni = strtoul(argv[2]->arg, NULL, 10);

        ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+       vni_t vni = strtoul(argv[1]->arg, NULL, 10);

        assert(vrf);
        assert(zvrf);

Fix it.

Fixes: #6867
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6873 from mjstapp/fix_topo_retry_sigterm
Donald Sharp [Thu, 6 Aug 2020 20:28:25 +0000 (16:28 -0400)]
Merge pull request #6873 from mjstapp/fix_topo_retry_sigterm

tests: stop daemons consistently in mem leak path

4 years agoMerge pull request #6587 from AnuradhaKaruppiah/evpn-mh-pr-1
Rafael Zalamena [Thu, 6 Aug 2020 19:49:14 +0000 (19:49 +0000)]
Merge pull request #6587 from AnuradhaKaruppiah/evpn-mh-pr-1

EVPN Multihoming part-1

4 years agobgpd: implement bgpPeerTable accross VRFs 6872/head
Vincent Bernat [Thu, 6 Aug 2020 15:23:06 +0000 (17:23 +0200)]
bgpd: implement bgpPeerTable accross VRFs

Currently, bgpPeerTable only looks the default BGP instance. Most
vendors return all the available peers in this table. This commit
exposes all BGP instances.

The other tables are unchanged as it doesn't make sense to expose
routes from random VRFs into a single table. Vendors are using SNMP
contexts for that but we don't have support for it. Therefore, do
nothing.

Fix #6077

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
4 years agotests: stop daemons consistently in mem leak path 6873/head
Mark Stapp [Thu, 6 Aug 2020 15:47:12 +0000 (11:47 -0400)]
tests: stop daemons consistently in mem leak path

When the topotest mem-leak reporting is enabled, use the same
two-step daemon stop procedure that's used in
the topogen.stop_topology path.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoospfd: YANG Model definition for OSPFv2 6616/head
Mobashshera Rasool [Fri, 19 Jun 2020 09:05:49 +0000 (09:05 +0000)]
ospfd: YANG Model definition for OSPFv2

Initial version of OSPF configuration Yang.

Raised new PR with review comment fixes on top of PR
https://github.com/FRRouting/frr/pull/6055

Revision History:
1. Fixed review comments.
2. Removed ospf list with id as key, name can be used as key
3. Corrected the alignment

Co-authored-by : Santosh P K <sapk@vmware.com>
Co-authored-by : Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
4 years agoMerge pull request #6871 from CHKDSK88/doc_openwrt
Donald Sharp [Thu, 6 Aug 2020 13:51:03 +0000 (09:51 -0400)]
Merge pull request #6871 from CHKDSK88/doc_openwrt

doc: Update instructions for building for OpenWrt

4 years agoMerge pull request #6854 from mjstapp/sharp_lsp_update
Donald Sharp [Thu, 6 Aug 2020 13:43:12 +0000 (09:43 -0400)]
Merge pull request #6854 from mjstapp/sharp_lsp_update

sharpd: support 'update lsp' zapi testing

4 years agoMerge pull request #6859 from mjstapp/fix_dplane_sa_again
Donald Sharp [Thu, 6 Aug 2020 13:42:33 +0000 (09:42 -0400)]
Merge pull request #6859 from mjstapp/fix_dplane_sa_again

zebra: fix coverity SA warning in dataplane

4 years agodoc: Update instructions for building for OpenWrt 6871/head
Pawel Dembicki [Thu, 6 Aug 2020 12:32:38 +0000 (14:32 +0200)]
doc: Update instructions for building for OpenWrt

Frr was added to official OpenWrt repo. No need to use
unofficial sources from Github PR.

Signed-off-by: Pawel Dembicki <p.dembicki@wb.com.pl>
4 years agoMerge pull request #6866 from chiragshah6/mdev
Renato Westphal [Thu, 6 Aug 2020 00:00:24 +0000 (21:00 -0300)]
Merge pull request #6866 from chiragshah6/mdev

lib: yang afi-safi identityref translation

4 years agoMerge pull request #6864 from volta-networks/fix_ldp_oc_withdraw
Renato Westphal [Wed, 5 Aug 2020 23:59:22 +0000 (20:59 -0300)]
Merge pull request #6864 from volta-networks/fix_ldp_oc_withdraw

ldpd: ldp-oc withdraw fix

4 years agolib: yang afi-safi identityref translation 6866/head
Chirag Shah [Wed, 5 Aug 2020 21:38:49 +0000 (14:38 -0700)]
lib: yang afi-safi identityref translation

Add more afi safis in conversion to-from string
to indentityref.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoldpd: ldp-oc withdraw fix 6864/head
lynne [Wed, 5 Aug 2020 19:22:08 +0000 (15:22 -0400)]
ldpd: ldp-oc withdraw fix

When LDP is configured in Order Control mode and we receive a
label withdraw message, we should only resend label withdraws to
peers that are the NH for that fec being withdrawn.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoMerge pull request #6847 from donaldsharp/time_to_rerun
Donatas Abraitis [Wed, 5 Aug 2020 14:34:46 +0000 (17:34 +0300)]
Merge pull request #6847 from donaldsharp/time_to_rerun

Time to rerun

4 years agoMerge pull request #6850 from mobash-rasool/pim-fixes
Donald Sharp [Wed, 5 Aug 2020 14:03:50 +0000 (10:03 -0400)]
Merge pull request #6850 from mobash-rasool/pim-fixes

pimd: crash fix when RP is removed

4 years agotopotests: initial set of tests for evpn multihoming 6587/head
Anuradha Karuppiah [Thu, 16 Jul 2020 21:09:03 +0000 (14:09 -0700)]
topotests: initial set of tests for evpn multihoming

The base topology is a two level CLOS with two racks. There are
two PEs/TORs in each rack that provide active-active redundancy to
two dual-attached servers in the rack. And EVPN-PIM is used for
flooded traffic.
Reference: evpn-mh-topo-tests.pdf

Tests have been added for the following functionality -
1. ES management
2. EAD/Type-1 route handling
3. Type-2 route with non-zero ESI
4. MAC sync and remote MAC (with remote-ES destination) handling

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: add ESI to the "show evpn mac vni <> mac <> json" output
Anuradha Karuppiah [Mon, 20 Jul 2020 15:37:46 +0000 (08:37 -0700)]
zebra: add ESI to the "show evpn mac vni <> mac <> json" output

Sample output -
=============
anuradhak-VirtualBox# anuradhak-VirtualBox# show evpn mac vni 1000 mac 00:00:00:00:00:22 json

{
  "00:00:00:00:00:22":{
    "type":"remote",
    "remoteVtep":"0.0.0.0",
    "localSequence":0,
    "remoteSequence":0,
    "detectionCount":0,
    "isDuplicate":false,
    "syncNeighCount":0,
    "esi":"03:44:38:39:ff:ff:02:00:00:02", >>>>>>>>>>>>>>>>
    "neighbors":"none"
  }
}

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd, lib: move EVPN route type def to lib and use it in the prefix macros
Anuradha Karuppiah [Tue, 14 Jul 2020 01:21:27 +0000 (18:21 -0700)]
bgpd, lib: move EVPN route type def to lib and use it in the prefix macros

Use route names instead of route type number in the EVPN prefix
macros.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd, zebra: remove strcpy, strlen and sprintf calls
Anuradha Karuppiah [Tue, 16 Jun 2020 00:24:39 +0000 (17:24 -0700)]
bgpd, zebra: remove strcpy, strlen and sprintf calls

Replace with safe copy functions - strlcpy, strlcat, strnlen and
snprintf.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: remove linux/ifbridge.h from rt_netlink.c
Anuradha Karuppiah [Fri, 17 Apr 2020 18:37:42 +0000 (11:37 -0700)]
zebra: remove linux/ifbridge.h from rt_netlink.c

It is causing build failures because of conflicts with netinet.
Instead I have re-defined the MAC-SYNC UAPIs in the re_netlink.c

This is clearly a hack that needs to be re-visited.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: support for MAC-IP sync routes
Anuradha Karuppiah [Sun, 29 Mar 2020 15:43:55 +0000 (08:43 -0700)]
zebra: support for MAC-IP sync routes

MAC-IP routes are used for syncing local entries across redundant
switches in an EVPN-MH setup. A path from a peer that has a local
ES as destination is tagged as a SYNC path. The SYNC path results in the
addition of local MAC and/or local neigh entry in zebra and in the
dataplane.

Implementation overview
=======================
1. Three new flags "local-inactive", "peer-active" and "peer-proxy"
are maintained per-local-MAC and per-local-Neigh entry.
2. The "peer-XXX" flags are set and cleared via SYNC path updates
from BGP. Proxy sync paths result in the setting of "peer-proxy" flag
(and non-proxies result in the "peer-active").
3. A neigh entry that has a "peer-XXX" flag set is programmed as
"static" in the dataplane.
4. A MAC entry that has a "peer-XXX" flag set or is referenced by
a sync-neigh entry (that has a "peer-XXX" flags set) is programmed
as "static" in the dataplane.
5. The sync-seq number is used to normalize the MM seq number across
all the redundant switches i.e. the max MM seq number across all
switches is used by each of the switches. This commit also includes
the changes needed for extended MM seq syncing.
6. A MAC/neigh entry has to be local-active or peer-active to sent to
BGP. An entry that is NOT local-active is sent with the proxy flag (so
BGP can "proxy" advertise it).
7. The "peer-active" flag is aged out by zebra by using a hold_timer
(this is instead of being abruptly dropped on SYNC path delete). This
age-out is needed to handle peer-switch restart (procedures are specified
in draft-rbickhart-evpn-ip-mac-proxy-adv). The holdtime needs to be
sufficiently long to allow an external neighmgr daemon or the dataplane
component to independently probe and establish local reachability of a
host. The MAC and neigh hold time values are configurable.
PS: In the future this probing may happen in FRR itself.

CLI changes to display sync info
================================
MAC
===
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-11:mgmt:~# net show evpn mac vni 1000
Number of MACs (local and remote) known for this VNI: 6
Flags: N=sync-neighs, I=local-inactive, P=peer-active, X=peer-proxy
MAC               Type   Flags Intf/Remote ES/VTEP            VLAN  Seq #'s
00:02:00:00:00:25 local        vlan1000                       1000  0/0
02:02:00:00:00:02 local  PI    hostbond1                      1000  0/0
02:02:00:00:00:06 remote       03:00:00:00:00:02:11:00:00:01        0/0
02:02:00:00:00:01 local  X     hostbond1                      1000  0/0
00:00:00:00:00:11 local  PI    hostbond1                      1000  0/0
02:02:00:00:00:05 remote       03:00:00:00:00:02:11:00:00:01        0/0
root@torm-11:mgmt:~#
root@torm-11:mgmt:~# net show evpn mac vni 1000 mac 00:00:00:00:00:11
MAC: 00:00:00:00:00:11
 ESI: 03:00:00:00:00:01:11:00:00:01
 Intf: hostbond1(58) VLAN: 1000
 Sync-info: neigh#: 0 local-inactive peer-active >>>>>>>>>>>>
 Local Seq: 0 Remote Seq: 0
 Neighbors:
    No Neighbors
root@torm-11:mgmt:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
neigh
=====
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-11:mgmt:~# net show evpn arp vni 1003
Number of ARPs (local and remote) known for this VNI: 4
Flags: I=local-inactive, P=peer-active, X=peer-proxy
Neighbor             Type   Flags State    MAC               Remote ES/VTEP                 Seq #'s
2001:fee1:0:3::6     local        active   00:02:00:00:00:25                                0/0
45.0.3.66            local  P     active   00:02:00:00:00:66                                0/0
45.0.3.6             local        active   00:02:00:00:00:25                                0/0
fe80::202:ff:fe00:25 local        active   00:02:00:00:00:25                                0/0
root@torm-11:mgmt:~#
root@torm-11:mgmt:~# net show evpn arp vni 1003 ip 45.0.3.66
IP: 45.0.3.66
 Type: local
 State: active
 MAC: 00:02:00:00:00:66
 Sync-info: peer-active >>>>>>>>>>>>>>>>
 Local Seq: 0 Remote Seq: 0
root@torm-11:mgmt:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
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 agopimd: crash fix when RP is removed 6850/head
Mobashshera Rasool [Tue, 4 Aug 2020 06:24:29 +0000 (06:24 +0000)]
pimd: crash fix when RP is removed

pimd crash at pim_msg_build_jp_groups (
grp=grp@entry=0x7ffca55b5d1e, sgs=sgs@entry=0x17821a0, size=20)
 at pimd/pim_msg.c:198

Fix for https://github.com/FRRouting/frr/issues/6849

Root Cause:
===========
pimd has crashed because pim_upstream_rpf_clear function sets the
up->rpf.source_nexthop.interface pointer to NULL and has not removed
the upstream source node from the neighbor. When the upstream gets
deleted the source is not removed from neighbor
neigh->upstream_jp_agg->groups->sources list. This source node has
pointer to upstream freed memory. Hence when on_neighbor_jp_timer expires,
it tries to access the upstream pointer and crashed.

Fix:
====
Before setting the interface pointer to NULL, remove the node from
neigh->upstream_jp_agg->groups->sources list. Also the upstream state
has to be changed to Not joined.

Removed extra line changes.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
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 6861/head
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 6860/head
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>