]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agozebra: Route entries use nexthop entry ID's instead of pointers
Stephen Worley [Fri, 8 Mar 2019 15:16:52 +0000 (10:16 -0500)]
zebra: Route entries use nexthop entry ID's instead of pointers

Switched the route entries to use ID's instead of pointers.
Perform lookups with the ID and then check if its null.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add dataplane process result function for nexthops
Stephen Worley [Thu, 7 Mar 2019 23:15:30 +0000 (18:15 -0500)]
zebra: Add dataplane process result function for nexthops

Add a function that can handle the results of a dataplane
ctx status, dpending on the operation performed.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add functions for installing/uninstalling nexthops
Stephen Worley [Thu, 7 Mar 2019 23:11:57 +0000 (18:11 -0500)]
zebra: Add functions for installing/uninstalling nexthops

Add functions for sending a nexthop to be queued on the dataplane
for install/uninstall into the kernel.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Force re-install nexthop if still referenced
Stephen Worley [Wed, 6 Mar 2019 20:04:23 +0000 (15:04 -0500)]
zebra: Force re-install nexthop if still referenced

Added functionality so that when we receive a RTM_DELNEXTHOP
for a nhg_hash_entry that is still being referenced by
a route, we immediately push it back to the kernel.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add function to install a nhe into the kernel
Stephen Worley [Wed, 6 Mar 2019 19:58:57 +0000 (14:58 -0500)]
zebra: Add function to install a nhe into the kernel

Add a function for installing Nexthop Group hash entires into
the kernel. It sends the entry to the dataplane and does any
post-processing immediately after that.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add a queued flag to nhg_hash_entry
Stephen Worley [Wed, 6 Mar 2019 19:56:04 +0000 (14:56 -0500)]
zebra: Add a queued flag to nhg_hash_entry

Added a NEXTHOP_GROUP_QUEUED flag to the nexthop
group hash entry struct. This indicates when we have
sent it to be installed to the kernel and are waiting
for the dataplane provider to process it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Return proper status result
Stephen Worley [Wed, 6 Mar 2019 19:10:08 +0000 (14:10 -0500)]
zebra: Return proper status result

We were ignoring the status result interger from
the netlink request and message parsing and just
returning 0. Fixed this to return the result of the last one.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add kernel condition check to see if it supports nexthops
Stephen Worley [Wed, 6 Mar 2019 19:08:13 +0000 (14:08 -0500)]
zebra: Add kernel condition check to see if it supports nexthops

Added a check on startup for determining if the kernel supports
nexthop objects. It sets an appropriate bool on the zebra namespace
struct.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Use the dest prefix for determining nexthop family
Stephen Worley [Wed, 6 Mar 2019 18:43:40 +0000 (13:43 -0500)]
zebra: Use the dest prefix for determining nexthop family

Device only nexthops still need an address family associated
with them. Decided to get this from the destination prefix on it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add debug statement for nexthop netlink messages
Stephen Worley [Wed, 6 Mar 2019 18:42:05 +0000 (13:42 -0500)]
zebra: Add debug statement for nexthop netlink messages

Add the zebra kernel debug statement for nexthop messages
so we can see them via vtysh.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add namespace info to the nexthop dataplane ctx
Stephen Worley [Wed, 6 Mar 2019 18:35:31 +0000 (13:35 -0500)]
zebra: Add namespace info to the nexthop dataplane ctx

The nexthop dataplane context was not getting populated with
namespace info for its netlink messages. Fixed this to do
lookups the same way we do it with route contexts.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add kernel debugging function for netlink nexthop messages
Stephen Worley [Wed, 6 Mar 2019 16:13:43 +0000 (11:13 -0500)]
zebra: Add kernel debugging function for netlink nexthop messages

We needed a kernel debugging function for netlink nexthop
messages when people are debugging kernel zebra messages.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add base functionality for nexthop processing via the dataplane
Stephen Worley [Fri, 1 Mar 2019 22:17:00 +0000 (17:17 -0500)]
zebra: Add base functionality for nexthop processing via the dataplane

