summaryrefslogtreecommitdiff
path: root/zebra/zebra_dplane.c
AgeCommit message (Collapse)Author
2020-08-26zebra: Short circuit test for nexthop groups when not usingDonald Sharp
When we are not using nexthop groups, there is no need to test for whether or not they are installed correctly or not Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-08-14Merge pull request #6883 from pjdruddy/evpn-refactorDonald Sharp
Evpn refactor
2020-08-12lib, zebra: add support for sending ARP requestsJakub Urbańczyk
We can make the Linux kernel send an ARP/NDP request by adding a neighbour with the 'NUD_INCOMPLETE' state and the 'NTF_USE' flag. This commit adds new dataplane operation as well as new zapi message to allow other daemons send ARP/NDP requests. Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-12zebra: Revert "zebra: probe local inactive neigh"Chirag Shah
Reverting probing of neigh entry. There is a timing where probe and remote macip add request comes at the same time resulting in neigh to remain in local state event though it should be remote. In mobility case, the host moves to remote VTEP, first MAC only type-2 route is received which triggers a PROBE of neighs (associated to MAC). PROBE request can go via network port to remote VTEP. PROBE request picks up local neigh with MAC entry's outgoing port is remote VTEP tunnel port. The PROBE reply and MAC-IP (containing IP) almost comes same time at DUT. DUT first processes remote macip and installs neigh as remote. Followed by receives neigh as REACHABLE which marks neigh as LOCAL. FRR does have BPF filter which does not allow its own netlink request to receive. Otherwise frr's request to program neigh as remote can move neigh from local to remote. Though ordering can not be guranteed that REACHABLE (PROBE's repsonse) can come at anytime and move it to LOCAL. This fix would not suffice the needs of converging LOCAL inactive neighs to remove from DB. As mobility draft sugges to PROBE local neigh when MAC moves to remote but it is not working with current framework. Ticket:CM-22864 This reverts commit 44bc8ae5508975f216ad1cbb42884579896e7258 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-08-10zebra: design changes in netlink batching codeJakub Urbańczyk
Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-10zebra: remove old kernel one-update-at-a-time apiJakub Urbańczyk
The old one is replaced by the api that is suitable for the batching. Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-10zebra: remove "PENDING" dplane request stateJakub Urbańczyk
This request state is redundant with new message batching interface. Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-10zebra: prepare dplane for batchingJakub Urbańczyk
Extend kernel interface to allow the data plane to send many kernel updates at once. Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-06Merge pull request #6587 from AnuradhaKaruppiah/evpn-mh-pr-1Rafael Zalamena
EVPN Multihoming part-1
2020-08-05zebra: debug flags for MAC-IP syncAnuradha Karuppiah
Filters for zebra debug logs. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05zebra: support for adding L2NHG and mac-ecmp in the linux kernelAnuradha Karuppiah
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>
2020-08-04zebra: fix SA warning in dataplaneMark Stapp
A previous SA fix introduced ... a different SA warning; fix it. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-30zebra: fix SA warning, handle return codeMark Stapp
Handle a return code, resolving an SA warning Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-27Merge pull request #6765 from mjstapp/backup_nhg_netlinkRenato Westphal
lib,zebra: support multiple backup nexthops
2020-07-23Merge pull request #6730 from wesleycoakley/pbrd-dscp-ecnRuss White
DSCP / ECN-based PBR Matching
2020-07-20zebra: include backup nexthops for pseudowiresMark Stapp
Include any installed backup nexthops when installing pseudowires; include installed backups in vty and json pw show output. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-20zebra: improve vty, simplify some primary/backup codeMark Stapp
Improve vty output for routes and lsps with backups, including json. Simplify or correct some code that uses both primary and backup nexthops in dplane, nht. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-16zebra: include installed backup nexthops in kernel updateMark Stapp
Include any installed backups when updating the local kernel after processing an async notification. This includes routes' nexthops and LSPs' nhlfes. Add the 'b' character to the route show display and header to indicate backup nexthops. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-15pbrd, zebra, lib: DSCP / ECN-based PBR MatchingWesley Coakley
Extend PBR maps to discriminate by Differentiated Services Code Point and / or Explicit Congestion Notification fields. These fields are used in the IP header for classifying network traffic. 0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | DS FIELD, DSCP | ECN FIELD | +-----+-----+-----+-----+-----+-----+-----+-----+ DSCP: differentiated services codepoint ECN: Explicit Congestion Notification Signed-off-by: Wesley Coakley <wcoakley@nvidia.com> Signed-off-by: Saurav Kumar Paul <saurav@cumulusnetworks.com>
2020-07-14*: un-split strings across linesDavid Lamparter
Remove mid-string line breaks, cf. workflow doc: .. [#tool_style_conflicts] For example, lines over 80 characters are allowed for text strings to make it possible to search the code for them: please see `Linux kernel style (breaking long lines and strings) <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_ and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-07zebra: add init api for dplane lsp contextMark Stapp
Add an init api (based on what had been a private/static api) to allow a caller to init a context and use it to generate LSP updates. This might be useful for testing, or from a dplane plugin. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-07zebra: use fib nexthops for pseudowiresMark Stapp
Make sure to use the installed/fib set of nexthops when capturing info about pseudowire updates. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-07zebra: add const to mpls and dplane nhlfe apisMark Stapp
Add const to an arg to a couple of the dplane and mpls module apis that add nhlfes to LSPs. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-07zebra: add fib nhg for backups, revise apiMark Stapp
Add an nhg for the fib-installed backup nexthops; rename an api to access the fib-installed nexthop nhg. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-07zebra: add dplane backup nhg apiMark Stapp
Add an api to allow a dplane plugin to set a route's backup nexthops. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-26zebra: prepare data plane for batchingJakub Urbańczyk
* Add new zebra_dplane_result to allow kernel updates not to return a result immediately. Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-06-12zebra: avoid an atomic builtin that clang doesn't likeMark Stapp
We had special-cased use of atomic_add_fetch, because clang just does not like that builtin. Just use atomic_fetch_add instead. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-10zebra: convert ip rule installation to use dplane threadJakub Urbańczyk
* Implement new dataplane operations * Convert existing code to use dataplane context object * Modify function preparing netlink message to use dataplane context object Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-06-10zebra: prepare dplane to deal with pbr rulesJakub Urbańczyk
This commit is the first step to convert IP rule installation to use dplane thread. * Add dataplane's internal representation of a pbr rule * Add dplane stats related to rules * Introduce a new type of dplane operation Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-06-02zebra: add zebra opaque moduleMark Stapp
Add the zebra_opaque module, designed to offload some opaque zapi message processing to a new, dedicated pthread. Add to the build; also re-sort the lists of zebra files in subdir.am. Start, stop, and clean-up the opaque module, integrate with zebra start and shutdown. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01Merge pull request #6480 from volta-networks/feat_pwstatusRenato Westphal
ldpd: Relay data plane pseudowire status in LDP notification
2020-06-01zebra: support backup nhlfes in LSPsMark Stapp
Handle backup nhlfes in LSP zapi messages. Capture backup info with LSPs, capture backup info in the dataplane LSP processing. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01zebra: convert LSP nhlfe lists to use typesafe listsMark Stapp
Convert the embedded lists of nhlfes and snhlfes in zebra LSPs and SLSPs to use typesafe dlists. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-01ldpd: Relay data plane pseudowire status in LDP notificationKaren Schoener
Provide a way for the data plane to indicate pseudowire status (such as: not forwarding, AC failure). On a data plane pseudowire install failure, data plane sets the pseudowire status. Zebra relays the pseudowire status to LDP. LDP includes the pseudowire status in the LDP notification to the LDP peer. Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-05-19Merge pull request #6351 from opensourcerouting/fpm-nhStephen Worley
fpm: explicit next hop groups control
2020-05-13zebra: format files to make polychaeta happyRafael Zalamena
Use clang-format to make code match what polychaeta wants for formatting. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-08zebra: Remove typedef rib_table_info_t from systemDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-05fpm: send all next hop groups on startupRafael Zalamena
Implement the next hop group send on startup if you are using them. Normally you will only have them if you are already using this Linux kernel feature. NOTE: to make sure all next hop groups exist, we send/enqueue all next hop groups first and then we send routes. The RIB route walk start is at the end of the function `fpm_nhg_send()`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-17zebra: notify data plane providers about shutdownRafael Zalamena
Call the `dp_fini` callback twice: once at the beginning of the shutdown and then again right before `exit()`ing zebra. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-14Merge pull request #6211 from mjstapp/fix_zebra_covQuentin Young
zebra: fix some coverity SA warnings
2020-04-14zebra: data plane FPM add support RMAC VNIRafael Zalamena
Store VNI information in the data plane context so we can use it to build the FPM netlink update with that information later. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-14zebra: data plane FPM RIB walk codeRafael Zalamena
Implement the code that walks the RIB to send routes that are already inside the RIB. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-14zebra: dataplane context reset and init apisMark Stapp
Add a public reset api, so a context can be reset and reused; add apis to init a context for a route or mac update. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-14zebra: fix some coverity SA warningsMark Stapp
Fix several coverity scan warnings. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-03-27zebra: add per-nexthop backup indexMark Stapp
Use a backup index in a nexthop directly (if it has a backup nexthop); revise the zebra nhe/nhg code; revise zapi route decoding to match; revise the dataplane route datastructs. Refactor some of the rib_add_multipath code to be prepared to be called with an nhe, carrying nexthop and (possibly) backup info together. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-03-10treewide: fix some issues found with -Werror=undefRuben Kerkhof
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-02-27zebra: Embed lib nexthop-group in zebra hash entryMark Stapp
Embed nexthop-group, which is just a pointer, in the zebra nexthop-hash-entry object, rather than mallocing one. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-02-03*: don't null after XFREE; XFREE does this itselfQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-13Merge pull request #5452 from mjstapp/fix_notify_nhgDonald Sharp
zebra: align dplane notify processing with nhg work
2019-12-09lib,zebra: add api to enforce nexthop sort order when copyingMark Stapp
Add an api that creates a copy of a list of nexthops and enforces the canonical sort ordering; consolidate some nhg code to avoid copy-and-paste. The zebra dplane uses that api when a plugin sets up a list of nexthops, ensuring that the plugin's list is ordered when it's processed in zebra. Signed-off-by: Mark Stapp <mjs@voltanet.io>