]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agozebra: reduce dplane_fpm_nl ctxqueue_mutex contention
Duncan Eastoe [Fri, 18 Dec 2020 14:04:45 +0000 (14:04 +0000)]
zebra: reduce dplane_fpm_nl ctxqueue_mutex contention

Reduce code in the critical sections of fpm_nl_process() and
fpm_process_queue() to the bare minimum - basically only enqueue
and dequeue operations on the shared ctxqueue.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7760 from donaldsharp/DIE_IN_A_FIRE
Donatas Abraitis [Fri, 18 Dec 2020 09:26:10 +0000 (11:26 +0200)]
Merge pull request #7760 from donaldsharp/DIE_IN_A_FIRE

Die in a fire

3 years agobgpd: Remove awful test of strmatch + get_afi_safi_str
Donald Sharp [Thu, 17 Dec 2020 21:49:20 +0000 (16:49 -0500)]
bgpd: Remove awful test of strmatch + get_afi_safi_str

Remove awful test of a strmatch against a call to get_afi_safi_str.
These are the easy ones as that the real decision point is/was
underneath this test.  This is just duplicate expensive testing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Use the header
Donald Sharp [Thu, 17 Dec 2020 21:36:22 +0000 (16:36 -0500)]
bgpd: Use the header

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Somewhat optimize string returns
Donald Sharp [Thu, 17 Dec 2020 21:33:11 +0000 (16:33 -0500)]
bgpd: Somewhat optimize string returns

There is no need for a cascading series of if statements
for the afi.  Clean it up slightly

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7757 from donaldsharp/tests_unicode
Mark Stapp [Thu, 17 Dec 2020 21:23:17 +0000 (16:23 -0500)]
Merge pull request #7757 from donaldsharp/tests_unicode

tests: unicode to frr_unicode

3 years agoMerge pull request #7755 from mjstapp/fix_rnh_via_default
Donald Sharp [Thu, 17 Dec 2020 19:07:00 +0000 (14:07 -0500)]
Merge pull request #7755 from mjstapp/fix_rnh_via_default

zebra: nht resolve-via-default doesn't need force

3 years agotests: unicode to frr_unicode
Donald Sharp [Thu, 17 Dec 2020 18:19:52 +0000 (13:19 -0500)]
tests: unicode to frr_unicode

Let's standardize on the internal to frr unicode function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: nht resolve-via-default doesn't need force
Mark Stapp [Thu, 17 Dec 2020 16:22:09 +0000 (11:22 -0500)]
zebra: nht resolve-via-default doesn't need force

We don't need to use the 'force' flag when processing the
resolve-via-default clis for ip and ipv6: we can just do normal
nht processing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7744 from donaldsharp/end_configuration
Mark Stapp [Wed, 16 Dec 2020 18:47:24 +0000 (13:47 -0500)]
Merge pull request #7744 from donaldsharp/end_configuration

End configuration changes

3 years agoMerge pull request #7719 from mkoskar/patch-1
Mark Stapp [Wed, 16 Dec 2020 13:46:24 +0000 (08:46 -0500)]
Merge pull request #7719 from mkoskar/patch-1

doc: Remove duplicate word

3 years agodoc: Remove duplicate word
Miroslav Koškár [Fri, 11 Dec 2020 10:53:17 +0000 (11:53 +0100)]
doc: Remove duplicate word

"FRR is currently currently implementing ..."

Signed-off-by: Miroslav Koškár <mk@mkoskar.com>
3 years agoMerge pull request #7739 from mobash-rasool/pim-fixes
Jafar Al-Gharaibeh [Tue, 15 Dec 2020 22:14:32 +0000 (16:14 -0600)]
Merge pull request #7739 from mobash-rasool/pim-fixes

pimd: correcting the  definition for  Mroute flag "R"

3 years agovtysh: When dry-running no need to start/end configuration
Donald Sharp [Tue, 15 Dec 2020 19:45:23 +0000 (14:45 -0500)]
vtysh: When dry-running no need to start/end configuration

When doing a dry run don't send start/end configuration
commands.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib, vtysh: Modify start/end configuration commands to be more hidden
Donald Sharp [Tue, 15 Dec 2020 19:21:56 +0000 (14:21 -0500)]
lib, vtysh: Modify start/end configuration commands to be more hidden

There exists a world where some people have put `end` in their
configuration.  Then vtysh will command search for it and find
it and then bad things happen.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7634 from AnuradhaKaruppiah/df-fixes
Patrick Ruddy [Tue, 15 Dec 2020 18:17:51 +0000 (18:17 +0000)]
Merge pull request #7634 from AnuradhaKaruppiah/df-fixes

evpn-mh: DF fixes

3 years agozebra: add support for DF delay timer
Anuradha Karuppiah [Sun, 14 Jun 2020 19:13:23 +0000 (12:13 -0700)]
zebra: add support for DF delay timer

When a new ES is created it is held in a non-DF state for 3 seconds
as specified by RFC7432. This allows the switch time to import
the Type-4 routes from the peers. And the peers time to rx the new
Type-4 route.

root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: non-df
 DF delay: 00:00:01
 DF preference: 50000
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: df
 DF preference: 50000