Add all the neccessary code to allow nexthops to be processed
in separate dataplane contexts with the netlink dataplane kernel
provider.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add an error code for NHG update failures
Stephen Worley [Mon, 4 Mar 2019 16:25:42 +0000 (11:25 -0500)]
zebra: Add an error code for NHG update failures

We needed an error code that can be used when we
fail to install a nexthop group into the kernel/fib.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add flags to nexthops received from the kernel
Stephen Worley [Mon, 4 Mar 2019 16:54:44 +0000 (11:54 -0500)]
zebra: Add flags to nexthops received from the kernel

Added the appropriate flags that need to be set when
we receive a nexthop from the kernel. They should be
marked as ACTIVE and that they are in the FIB.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add functionality to parse RTM_NEWNEXTHOP and RTM_DELNEXTHOP messages
Stephen Worley [Mon, 25 Feb 2019 23:18:07 +0000 (18:18 -0500)]
zebra: Add functionality to parse RTM_NEWNEXTHOP and RTM_DELNEXTHOP messages

Add the functionality to parse new nexthop group messages
from the kernel and insert them into the appropriate hash
tables. Parsing is done at startup between interface and
interface address lookup. Add functionality to parse
changes to nexthops we already have. Add functionality
to parse delete nexthop messages from the kernel and
remove them from our table.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Remove afi field in nexthop hash entry
Stephen Worley [Mon, 25 Feb 2019 22:59:28 +0000 (17:59 -0500)]
zebra: Remove afi field in nexthop hash entry

I do not believe we should be hashing based on AFI
in for our upper level nexthop group entries. These
should be ambiguous with regards to  address families since
an ipv4 or ipv6 address can have the same interface
nexthop. This can be seen in NEXTHOP_TYPE_IFINDEX.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add error code for duplicate nexthops
Stephen Worley [Mon, 25 Feb 2019 18:58:32 +0000 (13:58 -0500)]
zebra: Add error code for duplicate nexthops

Add an error code that indicates we received a nexthop
from the kernel that is identical to one it/we already
have other than its ID.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add beginnings of nexthop group work queue
Donald Sharp [Tue, 26 Feb 2019 13:43:49 +0000 (08:43 -0500)]
zebra: Add beginnings of nexthop group work queue

Add the basic infrastructure for a nexthop group work queue.

This queue will be used to validate and then install the
new nexthop group.

The result from the kernel when a new nexthop group is installed
will cause the route entries that depend on it to be installed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add a nhe pointer to the route entry
Donald Sharp [Tue, 26 Feb 2019 13:16:11 +0000 (08:16 -0500)]
zebra: Add a nhe pointer to the route entry

Add a nexthop hash entry to the route_entry so that we can
track the nhe with the route entry.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add error codes for nhg table insert failures
Stephen Worley [Fri, 22 Feb 2019 19:12:46 +0000 (14:12 -0500)]
zebra: Add error codes for nhg table insert failures

Since we are using two different tables to hash the next groups with,
lets add an error message in case there is a failure to insert into
one of them. This will help to notify if the tables are not synced.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add a second table for indexing by ID
Stephen Worley [Fri, 15 Feb 2019 18:18:48 +0000 (13:18 -0500)]
zebra: Add a second table for indexing by ID

The messages we get from the kernel come with ids only
for groups, so lets index with those as well. Also adding
a helper function for lookup and get with the two different
tables.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Separate interface address lookup
Stephen Worley [Fri, 15 Feb 2019 17:28:56 +0000 (12:28 -0500)]
zebra: Separate interface address lookup

