Commit Graph

80 Commits

Author SHA1 Message Date
Mark Stapp
988c4e27d1 zebra: handle config write for dataplane values
[7.2 version] Add the (single) dataplane config value
to the output of config write, 'show run'.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-25 14:27:12 -04:00
Mark Stapp
0bbd4ff442 zebra: move EVPN VTEP programming to dataplane
Move VTEP install/uninstall to the zebra dataplane. Remove
synch kernel-facing apis and helper functions.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-04 10:30:17 -04:00
Donald Sharp
c9042b2890
Merge pull request #4877 from mjstapp/dplane_neighs
zebra: move evpn neighbors to dataplane
2019-09-04 10:23:31 -04:00
Donald Sharp
dec2a1469f
Merge pull request #4812 from pogojotz/fix-destination-multi-use
zebra: Do not use connection dest for bcast
2019-08-26 09:25:17 -04:00
Mark Stapp
931fa60c09 zebra: Use dataplane for evpn neighbor changes
Move neighbor programming to the dataplane; remove
old apis; remove some ifdef'd use of direct netlink
code points, using neutral values outside of the netlink-
specific files.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-23 14:10:41 -04:00
Mark Stapp
f2412b2d19 zebra: begin evpn neighbor install via dataplane
Initial work to move evpn neighbor programming to the dataplane
subsystem.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-23 10:09:38 -04:00
Donald Sharp
ad4c7e8d4e
Merge pull request #4778 from mjstapp/dplane_macs
zebra: use dataplane for evpn macs
2019-08-21 20:26:29 -04:00
Juergen Werner
0f3af7386e zebra: Do not use connection dest for bcast
The `destination` field of the connection structure was used to store
the broadcast address, if the connection was not p2p. This multipurpose
is not very evident and the benefits over calculating the bcast address
on the fly minimal.

Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
2019-08-18 18:54:46 +02:00
Mark Stapp
0eca319cc0 zebra: make the dplane pthread name consistent
Make the dplane pthread's name consistent (lower-case)
with other pthreads.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-12 09:50:43 -04:00
Mark Stapp
4280d91ce8 zebra: update dplane stats output
Update the stats displayed by 'show zebra dplane' - some
counters had been added but not displayed. Also include
the new counters for evpn macs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-02 14:54:16 -04:00
Mark Stapp
036d93c047 zebra: use dataplane for vxlan remote mac programming
Move vxlan remote MAC install and uninstall to the async
dataplane.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-02 14:54:16 -04:00
Mark Stapp
7597ac7b4d zebra: initial dplane support for MAC updates
Initial data struct and api changes to support EVPN MAC
updates via the dataplane subsystem (no handlers yet).

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-07-26 14:17:31 -04:00
Mark Stapp
3fe4ccc437 zebra: rename internal dplane api
Rename an internal dplane api - it said "route", but it is
actually general-purpose.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-07-25 16:47:07 -04:00
Mark Stapp
7c7ef4a8c8 zebra: consolidate dataplane interface name and ifindex attrs
Move interface name and index to shared data struct, and remove
operation-specific values.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-07-25 14:01:22 -04:00
Donald Sharp
a36898e755
Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
Donald Sharp
a12bb225a6
Merge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2
Ospf missing interface handling 2
2019-06-22 13:35:45 -04:00
David Lamparter
c1344b54a8 zebra: use MTYPE_STATIC
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-06-21 08:54:25 +02:00
David Lamparter
2618a52ed3 *: config.h or zebra.h is the first #include
This is mostly relevant for Solaris, where config.h sets up some #define
that affect overall header behaviour, so it needs to be before anything
else.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-13 13:35:33 +02:00
Philippe Guibert
a41c4e1b1f *: change interface structure, from vrf_id to vrf
Field vrf_id is replaced by the pointer of the struct vrf *.
For that all other code referencing to (interface)->vrf_id is replaced.
This work should not change the behaviour.
It is just a continuation work toward having an interface API handling
vrf pointer only.

some new generic functions are created in vrf:
vrf_to_id, vrf_to_name,

a zebra function is also created:
zvrf_info_lookup

an ospf function is also created:
ospf_lookup_by_vrf

it is to be noted that now that interface has a vrf pointer, some more
optimisations could be thought through all the rest of the code. as
example, many structure store the vrf_id. those structures could get
the exact vrf structure if inherited from an interface vrf context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-06-12 14:10:28 +02:00
Mark Stapp
6a91ae9860 zebra: add setters for distance, instance
Add a few more 'setters' for dplane context objects.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-29 11:47:58 -04:00
Mark Stapp
188a00e014 zebra: generate updates from notifications
If an async notification changes a route that's current,
generate an update to keep the kernel in sync.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 13:41:37 -04:00
Mark Stapp
104e3ad95e zebra: mpls lsp async notifications
Add LSP notification event type; add a handler for LSP notifs;
dispatch to that handler.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 08:35:01 -04:00
Mark Stapp
3ab54059be zebra: add dplane context lsp setters
Add some setters for dataplane context LSP data to support
LSP async notifications.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 08:34:43 -04:00
Mark Stapp
9651af6181 zebra: add 'set' api for dplane context provider
Add a setter for the 'source provider' attribute in dplane
contexts.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 08:29:00 -04:00
Mark Stapp
0024a559c8 zebra: add source plugin info to dplane context
Some updates may be the result of a plugin's actions - such
as an async notification. Add accessor so that we can
identify that an update was generated by a plugin.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 08:28:49 -04:00
Mark Stapp
593e4eb1e8 zebra: add dplane context accessors
Add several accessors for data items needed to produce a
notification context.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 08:24:57 -04:00
Mark Stapp
54818e3b01 zebra: begin dataplane notifications
Add dataplane route notification type; add handler for zebra
routes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 08:22:27 -04:00
Mark Stapp
1dd4ea8a1a zebra: add a start callback for dplane plugins
Add a callback called at start time, once the dplane pthread
and thread_master are available. The callback is optional.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-28 08:16:22 -04:00
Donald Sharp
d8e479a355 zebra: ctx is dereferenced in every path
No need to check for non-null ctx at this point in the
function as that it has already been derefed.