root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: display DF status only for local ESs
Anuradha Karuppiah [Sun, 14 Jun 2020 13:51:58 +0000 (06:51 -0700)]
zebra: display DF status only for local ESs

For remote ESs it is not relevant and confuses the admin.

Local ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"
ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: Local,Remote
 Interface: hostbond1
 State: up
 Bridge port: yes
 Ready for BGP: yes
 VNI Count: 10
 MAC Count: 3
 DF: status: df preference: 50000 >>>>>>>>>>>>>>>
 Nexthop group: 536870913
 VTEPs:
     27.0.0.16 df_alg: preference df_pref: 32767 nh: 268435465
     27.0.0.17 df_alg: preference df_pref: 32767 nh: 268435466

root@torm-11:mgmt:~#

Remote ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:02:00:00:01"
ESI: 03:44:38:39:ff:ff:02:00:00:01
 Type: Remote
 Interface: -
 Ready for BGP: no
 VNI Count: 0
 MAC Count: 6
 DF: status: - preference: 0 >>>>>>>>>>>>>>>
 Nexthop group: 536870919
 VTEPs:
     27.0.0.18 nh: 268435464
     27.0.0.19 nh: 268435467
     27.0.0.20 nh: 268435461

root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #7637 from AnuradhaKaruppiah/evpn-pim-fixes
Patrick Ruddy [Tue, 15 Dec 2020 17:36:24 +0000 (17:36 +0000)]
Merge pull request #7637 from AnuradhaKaruppiah/evpn-pim-fixes

evpn-pim: cleanup and display fixes

3 years agoMerge pull request #7636 from AnuradhaKaruppiah/type-0-esi
Patrick Ruddy [Tue, 15 Dec 2020 17:33:46 +0000 (17:33 +0000)]
Merge pull request #7636 from AnuradhaKaruppiah/type-0-esi

zebra: support for type-0 ESI

3 years agoMerge pull request #7633 from AnuradhaKaruppiah/protodown-fixes
Patrick Ruddy [Tue, 15 Dec 2020 17:23:32 +0000 (17:23 +0000)]
Merge pull request #7633 from AnuradhaKaruppiah/protodown-fixes

evpn-mh: protodown handling fixes

3 years agopimd: correcting the definition for Mroute flag "R"
Mobashshera Rasool [Tue, 15 Dec 2020 12:36:34 +0000 (12:36 +0000)]
pimd: correcting the  definition for  Mroute flag "R"

The flag "R" in below display description denotes the
SGRpt Pruned but the description shows something else
hence correcting the definition.

R2(config)# do show ip mroute
IP Multicast Routing Table
Flags: S- Sparse, C - Connected, P - Pruned
R - RP-bit set, F - Register flag

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #7717 from ranjanyash54/2368
Russ White [Tue, 15 Dec 2020 12:29:10 +0000 (07:29 -0500)]
Merge pull request #7717 from ranjanyash54/2368

ospf6d: ospfv3 disable on the interface, but interface prefix still s…

3 years agoMerge pull request #7728 from mobash-rasool/pim-fixes
Russ White [Tue, 15 Dec 2020 12:22:06 +0000 (07:22 -0500)]
Merge pull request #7728 from mobash-rasool/pim-fixes

ospf6d: Link LSA is not updated when router priority is modified

3 years agoMerge pull request #7735 from ton31337/fix/move_to_options_bgp_master_extra_zebra_data
Russ White [Tue, 15 Dec 2020 12:14:17 +0000 (07:14 -0500)]
Merge pull request #7735 from ton31337/fix/move_to_options_bgp_master_extra_zebra_data

bgpd: Use bgp master flags for send extra data to zebra

3 years agoMerge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY
Russ White [Tue, 15 Dec 2020 12:12:49 +0000 (07:12 -0500)]
Merge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY

*: Replace s_addr check agains 0 with INADDR_ANY

3 years agoMerge pull request #7737 from mjstapp/fix_ospf_vty_ntoa
Russ White [Tue, 15 Dec 2020 12:11:00 +0000 (07:11 -0500)]
Merge pull request #7737 from mjstapp/fix_ospf_vty_ntoa

ospfd: avoid inet_ntoa

3 years agoospfd: avoid inet_ntoa
Mark Stapp [Mon, 14 Dec 2020 22:01:18 +0000 (17:01 -0500)]
ospfd: avoid inet_ntoa

some recent commits re-introduced use of inet_ntoa() - fix
them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years ago*: Replace s_addr check agains 0 with INADDR_ANY
Donatas Abraitis [Mon, 14 Dec 2020 19:01:31 +0000 (21:01 +0200)]
*: Replace s_addr check agains 0 with INADDR_ANY

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7162 from opensourcerouting/zebra-human-netlink
Stephen Worley [Mon, 14 Dec 2020 19:03:35 +0000 (14:03 -0500)]
Merge pull request #7162 from opensourcerouting/zebra-human-netlink

zebra: human readable netlink dumps

3 years agobgpd: Use bgp master flags for send extra data to zebra
Donatas Abraitis [Mon, 14 Dec 2020 18:28:44 +0000 (20:28 +0200)]
bgpd: Use bgp master flags for send extra data to zebra