Separate interface lookup into its own function.
We need to know interfaces for reading in nexthop
information, but we need to know nexthops for reading
in the interface addresses. We will read in nexthops
between the two.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add error code for bad nhg messages from the kernel
Stephen Worley [Thu, 14 Feb 2019 22:42:25 +0000 (17:42 -0500)]
zebra: Add error code for bad nhg messages from the kernel

Needed an error code for nhg messages from the kernel.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Remove nexthop_active_num from route entry
Donald Sharp [Fri, 15 Feb 2019 16:39:12 +0000 (11:39 -0500)]
zebra: Remove nexthop_active_num from route entry

The nexthop_active_num data structure is a property of the
nexthop group.  Move the keeping of this data to that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Remove re->nexthop_num from re
Donald Sharp [Fri, 15 Feb 2019 16:16:22 +0000 (11:16 -0500)]
zebra: Remove re->nexthop_num from re

The nexthop_num is not a function of the re.  It is owned
by the nexthop group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Replace nexthop_group with pointer in route entry
Donald Sharp [Wed, 13 Feb 2019 21:06:48 +0000 (16:06 -0500)]
zebra: Replace nexthop_group with pointer in route entry

In the route_entry we are keeping a non pointer based
nexthop group, switch the code to use a pointer for all
operations here and ensure we create and delete the memory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add base functionality for nexthop messages in kernel_netlink
Stephen Worley [Wed, 13 Feb 2019 20:32:59 +0000 (15:32 -0500)]
zebra: Add base functionality for nexthop messages in kernel_netlink

Add some base functionality so we can verify we are getting messages
about nexthops from the kernel.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add RTNLGRP_NEXTHOP group to the kernel socket
Stephen Worley [Thu, 7 Mar 2019 22:55:31 +0000 (17:55 -0500)]
zebra: Add RTNLGRP_NEXTHOP group to the kernel socket

Initialize the netlink socket with the RTNLGRP_NEXTHOP
group as well to listen for.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolinux: Update our netlink headers for nexthop group support
Stephen Worley [Tue, 12 Feb 2019 19:32:07 +0000 (14:32 -0500)]
linux: Update our netlink headers for nexthop group support

The linux kernel is adding support for nexthop groups. Update our
includes to reflect new types and structs we should be listening
for from the kernel.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add code to create/remove nexthop groups
Donald Sharp [Sat, 26 Jan 2019 01:11:21 +0000 (20:11 -0500)]
zebra: Add code to create/remove nexthop groups

Add some code to create/remove nexthop groups.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Add ability to find(create) and release a nhg from a re
Donald Sharp [Thu, 24 Jan 2019 15:49:28 +0000 (10:49 -0500)]
zebra: Add ability to find(create) and release a nhg from a re

Add some code to allow us to do lookups and releases of
nexthop groups from zebra.  At this point we do not do anything
with it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add some basic flags to the zebra nexthop group
Donald Sharp [Thu, 24 Jan 2019 02:32:49 +0000 (21:32 -0500)]
zebra: Add some basic flags to the zebra nexthop group

We need to track if a nexthop group is valid and installed,
so create some basic flags to track this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add show command to dump nexthop-group information for Zebra
Donald Sharp [Thu, 24 Jan 2019 02:16:41 +0000 (21:16 -0500)]
zebra: Add show command to dump nexthop-group information for Zebra

Just a simple addition of a command to dump the nexthop group information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add hash of nexthop groups
Donald Sharp [Thu, 24 Jan 2019 13:06:34 +0000 (08:06 -0500)]
zebra: Add hash of nexthop groups

This commit does nothing more than just create a hash structure
that we will use to track nexthop groups.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5213 from mjstapp/fix_sysctl_h
Donatas Abraitis [Fri, 25 Oct 2019 05:40:28 +0000 (08:40 +0300)]
Merge pull request #5213 from mjstapp/fix_sysctl_h

lib: Remove include of deprecated sysctl.h