Signed-off-by: donald Sharp ,sahrpd@cumulusnetworks.com>
2019-05-11 08:39:54 -04:00
Donald Sharp
eb6967279c zebra: Memory allocations do not fail
If a memory allocation fails then we *know* we assert
and core the program.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-05-03 05:05:19 -04:00
Mark Stapp
b7b7bf31da zebra: replace strncpy with strlcpy in dplane
The dataplane module picked up a couple of strncpys; replace
them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-05-02 09:52:48 -04:00
Mark Stapp
6416880328 zebra: Use dplane for interface addresses (netlink)
Start using the dataplane for interface-address programming,
on netlink platforms. Other platforms just stubbed at this
point.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-22 13:49:27 -04:00
Mark Stapp
a4a4802a9b zebra: add interface-address info for dataplane
Add data and accessor apis for interface-address information.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-22 13:49:27 -04:00
Mark Stapp
cf363e1bd8 zebra: dataplane notifications for system route changes
Add notifications from zebra to the dataplane subsystem when
kernel or connected routes change.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-10 16:07:01 -04:00
Mark Stapp
9677961ea5 zebra: support skip-kernel for dataplane updates
Support the skip-kernel flag for dataplane updates.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-03-13 11:19:51 -04:00
Mark Stapp
81793ac145 zebra: use const in dplane pw nhlfe accessors
Use const in the accessors for pseudowire nhlfe data; pull
that through the kernel-facing apis that use that data.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-03-07 15:06:36 -05:00
Mark Stapp
09cd307c62 zebra: dplane pseudowires including nexthop info
Add nexthop info to the data that the zebra dataplane captures
when programming pseudowires.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-03-07 15:06:36 -05:00
Mark Stapp
16d697870b zebra: rename pseudowire destination api
In prep for adding nexthop info for pws, rename the accessor
for the pw destination. Add a nexthop-group to the pw
data in the dataplane module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-03-07 15:06:01 -05:00
Quentin Young
76f0146890 *: do not check XMALLOC / XCALLOC for null ret
They never return NULL

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25 23:00:44 +00:00
Quentin Young
5b94ec5024 *: remove unnecessary semicolon from switches
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25 23:00:16 +00:00
Quentin Young
9f2d035447 *: remove useless return variables
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25 23:00:16 +00:00
Donald Sharp
4634d02cfd
Merge pull request #3684 from mjstapp/dplane_pw
zebra: async dataplane for pseudowires
2019-02-05 18:41:12 -05:00
Donald Sharp
2561d12e5d zebra: Remove struct zebra_t
This structure is unused anymore and does not belong in zserv.h

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-31 09:20:46 -05:00
Donald Sharp
3801e7646c zebra: Move the master thread handler to the zrouter structure
The master thread handler is really part of the zrouter structure.
So let's move it over to that.  Eventually zserv.h will only be
used for zapi messages.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-31 09:20:46 -05:00
Mark Stapp
9bd9717bb2 zebra: add handler for pw install errors
Add handler for async error results from the dataplane for
pseudowire installation attempts.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-25 10:45:57 -05:00
Mark Stapp
c10a646df4 zebra: handle pw updates in async dplane
Add kernel 'provider' support for pseudowire updates.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-25 10:45:57 -05:00
Mark Stapp
97d8d05a81 zebra: convert PW updates to async dataplane
Add accessors for pw attributes; init pw attributes;
replace 'hook' calls for pw install/uninstall with dplane
apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-25 10:45:57 -05:00
Mark Stapp
d613b8e1ed zebra: start pseudowire support
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-25 10:45:57 -05:00
Donald Sharp
1485bbe755 zebra: Add code to track sequence number from zebra_router
The sequence number used should be unique and increase by 1
for netlink commands.  This will allow the code to match
up batched commands to actual requests, so that we can signal
the failure correctly back.

So start the movement and tracking of sequence numbers as
an atomic uint32_t in zebra_router.  Modify the dataplane
code to start tracking contexts from this value.

In future commits we will move more of the sequencing
data into using this value.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-24 08:02:39 -05:00
Mark Stapp
16c628de99 zebra: infra for LSP updates using dplane
Adding infra to zebra dplane to support LSP updates. Add
kernel api for LSP updates that uses a dataplane context; add
stub apis for netlink, bsd, and 'null' kernel paths. Add
version of netlink mpls update code that takes a dplane
context struct instead of a zebra lsp struct.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-01-22 12:02:20 -05:00