root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'no bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
no bgp send-extra-data zebra

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: restart start-up delay timer when the first uplink comes up
Anuradha Karuppiah [Wed, 7 Oct 2020 20:09:50 +0000 (13:09 -0700)]
zebra: restart start-up delay timer when the first uplink comes up

When all the uplinks go down the VTEP is disconnected from the
VxLAN overlay and this was handled by proto-downing the ES bonds. When
the uplinks come up again we need to re-enable the ES bonds but that
needs to be done after a delay to allow the EVPN network to converge.

And that is done by firing off the startup-delay timer on first
uplink-up.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: re-sync protodown state with the dplane on new ES add
Anuradha Karuppiah [Mon, 15 Jun 2020 14:41:47 +0000 (07:41 -0700)]
zebra: re-sync protodown state with the dplane on new ES add

1. When a bond is associated with an ES we may need to re-sync
the dplane protodown state (which maybe stale/set by some other
app).
2. Also change the uplink state display to avoid confusion with
protodown reason code (both used to show uplink-up).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: update protodown display
Anuradha Karuppiah [Sun, 14 Jun 2020 14:31:45 +0000 (07:31 -0700)]
zebra: update protodown display

protodown state is a combination of the dplane and zebra states.
protodown reason is maintained exclusively by zebra. Display this
information on two separate lines to make that ownership clearer.

Also display n/a for bonds as the dplane doesn't support protodowning
the bond device.

Sample output -
==============
root@torm-11:mgmt:~# vtysh -c "show interface hostbond1"|grep -i protodown
  protodown: off (n/a)
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~# vtysh -c "show interface swp5"|grep -i protodown
  protodown: on
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~#

PS: Cosmetic changes only, no functional change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agozebra: re-sync protodown state when a port/mbr is linked to an ES-bond
Anuradha Karuppiah [Thu, 4 Jun 2020 12:57:33 +0000 (05:57 -0700)]
zebra: re-sync protodown state when a port/mbr is linked to an ES-bond

The code for this was already there but was not kicking in because of a
zebra local reason-code dup check. Even if the reason-code is the same,
if the dplane and zebra disagree about the protodown state zebra will
need to re-program the dplane.

Fixed a couple of spelling errors in the protodown logs to make greps
easy.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
3 years agoMerge pull request #7726 from chiragshah6/mdev
Patrick Ruddy [Mon, 14 Dec 2020 16:28:09 +0000 (16:28 +0000)]
Merge pull request #7726 from chiragshah6/mdev

bgpd: fix evpn route-map vni filter at origin

3 years agoMerge pull request #7664 from donaldsharp/global_bgp_wait
Donatas Abraitis [Mon, 14 Dec 2020 08:28:02 +0000 (10:28 +0200)]
Merge pull request #7664 from donaldsharp/global_bgp_wait

Global bgp wait

3 years agoospf6d: Link LSA is not updated when router priority is modified
Mobashshera Rasool [Mon, 14 Dec 2020 07:45:47 +0000 (07:45 +0000)]
ospf6d: Link LSA is not updated when router priority is modified

Issue: #7727

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoospf6d: ospfv3 disable on the interface, but interface prefix still shown in the...
Yash Ranjan [Tue, 1 Dec 2020 06:21:04 +0000 (22:21 -0800)]
ospf6d: ospfv3 disable on the interface, but interface prefix still shown in the output

When the ospfv3 interface is disabled by the command "no interface <eth> area <area-id>
the linked interface prefixes does not get flushed

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agobgpd: fix evpn route-map vni filter at origin
Chirag Shah [Thu, 10 Dec 2020 21:59:56 +0000 (13:59 -0800)]
bgpd: fix evpn route-map vni filter at origin

evpn route-map match (filter) on vni is not working
at the origin of the routes.

evpn match vni route checks for encap type as vxlan.
the source route attribute is not set with vxlan encap
thus the match filter wouldn't work.

Ticket:CM-32554
Reviewed By:CCR-11056
Testing Done:

At source have match vni plus set statement in route-map.
Validate the origin of the route's outbound correctly sets
the 'set' statment based on match vni filter.

At origin:
route-map RM-EVPN-TE-Matches permit 10
 match evpn vni 4001
  set large-community 10:10:119

Receiving end:

Route [5]:[0]:[24]:[78.41.1.0] VNI 4001
5550
  27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
    Origin incomplete, metric 0, valid, external, bestpath-from-AS 5550, best (First path received)
    Extended Community: RT:5550:4001 ET:8 Rmac:00:02:00:00:00:4d
    Large Community: 10:10:119    <--- Large community stamped
    Last update: Thu Dec 10 22:19:26 2020

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoMerge pull request #7713 from ranjanyash54/2371
Donald Sharp [Sat, 12 Dec 2020 01:58:52 +0000 (20:58 -0500)]
Merge pull request #7713 from ranjanyash54/2371

ospf6d: Fix the prefix walking for show database command for intra-prefix and link

3 years agoMerge pull request #7716 from ton31337/fix/print_string_for_afi_safi_mp_bgp
Donald Sharp [Sat, 12 Dec 2020 01:40:25 +0000 (20:40 -0500)]
Merge pull request #7716 from ton31337/fix/print_string_for_afi_safi_mp_bgp