4 years agoMerge pull request #5200 from ton31337/feature/doc_access-list_sequence_numbers
Donald Sharp [Fri, 25 Oct 2019 01:24:56 +0000 (21:24 -0400)]
Merge pull request #5200 from ton31337/feature/doc_access-list_sequence_numbers

doc: Update documentation for access-list with sequence numbers

4 years agoMerge pull request #5220 from dslicenc/remove-afi-safi-msg
Donatas Abraitis [Thu, 24 Oct 2019 15:19:13 +0000 (18:19 +0300)]
Merge pull request #5220 from dslicenc/remove-afi-safi-msg

bgpd: remove error message for unkown afi/safi combination

4 years agoMerge pull request #5219 from pguibert6WIND/interface_same_name
Donatas Abraitis [Thu, 24 Oct 2019 14:01:56 +0000 (17:01 +0300)]
Merge pull request #5219 from pguibert6WIND/interface_same_name

staticd: check tuple (vrf, name) when interface events received

4 years agobgpd: remove error message for unkown afi/safi combination
Don Slice [Wed, 23 Oct 2019 16:30:28 +0000 (16:30 +0000)]
bgpd: remove error message for unkown afi/safi combination

Problem reported with error messages appearing in the log
complaining about invalid afi/safi combinations.  Determined
that the error messages were recently added in the function
that turns afi and safi values to strings.  Unfortunately,
the function is called from places using FOREACH_AFI_SAFI,
which spins thru every afi and safi number including some
that are not legal together (ipv4 evpn and l2vpn multicast
for example.)   This fix removes these error messages since
it is not necessarily an error to call it with invalid
combinations.

Ticket: CM-26883
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #5203 from qlyoung/fix-vrrp-error-alternations
Renato Westphal [Thu, 24 Oct 2019 00:16:04 +0000 (21:16 -0300)]
Merge pull request #5203 from qlyoung/fix-vrrp-error-alternations

vrrpd: fix startup error message reporting

4 years agoMerge pull request #5217 from mjstapp/fix_bgp_evpn_pi
Renato Westphal [Thu, 24 Oct 2019 00:02:00 +0000 (21:02 -0300)]
Merge pull request #5217 from mjstapp/fix_bgp_evpn_pi

bgpd: clarify evpn datastruct use for SA

4 years agoMerge pull request #5214 from donaldsharp/vrrp_doc
Renato Westphal [Thu, 24 Oct 2019 00:00:25 +0000 (21:00 -0300)]
Merge pull request #5214 from donaldsharp/vrrp_doc

doc: Update supported platforms matrix w/ vrrpd

4 years agoMerge pull request #5202 from Orange-OpenSource/isis-TE
Renato Westphal [Wed, 23 Oct 2019 23:59:29 +0000 (20:59 -0300)]
Merge pull request #5202 from Orange-OpenSource/isis-TE

isisd: Correct missing advertisement of TE parameters

4 years agostaticd: check tuple (vrf, name) when interface events received
Philippe Guibert [Wed, 23 Oct 2019 14:53:09 +0000 (16:53 +0200)]
staticd: check tuple (vrf, name) when interface events received

with network namespace vrf backend, there is possibilities that the same
interface name can be used across two different vrfs. Then, enforce the
check when static daemon receives interface events. Adding to the
interface name, check for the vrf id, too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: clarify evpn datastruct use for SA
Mark Stapp [Wed, 23 Oct 2019 15:56:35 +0000 (11:56 -0400)]
bgpd: clarify evpn datastruct use for SA

Clear up an SA report by clarifying a function call in the evpn
code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: Update supported platforms matrix w/ vrrpd
Donald Sharp [Wed, 23 Oct 2019 13:11:45 +0000 (09:11 -0400)]
doc: Update supported platforms matrix w/ vrrpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Remove include of deprecated sysctl.h
Mark Stapp [Wed, 23 Oct 2019 13:08:21 +0000 (09:08 -0400)]
lib: Remove include of deprecated sysctl.h

