summaryrefslogtreecommitdiff
path: root/zebra
AgeCommit message (Collapse)Author
2021-01-19Merge pull request #7233 from donaldsharp/route_map_optimizationsMark Stapp
Route map optimizations
2021-01-19Merge pull request #7723 from AnuradhaKaruppiah/fdb-ext-attrsPatrick Ruddy
zebra: move from NDA_NOTIFY to NDA_FDB_EXT_ATTRS
2021-01-18zebra: Tell SA that we are intentionally ignoring the returnDonald Sharp
Calling fpm_nl_enqueue we should expect a it fit or not return value on the outgoing stream. This is not necessary to check here because the while loop where we are checking this already has ensured that the data being written will fit. CID -> 1499854 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15zebra: A `zebra route-map delay-timer 0` command should still run the route-mapDonald Sharp
Setting `zebra route-map delay-timer 0` completely turns of any route-map processing in zebra. Which is completely wrong. A timer of 0 means `do it now`. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15zebra: Push timer out if another route-map change comes in for zebraDonald Sharp
If we are running with a delayed timer to handle route-map changes in zebra, if another route-map change is made to the cli, push out the timer instead of not modifying the timer. This will allow a large set of route-maps to be possibly be read in by the system and we don't have a state where new route-map changes are being read in and having the timer pop in the middle of it. Additionally convert to use THREAD_OFF, preventing a possible use after free as well as aligning the thread api usage with what we consider correct. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15zebra: Limit routemap changes to reconsider only routes associated with that rmDonald Sharp
Current code when a route map changes schedules a rerun of all routes in the particular table. So if you modify the `ip protocol XX route-map FOO` route-map `FOO` all routes will be rechecked. This is extremely expensive. Modify zebra to only update the routes associated with the route-map. So if we have 800k bgp routes and 50 ospf routes and we are route-map'ing the ospf routes we'll only look at 50 routes. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15zebra: Allow rib_update_table to receive a specified route typeDonald Sharp
When we need to cause a reprocessing of data the code currently marks all routes as needing to be looked at. Modify the rib_update_table code to allow us to specify a specific route type we only want to reprocess. At this point none of the code is behaving differently this is just setup for a future code change. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15zebra: remove unused function rib_update_vrfDonald Sharp
The function rib_update_vrf is never used. Remove it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15doc: Document the "zebra route-map delay-timer" functionalityDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15zebra: set nlmsg_pid in netlink msgs sent by 'fpm'Duncan Eastoe
Use nl_pid from the netlink socket used for programming the kernel (netlink_dplane) in netlink route messages sent by the 'fpm' module. This makes 'fpm' consistent with 'dplane_fpm_nl' which already behaves this way, and allows FPM server implementations to determine route origin via nlmsg_pid. Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
2021-01-15Merge pull request #7868 from mjstapp/fix_fpm_conn_upDonald Sharp
zebra: don't set connection-up event pointer directly
2021-01-14Merge pull request #7866 from kishorekunal01/fpm_dump_issueMark Stapp
zebra: Scale setup RMAC is send multiple time to fpm
2021-01-14zebra: don't set connection-up event pointer directlyMark Stapp
Use thread_cancel to reset the connection-up processing timer. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-01-14zebra: Scale setup RMAC is send multiple time to fpmKishore Kunal
Thread zfpm_conn_up_thread_cb can Yield and send RMAC multiple times to FPM. Signed-off-by: Kishore Kunal <kishorekunal01@broadcom.com>
2021-01-13zebra: in zebra_evpn_mac.c use size_t for buffer lengthDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-13zebra: Create a dump function for mac->flags and use itDonald Sharp
Create a function that can dump the mac->flags in human readable output and convert all debugs to use it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-13zebra: Create function to dump MACIP flagsDonald Sharp
Create a function to dump MACIP flags and to use it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-13Merge pull request #7819 from donaldsharp/more_data_for_debug_dumpsMark Stapp
zebra: Add ability to display human readable format re->flags and status
2021-01-13Merge pull request #7818 from donaldsharp/ip_proto_deniedMark Stapp
zebra: notify installing protocol when nexthops cannot be resolved
2021-01-13zebra: Add ability to display in human readable format re->flags and statusDonald Sharp
The re->flags and re->status in debugs were being dumped as hex values. I can never quickly decode this. Here is an idea. Let's let FRR do it for me. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-13Merge pull request #6853 from mjstapp/fix_rib_dupsDonald Sharp
zebra: reduce impact of route-update overload
2021-01-12Merge pull request #7850 from mjstapp/build_dplane_pluginDonald Sharp
zebra: build the sample dataplane plugin
2021-01-11zebra: add the sample dataplane plugin to the buildMark Stapp
Build the sample dataplane plugin with debug/dev builds. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-01-11zebra: remove unused local in dplane sample pluginMark Stapp
Remove an unused local in the sample dataplane plugin. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-01-11zebra: notify installing protocol when nexthops cannot be resolvedDonald Sharp
In the case where a routes nexthops cannot be resolved as part of route processing, immmediately notify the upper level protocol that their routes failed to install if they are interested in being informed about this issue. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-11Merge pull request #7823 from donaldsharp/zebra_delay_timerDonatas Abraitis
Zebra delay timer
2021-01-10Merge pull request #7652 from adharkar/frr-vni_switchDonald Sharp
zebra: L3VNI to L2VNI conversion is not handled
2021-01-09Merge pull request #7756 from pjdruddy/bgplu-fixesDonald Sharp
Bgplu fixes
2021-01-09Merge pull request #7787 from deastoe/fpm-work-ready-fixesDonald Sharp
dplane_fpm_nl: routes stuck with 'q' flag (revisited)
2021-01-08zebra: zebra route-map delay-timer is global not per vrfDonald Sharp
The zebra route-map delay timer value is a global value not a per vrf change. As such we should only print it out one time. We are seeing this: zebra route-map delay-timer 33 exit-vrf zebra route-map delay-timer 33 When we have 2 vrf's configured. Fix the code to only write it out for the default vrf Ticket: CM-32888 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-08zebra: Remove uncalled functionDonald Sharp
Remove the dead function zebra_route_map_write_delay_timer Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-08Merge pull request #7816 from pjdruddy/revert_labelmanager_staticsRenato Westphal
Revert labelmanager statics
2021-01-05Merge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-FixesMark Stapp
pbrd: pbr ipv4/ipv6 match fixes
2021-01-05zebra: expose label-manager util-funcsPat Ruddy
Revert "zebra: unexpose label-manager util-funcs as static" This reverts commit d3d9639d9a2251aa519b5399706ce816982001a1. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-05Merge pull request #7722 from AnuradhaKaruppiah/mh-fixesPatrick Ruddy
bgpd, zebra: evpn mh fixes
2021-01-04zebra: labelmanager could return reserved labelsPat Ruddy
when checking if there is a "hole" behind the current reservation marker the calculation of whether the hole is big enough to satisfy the requested chunk is out by 1. This could result in returning a label which has already been allocated. Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-04zebra: label manager should never return a reserved blockPat Ruddy
if the requested chunk size was less than 16 then a chunk within the reserved block would be returned. Make sure that we never return labels that are below MPLS_LABEL_UNRESERVED_MIN Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-12-29Merge pull request #7777 from volta-networks/fix_zebra_rib_c++Quentin Young
zebra: avoid c++ reserved keyword
2020-12-28Merge pull request #7788 from deastoe/zebra2proto-kernel-connectStephen Worley
zebra: zebra2proto() handle kernel/connect type
2020-12-23Merge pull request #7724 from donaldsharp/pbr_zebra_was_wrongMark Stapp
Pbr zebra was wrong
2020-12-22zebra: zebra2proto() handle kernel/connect typeDuncan Eastoe
When dplane_fpm_nl is used the "Please add this protocol(n) to proper rt_netlink.c handling" debug message is emitted for any route of type kernel or connected. This severely reduces performance of dplane_fpm_nl when large numbers of these routes are present in the RIB. The messages are not observed when using the original fpm module since this uses a custom function, netlink_proto_from_route_type(). zebra2proto() now returns RTPROT_KERNEL for ZEBRA_ROUTE_CONNECT and ZEBRA_ROUTE_KERNEL. This should only impact dplane_fpm_nl's use of the common netlink routines since these routes generally ignored via checking of RSYSTEM_ROUTE(). Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
2020-12-22zebra: fpm_nl_process() reschedule dp threadDuncan Eastoe
fpm_nl_process() now ensures that the dataplane thread is rescheduled if it hits the work limit while processing its incoming work queue. This would probably already occur due to some other event, such as fpm_process_queue() enqueuing completed work to the output queue, however it does no harm to add this explicit reschedule. Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
2020-12-22zebra: resched dp thread if output queue limit hitDuncan Eastoe
If the dataplane thread hits the work limit while processing the output queue for any given provider, we now explicitly reschedule the thread. Otherwise, if the number of items in the output queue is greater than the work limit, draining of that output queue is dependent on new dataplane work. Routes which are not drained from the output queue are stuck with the 'q' flag, so this is a similar issue to that observed in 164d8e86081fdf33992b6c45af446bac6103e20c. Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
2020-12-22Merge pull request #7767 from mjstapp/fix_dplane_extra_infoRafael Zalamena
zebra: fix loop logic in dplane for extra intf info
2020-12-22Merge pull request #7472 from opensourcerouting/fpm-fixesMark Stapp
fpm: frr-reload, IPv6 and an improvement
2020-12-21zebra: skip EVI setup if an ES is applied to a pseudo interfaceAnuradha Karuppiah
zebra maintains pseudo interface for hanging off user config after the interface is deleted in the kernel. If an user tried to config an ES against such an interface zebra would crash with the following call stack - at zebra/zebra_evpn_mh.c:2095 sysmac=sysmac@entry=0x55cfbadd3160) at zebra/zebra_evpn_mh.c:2258 at zebra/zebra_evpn_mh.c:3222 argv=<optimized out>, es_lid_str=<optimized out>, es_lid=1, no=0x0, vty=0x55cfbaf4c7b0) at zebra/zebra_evpn_mh.c:3222 argv=<optimized out>) at ./zebra/zebra_evpn_mh_clippy.c:202 vty=vty@entry=0x55cfbaf4c7b0, cmd=cmd@entry=0x0, filter=FILTER_RELAXED) at lib/command.c:1073 Ticket: CM-31702 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-21zebra: accept bgp remote mac-ip update if the higher-seq-local mac is not ↵Anuradha Karuppiah
bgp-ready If a local-MAC or local-neigh is not active locally it is not sent to BGP. At this point if BGP rxes a remote route it accepts it and installs in zebra. Zebra was rejecting BGP's update if it had a higher seq local (inactive) entry. This would result in bgp and zebra falling out of sync. In some cases zebra would delete the local-inactive entries in sometime (as a part of the dplane/kernel garbage collection). This would leave zebra with missing remote entries (which were still present in bgpd). This change allows lower-seq BGP updates to overwrite zebra's local entry if that entry happens to be local-inactive. Note: This logic was already in use for sync-mac-ip updates. Extended the same logic to remote-mac-ip updates. Ticket: CM-31626 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-21zebra: clean zevpn references in the access bd database when the VNI is deletedAnuradha Karuppiah
When an VNI was deleted as a part of FRR/zebra shutdown the zevpn entry was being freed without removing its reference in the access vlan entry (i.e. without clearing the VLAN->VNI mapping) used by MH. Ticket: CM-31197 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-21zebra: reinstall missing peer-sync flagAnuradha Karuppiah
If a netlink/dp notification is rxed for a neigh without the peer-sync flag FRR re-installs the entry with the right flags. This change is needed to handle cases where the dataplane and FRR may fall out of sync because of neigh learning on the network ports (i.e. via the VxLAN). Ticket: CM-30693 The problem was found during VM mobility "torture" tests where 100s of extended VM moves were done. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-21zebra: changes to log ext_flags in neigh nl addAnuradha Karuppiah
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>