bgpd: Print afi/safi as strings for some zlog_debug outputs

3 years agoMerge pull request #7721 from deastoe/dplane-fpm-routes-stuck-in-queued
Mark Stapp [Fri, 11 Dec 2020 20:19:23 +0000 (15:19 -0500)]
Merge pull request #7721 from deastoe/dplane-fpm-routes-stuck-in-queued

Routes stuck with 'q' flag when dplane_fpm_nl is in use

3 years agozebra: routes stuck with 'q' when using dplane FPM
Duncan Eastoe [Fri, 11 Dec 2020 11:07:59 +0000 (11:07 +0000)]
zebra: routes stuck with 'q' when using dplane FPM

New work enqueued to the dplane_fpm_nl provider is initially de-queued
and re-enqueued, in fpm_nl_process(), to be processed by the provider's
own thread.

After performing this initial de-queue/enqueue we return to
dplane_thread_loop() and check the dplane_fpm_nl output queue for any
work which has been completed.

Since this work is being processed in another thread it is very likely
that there will be some (or all) work still outstanding at this point.
The dataplane thread finishes up any other tasks and then waits until
it is next scheduled. In the meantime the dplane_fpm_nl thread is
processing its work queue until completion.

The issue arises here as the dataplane thread is not explicitly
re-scheduled once dplane_fpm_nl has drained its work queue and
populated its output queue with completed work.

This completed work can sit in the output queue for an indeterminate
period of time, depending upon when the dataplane thread is next
scheduled for other work. If the RIB has reached a stable state then
this could be a significant period of time. During this period zebra
marks these routes as queued, even though they have actually been
processed by all dataplane providers.

An un-related RIB change which triggers a FIB update will result in
the dataplane thread being scheduled and this completed work then
being processed. At this point the routes will then no longer be
marked as queued by zebra. However this new FIB update might itself
then fall victim to the same scenario!

We can observe the above behaviour in these detailed dplane logs.

    11:24:47 zebra[7282]: dplane: incoming new work counter: 2
    11:24:47 zebra[7282]: dplane enqueues 2 new work to provider 'Kernel'
    11:24:47 zebra[7282]: dplane provider 'Kernel': processing
    11:24:47 zebra[7282]: Dplane NEIGH_DISCOVER, ip 192.168.2.2, ifindex 9
    11:24:47 zebra[7282]: Dplane NEIGH_DISCOVER, ip 192.168.2.2, ifindex 9
    11:24:47 zebra[7282]: dplane dequeues 2 completed work from provider Kernel
    11:24:47 zebra[7282]: dplane enqueues 2 new work to provider 'dplane_fpm_nl'
    11:24:47 zebra[7282]: dplane dequeues 1 completed work from provider dplane_fpm_nl
    11:24:47 zebra[7282]: dplane has 1 completed, 0 errors, for zebra main

2 contexts (all incoming work) have been queued to dplane_fpm_nl - all good.
1 completed context was de-queued, so there is outstanding work.

    11:24:58 zebra[7282]: dplane: incoming new work counter: 2
    11:24:58 zebra[7282]: dplane enqueues 2 new work to provider 'Kernel'
    11:24:58 zebra[7282]: dplane provider 'Kernel': processing
    11:24:58 zebra[7282]: ID (193) Dplane nexthop update ctx 0x55c429b6fed0 op NH_INSTALL
    11:24:58 zebra[7282]: 0:5.5.5.5/32 Dplane route update ctx 0x55c429b79690 op ROUTE_INSTALL
    11:24:58 zebra[7282]: dplane dequeues 2 completed work from provider Kernel
    11:24:58 zebra[7282]: dplane enqueues 2 new work to provider 'dplane_fpm_nl'
    11:24:58 zebra[7282]: dplane dequeues 2 completed work from provider dplane_fpm_nl
    11:24:58 zebra[7282]: dplane has 2 completed, 0 errors, for zebra main

A further 2 contexts (all incoming work) have been queued to dplane_fpm_nl - all good.
2 completed contexts were de-queued, which sounds good as that is what we en-queued.
However, there is an outstanding context from earlier, so there is still outstanding
work.

Indeed the new 5.5.5.5/32 route is marked as queued:

    O>q 5.5.5.5/32 [110/10] via 192.168.2.2, dp0p1s3, weight 1, 00:01:19

This remains the case until we trigger a FIB update by installation of the
(eg.) 10.10.10.10/32 route:

    11:26:41 zebra[7282]: dplane: incoming new work counter: 2
    11:26:41 zebra[7282]: dplane enqueues 2 new work to provider 'Kernel'
    11:26:41 zebra[7282]: dplane provider 'Kernel': processing
    11:26:41 zebra[7282]: ID (195) Dplane nexthop update ctx 0x55c429b78ce0 op NH_INSTALL
    11:26:41 zebra[7282]: 0:10.10.10.10/32 Dplane route update ctx 0x55c429b7a040 op ROUTE_INSTALL
    11:26:41 zebra[7282]: dplane dequeues 2 completed work from provider Kernel
    11:26:41 zebra[7282]: dplane enqueues 2 new work to provider 'dplane_fpm_nl'
    11:26:41 zebra[7282]: dplane dequeues 2 completed work from provider dplane_fpm_nl
    11:26:41 zebra[7282]: dplane has 2 completed, 0 errors, for zebra main
    11:26:41 zebra[7282]: zebra2proto: Please add this protocol(2) to proper rt_netlink.c handling
    11:26:41 zebra[7282]: Nexthop dplane ctx 0x55c429b6fed0, op NH_INSTALL, nexthop ID (193), result SUCCESS
    11:26:41 zebra[7282]: default(0:254):5.5.5.5/32 Processing dplane result ctx 0x55c429b79690, op ROUTE_INSTALL result SUCCESS