Stop including deprecated header file; appears to be unused and
it has been deprecated in recent linux.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5204 from ghasemnaddaf/vrrp_updates
Quentin Young [Tue, 22 Oct 2019 15:27:29 +0000 (11:27 -0400)]
Merge pull request #5204 from ghasemnaddaf/vrrp_updates

doc: vrrp vip must not be on parent interface

4 years agoMerge pull request #5193 from qlyoung/doc-release-fixes
Donatas Abraitis [Tue, 22 Oct 2019 06:57:12 +0000 (09:57 +0300)]
Merge pull request #5193 from qlyoung/doc-release-fixes

Document release procedure

4 years agodoc: vrrp vip must not be on parent interface
Ghasem Naddaf [Mon, 21 Oct 2019 21:58:16 +0000 (14:58 -0700)]
doc: vrrp vip must not be on parent interface

Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
4 years agovrrpd: fix startup error message reporting
Quentin Young [Mon, 21 Oct 2019 18:21:16 +0000 (18:21 +0000)]
vrrpd: fix startup error message reporting

Due to some extremely shoddy programming on my part, the error messages
for certain errors was pretty much always wrong. We would start with the
correct error message, then on the next check, regardless of whether it
passed or failed, we would null out the error message, then on the next
one set it again (to the wrong message), then null it, and just keep
alternating. So errors were sometimes not being reported, sometimes
being reported correctly (if the condition parity happened to match the
appropriate condition), and sometimes being reported correctly.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoisisd: Correct missing advertisement of TE param.
Olivier Dugeon [Mon, 21 Oct 2019 16:39:15 +0000 (18:39 +0200)]
isisd: Correct missing advertisement of TE param.

Traffic Engineering parameters are correctly advertised in LSP when
'mpls-te on' CLI command is present in the startup config file.

However, if IS-IS is started without TE enable at startup and
'mpls-te on' command is issued after, TE link parameters are never
announced. The patch correct this issue.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agodoc: strip ws, shell -> console
Quentin Young [Mon, 21 Oct 2019 16:11:09 +0000 (16:11 +0000)]
doc: strip ws, shell -> console

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agodoc: Update documentation for access-list with sequence numbers
Donatas Abraitis [Mon, 21 Oct 2019 15:04:39 +0000 (18:04 +0300)]
doc: Update documentation for access-list with sequence numbers

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5108 from donaldsharp/sendbuffer_size_bgp
Donatas Abraitis [Sun, 20 Oct 2019 09:09:42 +0000 (12:09 +0300)]
Merge pull request #5108 from donaldsharp/sendbuffer_size_bgp

Sendbuffer size bgp

4 years agoMerge pull request #5184 from sworleys/Kernel-Route-Update
Mark Stapp [Sat, 19 Oct 2019 16:01:47 +0000 (12:01 -0400)]
Merge pull request #5184 from sworleys/Kernel-Route-Update

zebra: Rib Update Event Scheduler For Un-managed Routes, etc.

4 years agoMerge pull request #4850 from lkrishnamoor/show_cli
Russ White [Sat, 19 Oct 2019 01:30:37 +0000 (21:30 -0400)]
Merge pull request #4850 from lkrishnamoor/show_cli

bgpd: Adding new bgp evpn cli's for ip-prefix lookup

4 years agozebra: On if down/addr-del, process kernel routes
Stephen Worley [Thu, 17 Oct 2019 19:44:08 +0000 (15:44 -0400)]
zebra: On if down/addr-del, process kernel routes

Since we don't have a daemon who's job is to handle kernel
routes and we don't get an explicit route delete anymore if
nexthops become unreachable from the kernel, zebra must
re-process kernel routes itself to make sure they are still valid.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Check active on OLD system/kernel routes
Stephen Worley [Thu, 17 Oct 2019 19:41:25 +0000 (15:41 -0400)]
zebra: Check active on OLD system/kernel routes