We observe the same 2 enqueues and 2 dequeues as before, which again suggests
that there is outstanding work.

As expected, the 5.5.5.5/32 route is no longer marked as queued:

    O>* 5.5.5.5/32 [110/10] via 192.168.2.2, dp0p1s3, weight 1, 00:02:06

But the 10.10.10.10/32 route is, as we have not yet processed the completed
context:

    C>q 10.10.10.10/32 is directly connected, lo, 00:26:05

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agozebra: dplane API to get provider output q length
Duncan Eastoe [Fri, 11 Dec 2020 11:03:53 +0000 (11:03 +0000)]
zebra: dplane API to get provider output q length

Returns the current number of (completed) contexts in the provider's
output queue (dp_ctx_out_q), allowing access to this data from the
provider itself.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agoMerge pull request #7711 from volta-networks/fix_ldpsync_client_close_callback
Renato Westphal [Fri, 11 Dec 2020 14:25:53 +0000 (11:25 -0300)]
Merge pull request #7711 from volta-networks/fix_ldpsync_client_close_callback

isisd, ospfd: update 'client close' callback to 'ldp fail' api

3 years agodplane_fpm_nl: queue peak counter never increments
Duncan Eastoe [Fri, 11 Dec 2020 10:26:54 +0000 (10:26 +0000)]
dplane_fpm_nl: queue peak counter never increments

The context queue length peak counter is always set to its current
value, hence never increments.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
3 years agobgpd: Print afi/safi as strings when handling update/withdraw in zlog_debug
Donatas Abraitis [Fri, 11 Dec 2020 09:44:38 +0000 (11:44 +0200)]
bgpd: Print afi/safi as strings when handling update/withdraw in zlog_debug

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Print afi/safi as strings when handling capability in zlog_debug
Donatas Abraitis [Fri, 11 Dec 2020 09:41:30 +0000 (11:41 +0200)]
bgpd: Print afi/safi as strings when handling capability in zlog_debug

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoospf6d: Fix for "show ipv6 ospf6 database link"
Yash Ranjan [Fri, 11 Dec 2020 05:19:55 +0000 (21:19 -0800)]
ospf6d: Fix for "show ipv6 ospf6 database link"

Some prefixes were not shown in the link database
show command, due to issues with pointer calculation.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoospf6d: Fix for "show ipv6 ospf6 database intra-prefix"
Yash Ranjan [Fri, 11 Dec 2020 05:16:37 +0000 (21:16 -0800)]
ospf6d: Fix for "show ipv6 ospf6 database intra-prefix"

Some prefixes were not shown in the intra-prefix database
show command, due to issues with pointer calculation.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
3 years agoisisd, ospfd: update 'client close' callback to 'ldp fail' api
Karen Schoener [Thu, 10 Dec 2020 18:35:34 +0000 (13:35 -0500)]
isisd, ospfd: update 'client close' callback to 'ldp fail' api

Update 'client close' callback to 'ldp fail' api.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agozebra: Allow `show zebra client` to give clues about route update status
Donald Sharp [Thu, 3 Dec 2020 20:55:45 +0000 (15:55 -0500)]
zebra: Allow `show zebra client` to give clues about route update status

When entering `show zebra client` allow the display of the client->notify_status
for route updates.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: Update doc for new global command `bgp suppress-fib-pending`
Donald Sharp [Thu, 3 Dec 2020 20:47:12 +0000 (15:47 -0500)]
doc: Update doc for new global command `bgp suppress-fib-pending`

Document this silliness.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Add global `bgp suppress-fib-pending` command
Donald Sharp [Thu, 3 Dec 2020 20:48:59 +0000 (15:48 -0500)]
bgpd: Add global `bgp suppress-fib-pending` command