We can assume that system/kernel routes are valid indeed
if this is our first time procesing them. But since we don't
get explicit deletion events for kernel routes anymore, we
have to be prepared to process them if the nexthop becomes
unreachable for instance. Therefore, if the route is not NEW,
then don't assume its valid.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Handle rib updates as a thread event
Stephen Worley [Thu, 17 Oct 2019 19:38:54 +0000 (15:38 -0400)]
zebra: Handle rib updates as a thread event

If we need to batch process the rib (all tables or specific
vrf), do so as a scheduled thread event rather than immediately
handling it. Further, add context to the events so that you
narrow down to certain route types you want to reprocess.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agodoc: update release procedure docs
Quentin Young [Fri, 18 Oct 2019 18:38:09 +0000 (18:38 +0000)]
doc: update release procedure docs

Add a lot of detail and update some outdated stuff.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agodoc: fix messed up topotests docs
Quentin Young [Fri, 18 Oct 2019 18:49:41 +0000 (18:49 +0000)]
doc: fix messed up topotests docs

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5180 from mjstapp/fix_nhrp_sa
Quentin Young [Fri, 18 Oct 2019 17:16:02 +0000 (13:16 -0400)]
Merge pull request #5180 from mjstapp/fix_nhrp_sa

nhrpd: clean up SA warning

4 years agoMerge pull request #5172 from donaldsharp/sa_clean_and_clean
Renato Westphal [Fri, 18 Oct 2019 02:14:31 +0000 (23:14 -0300)]
Merge pull request #5172 from donaldsharp/sa_clean_and_clean

Sa clean and clean

4 years agoMerge pull request #5182 from qlyoung/fix-doc-index-read-quanta
Renato Westphal [Fri, 18 Oct 2019 02:11:05 +0000 (23:11 -0300)]
Merge pull request #5182 from qlyoung/fix-doc-index-read-quanta

doc: fix read-quanta .. index copy-paste err

4 years agoMerge pull request #5181 from ghasemnaddaf/vrrp_updates
Quentin Young [Thu, 17 Oct 2019 22:55:08 +0000 (18:55 -0400)]
Merge pull request #5181 from ghasemnaddaf/vrrp_updates

vrrpd: use CS2MS instead of constant 10 everywhere

4 years agovrrpd: use CS2MS instead of constant 10 everywhere
Ghasem Naddaf [Wed, 16 Oct 2019 22:47:12 +0000 (15:47 -0700)]
vrrpd: use CS2MS instead of constant 10 everywhere

Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
vrrpd: use CS2MS instead of constant 10 everywhere

Signed-off-by: Ghasem Naddaf <ghasem.naddaf@gmail.com>
4 years agonhrpd: clean up SA warning
Mark Stapp [Thu, 17 Oct 2019 13:52:51 +0000 (09:52 -0400)]
nhrpd: clean up SA warning

Try to signal to SA/clang more clearly to clean up an SA warning
in the nhrp-specific linkedlist code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: fix read-quanta .. index copy-paste err
Quentin Young [Thu, 17 Oct 2019 19:53:19 +0000 (19:53 +0000)]
doc: fix read-quanta .. index copy-paste err

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5179 from ashish12pant/large_comm
Donald Sharp [Thu, 17 Oct 2019 17:47:20 +0000 (13:47 -0400)]
Merge pull request #5179 from ashish12pant/large_comm

tests: bgp community and bgp large-community

4 years agoMerge pull request #5165 from donaldsharp/evpn_fixup
Sri Mohana Singamsetty [Thu, 17 Oct 2019 17:15:01 +0000 (10:15 -0700)]
Merge pull request #5165 from donaldsharp/evpn_fixup

bgpd: return created bgp_path_info

4 years agoMerge pull request #5171 from donaldsharp/remove_getrusage
Mark Stapp [Thu, 17 Oct 2019 16:26:28 +0000 (12:26 -0400)]
Merge pull request #5171 from donaldsharp/remove_getrusage

*: Allow disabling of `getrusage` calls

4 years agoMerge pull request #5150 from qlyoung/bgp-vector-io-4
Mark Stapp [Thu, 17 Oct 2019 14:57:47 +0000 (10:57 -0400)]
Merge pull request #5150 from qlyoung/bgp-vector-io-4

BGP vector I/O - Redux

4 years agoMerge pull request #5161 from sworleys/Fix-Rule-Dbl-Free
Mark Stapp [Thu, 17 Oct 2019 14:31:40 +0000 (10:31 -0400)]
Merge pull request #5161 from sworleys/Fix-Rule-Dbl-Free

lib,zebra: Fix PBR Rule Ifp Reference if Interface is Deleted

4 years agoMerge pull request #5175 from opensourcerouting/debug-nb-yang
Mark Stapp [Thu, 17 Oct 2019 14:07:05 +0000 (10:07 -0400)]
Merge pull request #5175 from opensourcerouting/debug-nb-yang

lib, vtysh: add new libyang option to the "debug northbound" command

4 years agoMerge pull request #5167 from mjstapp/test_nhrp_list_sa
Sri Mohana Singamsetty [Thu, 17 Oct 2019 05:22:05 +0000 (22:22 -0700)]
Merge pull request #5167 from mjstapp/test_nhrp_list_sa

nhrpd: be more careful in linkedlist macro

4 years agoMerge pull request #5176 from qlyoung/alpine-update-mpfr-dep
Donatas Abraitis [Thu, 17 Oct 2019 05:13:01 +0000 (08:13 +0300)]
Merge pull request #5176 from qlyoung/alpine-update-mpfr-dep

fix alpine 🎿🎿🎿 docker build 🛠️

4 years agotests: Add test cases for bgp community and large community
Ashish Pant [Thu, 17 Oct 2019 03:49:26 +0000 (09:19 +0530)]
tests: Add test cases for bgp community and large community

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Test cases to check functionality of bgp large community and
bgp community path attribute

4 years agotests: Update cli error list and retry function
Ashish Pant [Wed, 16 Oct 2019 23:48:50 +0000 (05:18 +0530)]
tests: Update cli error list and retry function

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Add cli error returned for invalid bgp-community-list command

Fix retry function to avoid retries when expected is False

4 years agotests: Update bgp api for community and aggregate address
Ashish Pant [Wed, 16 Oct 2019 23:44:55 +0000 (05:14 +0530)]
tests: Update bgp api for community and aggregate address

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Add support for not sending community data in bgp and update
aggregate address configuration code

4 years agotests: Add verify community list api
Ashish Pant [Wed, 16 Oct 2019 23:41:42 +0000 (05:11 +0530)]
tests: Add verify community list api

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Api checks if community list is present in the system or not

4 years agotests: Add step api in topojson
Ashish Pant [Wed, 16 Oct 2019 23:15:28 +0000 (04:45 +0530)]
tests: Add step api in topojson

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Print messages with a step number to log from test case

4 years agoalpine: clean up dep block
Quentin Young [Wed, 16 Oct 2019 20:38:27 +0000 (20:38 +0000)]
alpine: clean up dep block

Wrap to 80 cols...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoalpine: update mpfr3 -> mpfr4
Quentin Young [Wed, 16 Oct 2019 20:37:44 +0000 (20:37 +0000)]
alpine: update mpfr3 -> mpfr4

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agolib: silence compiler warning in the gRPC plugin
Renato Westphal [Wed, 16 Oct 2019 20:13:28 +0000 (17:13 -0300)]
lib: silence compiler warning in the gRPC plugin

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agolib, vtysh: add new libyang option to the "debug northbound" command
Renato Westphal [Wed, 16 Oct 2019 19:59:54 +0000 (16:59 -0300)]
lib, vtysh: add new libyang option to the "debug northbound" command