On top of the recent `bgp suppress-fib-pending which
was at a BGP_NODE level, add this command at the CONFIG_NODE
level as well and allow the command to apply to all instances
of bgp running.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7678 from donaldsharp/aspath_to_zebra
Russ White [Thu, 10 Dec 2020 15:38:14 +0000 (10:38 -0500)]
Merge pull request #7678 from donaldsharp/aspath_to_zebra

Aspath to zebra

3 years agoMerge pull request #7677 from opensourcerouting/acl-back-compat
Donald Sharp [Thu, 10 Dec 2020 13:14:34 +0000 (08:14 -0500)]
Merge pull request #7677 from opensourcerouting/acl-back-compat

lib: restore previous access/prefix list behaviour

3 years agoMerge pull request #7706 from slankdev/slankdev-unexpose-lm-func-1
Donald Sharp [Thu, 10 Dec 2020 12:43:02 +0000 (07:43 -0500)]
Merge pull request #7706 from slankdev/slankdev-unexpose-lm-func-1

zebra: unexpose label-manager util-funcs as static

3 years agoMerge pull request #7708 from ton31337/fix/doc_hash_cmp
Rafael Zalamena [Thu, 10 Dec 2020 12:22:22 +0000 (09:22 -0300)]
Merge pull request #7708 from ton31337/fix/doc_hash_cmp

doc: update doc comment on hash_cmp (round 2)

3 years agoMerge pull request #7697 from pguibert6WIND/zebra_crash_startup_zns
Rafael Zalamena [Thu, 10 Dec 2020 12:10:34 +0000 (09:10 -0300)]
Merge pull request #7697 from pguibert6WIND/zebra_crash_startup_zns

zebra: anticipate zns creation at vrf creation when backend is vrf-lite

3 years agoMerge pull request #7492 from Niral-Networks/niral_ospfv3_fix_redist
Rafael Zalamena [Thu, 10 Dec 2020 12:01:12 +0000 (09:01 -0300)]
Merge pull request #7492 from Niral-Networks/niral_ospfv3_fix_redist

ospf6d : Code refactoring for route redistribution.

3 years agodoc: update doc comment on hash_cmp (round 2)
Donatas Abraitis [Thu, 10 Dec 2020 09:20:42 +0000 (11:20 +0200)]
doc: update doc comment on hash_cmp (round 2)

Related: c8aad9c3a4b3e6d6d85fcedaab80cc271015b1f9

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7649 from qlyoung/fix-doc-comment-hashcmp
Donatas Abraitis [Thu, 10 Dec 2020 09:07:06 +0000 (11:07 +0200)]
Merge pull request #7649 from qlyoung/fix-doc-comment-hashcmp

lib: update doc comment on hash_cmp

3 years agoMerge pull request #7524 from donaldsharp/zebra_route_map_tighten
Donatas Abraitis [Thu, 10 Dec 2020 09:01:25 +0000 (11:01 +0200)]
Merge pull request #7524 from donaldsharp/zebra_route_map_tighten

zebra: deny when route map is specified but does not exist yet

3 years agoMerge pull request #7705 from chiragshah6/mdev
Donatas Abraitis [Thu, 10 Dec 2020 08:58:59 +0000 (10:58 +0200)]
Merge pull request #7705 from chiragshah6/mdev

bgpd: local routes use non-default distance

3 years agoMerge pull request #7703 from volta-networks/fix_ldpsync_remove_hello
Donald Sharp [Thu, 10 Dec 2020 01:21:11 +0000 (20:21 -0500)]
Merge pull request #7703 from volta-networks/fix_ldpsync_remove_hello

ldpd, isisd, ospfd: Remove periodic ldp-sync hello message

3 years agozebra: unexpose label-manager util-funcs as static
Hiroki Shirokura [Thu, 10 Dec 2020 00:33:29 +0000 (09:33 +0900)]
zebra: unexpose label-manager util-funcs as static

Following functions which is a piece of label-maanager implementation
isn't called from out side of its file. And all lines of label-manager
are coded on zebra/label_manager.c at this time. So these functions
should be unexposed.

Functions:
- create_label_chunk
- assign_label_chunk
- delete_label_chunk
- release_label_chunk

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: local routes use non-default distance
Chirag Shah [Wed, 9 Dec 2020 05:04:50 +0000 (21:04 -0800)]
bgpd: local routes use non-default distance

Use user provided AD for local routes (aggregate).

 address-family ipv4 unicast
  distance bgp 20 200 210
  network 47.2.2.8/30
  aggregate-address 51.1.0.0/16

Testing Done:

Before aggr route uses default 200 AD even user provided local AD.
B>* 51.1.0.0/16 [200/0] unreachable (blackhole), weight 1, 00:01:14

After:
B>* 51.1.0.0/16 [210/0] unreachable (blackhole), weight 1, 00:00:01

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoMerge pull request #7685 from mjstapp/fix_nhrp_int_sa
Donald Sharp [Wed, 9 Dec 2020 20:02:42 +0000 (15:02 -0500)]
Merge pull request #7685 from mjstapp/fix_nhrp_int_sa

nhrpd: fix SA warning in nhrp_interface

3 years agoldpd, isisd, ospfd: Remove periodic ldp-sync hello message
Karen Schoener [Wed, 9 Dec 2020 17:09:18 +0000 (12:09 -0500)]
ldpd, isisd, ospfd: Remove periodic ldp-sync hello message

Removing the obsolete ldp-sync periodic 'hello' message.

When ldp-sync is configured, IGPs take action if the LDP process goes down.

The IGPs have been updated to use the zapi client close callback to detect
the LDP process going down.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agoMerge pull request #7699 from opensourcerouting/ldpd-printfrr-issue
Mark Stapp [Wed, 9 Dec 2020 18:36:28 +0000 (13:36 -0500)]
Merge pull request #7699 from opensourcerouting/ldpd-printfrr-issue

ldpd: fix printfrr format specifiers in the child processes

3 years agoMerge pull request #7700 from opensourcerouting/isisd-null-check
Mark Stapp [Wed, 9 Dec 2020 18:34:11 +0000 (13:34 -0500)]
Merge pull request #7700 from opensourcerouting/isisd-null-check

isisd: fix null pointer dereference when parsing LSP

3 years agoMerge pull request #7686 from volta-networks/fix_ldpsync_igps_detect_client_close
Donald Sharp [Wed, 9 Dec 2020 16:49:22 +0000 (11:49 -0500)]
Merge pull request #7686 from volta-networks/fix_ldpsync_igps_detect_client_close

isisd, ospfd: IGPs detect LDP down via zapi client close message

3 years agoisisd: fix null pointer dereference when parsing LSP
Renato Westphal [Thu, 3 Dec 2020 15:19:06 +0000 (12:19 -0300)]
isisd: fix null pointer dereference when parsing LSP

In some extraordinary circumstances an LSP might not have any
TLV. Add a null check to prevent a crash when that happens.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoldpd: fix printfrr format specifiers in the child processes
Renato Westphal [Sun, 6 Dec 2020 00:44:41 +0000 (21:44 -0300)]
ldpd: fix printfrr format specifiers in the child processes

In ldpd, the child processes send IPC messages to the main process to
perform logging in their behalf (access to the file descriptor used
for logging needs to be serialized). This commit fixes a problem
that was preventing the printfrr format specifiers from working in
the child processes, since vsnprintf() was being used instead of
vsnprintfrr() before sending the log messages to the parent process.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd, ospfd: IGPs detect LDP down via zapi client close message
Karen Schoener [Tue, 8 Dec 2020 14:44:27 +0000 (09:44 -0500)]
isisd, ospfd: IGPs detect LDP down via zapi client close message

When ldp-sync is configured, IGPs take action if the LDP process goes down.

Currently, IGPs detect the LDP process is down if they do not receive a
periodic 'hello' message from LDP within 1 second.

Intermittently, this heartbeat mechanism causes false topotest failures.
When the failure occurs, LDP is busy receiving messages from zebra for a
few seconds.  During this time, LDP does not send the expected periodic
message.

With this change, IGPs detect LDP down via zapi client close message.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agozebra: anticipate zns creation at vrf creation when backend is vrf-lite
Philippe Guibert [Tue, 8 Dec 2020 11:11:05 +0000 (11:11 +0000)]
zebra: anticipate zns creation at vrf creation when backend is vrf-lite

in the case the namespace pointer is already available, feed it at vrf
creation. this prevents from crashing if the netlink parsing already
began, and the vrf-lite is not enabled yet.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #7690 from donaldsharp/nht_show_is_not_not_not
Mark Stapp [Wed, 9 Dec 2020 12:58:37 +0000 (07:58 -0500)]
Merge pull request #7690 from donaldsharp/nht_show_is_not_not_not

zebra, tests: Fix `show ip nht`

3 years agolib: prevent libyang abstraction memory leak
Rafael Zalamena [Wed, 9 Dec 2020 12:57:28 +0000 (09:57 -0300)]
lib: prevent libyang abstraction memory leak

Call `ly_set_free()` on `YANG_ITER_STOP` as well.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #7688 from kuldeepkash/bgp_multi_vrf
Donald Sharp [Wed, 9 Dec 2020 12:47:09 +0000 (07:47 -0500)]
Merge pull request #7688 from kuldeepkash/bgp_multi_vrf

tests: Enhanced auto-rd verification logic for evpn_type5 tests

3 years agoMerge pull request #7694 from slankdev/slankdev-use-zservsend-1
Donald Sharp [Wed, 9 Dec 2020 12:36:32 +0000 (07:36 -0500)]
Merge pull request #7694 from slankdev/slankdev-use-zservsend-1

zebra: use zserv_send_message instead of writen

3 years agozebra: use zserv_send_message instead of writen
Hiroki Shirokura [Wed, 9 Dec 2020 08:17:13 +0000 (17:17 +0900)]
zebra: use zserv_send_message instead of writen

Following functions is using writen to dispatch message
into socket, but another function uses zserv_send_message.
This commit does tiny unification for zapi's socket messaging.

Funcs:
- zsend_assign_label_chunk_response()
- zsend_label_manager_connect_response()

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoospf6d : Code refactoring for route redistribution.
Kaushik [Mon, 9 Nov 2020 15:51:29 +0000 (07:51 -0800)]
ospf6d : Code refactoring for route redistribution.

1. Created new ospf6_redist structure.
2. Moved the 'route_map' structure from structure 'ospf6' to
   structure 'ospf6_redist'.
3. Added new message type OSPF6_REDISTRIBUTE.
4. Added the placeholder for metric option in structure ospf6_redist
   for redistribute.
5. Added few API's for route redistribute lookup, add & del.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
3 years agozebra, tests: Fix `show ip nht`
Donald Sharp [Tue, 8 Dec 2020 20:50:46 +0000 (15:50 -0500)]
zebra, tests: Fix `show ip nht`

The `show ip nht` and `show ipv6 nht` commands were broken.
This is because recent code commit: 0154d8ce45a5099d2d0b9dd3de4e

assumed that p must not be NULL and this is not the case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7684 from donaldsharp/metric_doc
Mark Stapp [Tue, 8 Dec 2020 17:16:43 +0000 (12:16 -0500)]
Merge pull request #7684 from donaldsharp/metric_doc

doc: Add some notes about RR semantics and the Linux Kernel

3 years agotests: Enhanced auto-rd verification as per changes done in #7652
kuldeepkash [Tue, 8 Dec 2020 15:50:16 +0000 (15:50 +0000)]
tests: Enhanced auto-rd verification as per changes done in #7652

1. As per recent changes done in PR #7652, we have modified the auto-rd verification logic
link: https://github.com/FRRouting/frr/pull/7652
Signed-off-by: kuldeepkash <kashyapk@vmware.com>
3 years agonhrpd: fix SA warning in nhrp_interface
Mark Stapp [Tue, 8 Dec 2020 14:10:10 +0000 (09:10 -0500)]
nhrpd: fix SA warning in nhrp_interface

Clear SA warning from recent nhrp cache code changes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: Update sharpd and bgpd documentation
Donald Sharp [Sat, 5 Dec 2020 20:41:53 +0000 (15:41 -0500)]
doc: Update sharpd and bgpd documentation

Update these two daemons to include the new
ability for both bgp and sharpd to send extra informational
data to zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd, zebra: Add ability for bgp to send AS-Path information to zebra
Donald Sharp [Sat, 5 Dec 2020 20:34:59 +0000 (15:34 -0500)]
bgpd, zebra: Add ability for bgp to send AS-Path information to zebra

Add a bit of code to allow bgp to send the AS-Path associated with
the route being installed to zebra so it can be displayed and
used as part of the `show ip route A` command in zebra.

eva# show ip route 20.0.0.0/11
Routing entry for 20.0.0.0/11
  Known via "bgp", distance 20, metric 0, best
  Last update 00:00:00 ago
  * 192.168.161.1, via enp39s0, weight 1
    AS-Path: 60000 64539 15096 6939 8075

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agosharpd, zebra: Pass and display opaque data as PoC
Donald Sharp [Sat, 5 Dec 2020 19:51:21 +0000 (14:51 -0500)]
sharpd, zebra: Pass and display opaque data as PoC

Pass data from sharpd to zebra as opaque data and display
it as part of the detailed route data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Setup structure for opaque data to be displayed
Donald Sharp [Sat, 5 Dec 2020 12:06:38 +0000 (07:06 -0500)]
zebra: Setup structure for opaque data to be displayed

Setup the output mechanism for opaque data to be displayed
to the end operator.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Gather opaque data into the route entry for storage
Donald Sharp [Sat, 5 Dec 2020 01:01:51 +0000 (20:01 -0500)]
zebra: Gather opaque data into the route entry for storage

Just gather the opaque data into the route entry.  Later
commits will display this data for end users as well as
to send it down.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Add encode/decode of opaque data
Donald Sharp [Sat, 5 Dec 2020 00:40:22 +0000 (19:40 -0500)]
lib: Add encode/decode of opaque data

Add a bit of code that allows for opaque data to be
sent from an upper level protocol to zebra.  This is just
pass through data that will be used as part of displaying
useful data about a route in a `show ip route` command
in future commits.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib, zebra: Fix overlapping message types
Donald Sharp [Mon, 7 Dec 2020 17:13:06 +0000 (12:13 -0500)]
lib, zebra: Fix overlapping message types

We had duplicate message id's.  Shit's broke yo.

Fix.  I have no idea how this properly worked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7683 from volta-networks/feat_zapi_client_close
Donald Sharp [Tue, 8 Dec 2020 14:05:00 +0000 (09:05 -0500)]
Merge pull request #7683 from volta-networks/feat_zapi_client_close

zebra: Adding zapi client close notification

3 years agodoc: Add some notes about RR semantics and the Linux Kernel
Donald Sharp [Tue, 8 Dec 2020 14:02:02 +0000 (09:02 -0500)]
doc: Add some notes about RR semantics and the Linux Kernel

Add doc about RR semantics for Linux Kernel and why it works
the way it does.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Adding zapi client close notification
Karen Schoener [Mon, 7 Dec 2020 23:01:01 +0000 (18:01 -0500)]
zebra: Adding zapi client close notification

When zebra detects a client close, send a zapi client close
notification.

Signed-off-by: Karen Schoener <karen@voltanet.io>
3 years agoMerge pull request #7681 from chiragshah6/mdev
Russ White [Mon, 7 Dec 2020 22:19:09 +0000 (17:19 -0500)]
Merge pull request #7681 from chiragshah6/mdev

bgpd: fix distance for aggregate route

3 years agoMerge pull request #7582 from AnuradhaKaruppiah/frr-reload-cleanup
Russ White [Mon, 7 Dec 2020 21:19:04 +0000 (16:19 -0500)]
Merge pull request #7582 from AnuradhaKaruppiah/frr-reload-cleanup

frr reload fixes for mac and ip normalization

3 years agoMerge pull request #7501 from pguibert6WIND/nhrp_map_fix
Russ White [Mon, 7 Dec 2020 21:17:39 +0000 (16:17 -0500)]
Merge pull request #7501 from pguibert6WIND/nhrp_map_fix

nhrpd: cache config may disappear if iface not present at startup