Guard the libyang debug messages under this command so that only
people interested on those messages will see them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agovtysh: remove DEFPY variable names
Renato Westphal [Wed, 16 Oct 2019 16:05:17 +0000 (13:05 -0300)]
vtysh: remove DEFPY variable names

Some DEFPY commands were copied to vtysh without being cleaned up
properly. Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #5078 from lkrishnamoor/advertise-routes
Russ White [Wed, 16 Oct 2019 19:05:23 +0000 (15:05 -0400)]
Merge pull request #5078 from lkrishnamoor/advertise-routes

bgpd: Fix "show bgp l2vpn evpn neighbors x.x.x.x advertised-routes json"

4 years agoMerge pull request #5118 from lkrishnamoor/routes_json
Russ White [Wed, 16 Oct 2019 19:01:13 +0000 (15:01 -0400)]
Merge pull request #5118 from lkrishnamoor/routes_json

bgpd: Fix in "show bgp l2vpn evpn neighbors X.X.X.X routes json"

4 years agobgpd: In redistribution aspath cannot be NULL
Donald Sharp [Wed, 16 Oct 2019 15:03:49 +0000 (11:03 -0400)]
bgpd: In redistribution aspath cannot be NULL

Coverity has found a path where the attr.aspath may be NULL.

assert that the aspath is non-null so we can make this go away.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: zrt->table cannot crash here
Donald Sharp [Wed, 16 Oct 2019 14:33:19 +0000 (10:33 -0400)]
zebra: zrt->table cannot crash here

If we have a zrt data structure then we have a table pointer
as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Coverity SA doesn't trust the CLI
Donald Sharp [Wed, 16 Oct 2019 14:30:28 +0000 (10:30 -0400)]
lib: Coverity SA doesn't trust the CLI

Fix with some asserts to show Coverity SA that we mean
real(:trademark:) business.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: `struct bgp_path_info *`->attr must not be NULL
Donald Sharp [Wed, 16 Oct 2019 14:25:19 +0000 (10:25 -0400)]
bgpd: `struct bgp_path_info *`->attr must not be NULL

We make the assumption that ->attr is not NULL throughout
the code base.  We are totally inconsistent about application
of this though.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Add MRAI timer documentation to bgp docs
Donald Sharp [Wed, 16 Oct 2019 12:09:48 +0000 (08:09 -0400)]
doc: Add MRAI timer documentation to bgp docs

We were missing the bgp MRAI timer documentation.  Add it in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Check setsockopt return codes
Donald Sharp [Wed, 16 Oct 2019 11:58:44 +0000 (07:58 -0400)]
bgpd: Check setsockopt return codes

Let end user know that a setsockopt failed and we may
be experiencing degraded performance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: Allow disabling of `getrusage` calls
Donald Sharp [Wed, 16 Oct 2019 17:19:09 +0000 (13:19 -0400)]
*: Allow disabling of `getrusage` calls

getrusage, in a heavily stressed system, can account for
signficant running time due to process switching to the kernel.
Allow the end-operator to specify `--disable-cpu-time` to
avoid this call.  Additionally we cause `show thread cpu` to
not show up if this is selected.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agonhrpd: be more careful with linked lists
Mark Stapp [Wed, 16 Oct 2019 12:51:43 +0000 (08:51 -0400)]
nhrpd: be more careful with linked lists

NHRPD has its own linked-list implementation, and one of the
apis is a little free and easy with pointers. Also be safer
with one list iteration operation.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: add documentation for write- and read-quanta
Quentin Young [Wed, 16 Oct 2019 14:41:54 +0000 (14:41 +0000)]
doc: add documentation for write- and read-quanta

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5155 from GalaxyGorilla/libyang_debug_logging
Donald Sharp [Wed, 16 Oct 2019 13:11:48 +0000 (09:11 -0400)]
Merge pull request #5155 from GalaxyGorilla/libyang_debug_logging

lib: Let libyang log everything possible