Commit graph

73 commits

Author SHA1 Message Date
Philippe Guibert a7fec9c387 zebra: add 'debug zebra srv6' command
Add a specific debug command to handle srv6 troubleshooting.
Move the srv6 traces that initially were under 'debug zebra packet'
debug.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-10-28 16:40:33 +01:00
Christian Hopps ef91d34f01 zebra: add zebra to mgmtd oper-state
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28 17:53:40 +00:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Mark Stapp 3edb3a644d zebra: fix flags used for debug dpdk
Use the correct flags for debug zebra dataplane dpdk options.

Signed-off-by: Mark Stapp <mjs@labn.net>
2022-12-13 17:02:29 -05:00
Siger Yang c317d3f246
zebra: traffic control state management
This allows Zebra to manage QDISC, TCLASS, TFILTER in kernel and do cleaning
jobs when it starts up.

Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-11-22 22:35:35 +08:00
David Lamparter 89cb86aeb0 build, vtysh: extract vtysh commands from .xref
Rather than running selected source files through the preprocessor and a
bunch of perl regex'ing to get the list of all DEFUNs, use the data
collected in frr.xref.

This not only eliminates issues we've been having with preprocessor
failures due to nonexistent header files, but is also much faster.
Where extract.pl would take 5s, this now finishes in 0.2s.  And since
this is a non-parallelizable build step towards the end of the build
(dependent on a lot of other things being done already), the speedup is
actually noticeable.

Also files containing CLI no longer need to be listed in `vtysh_scan`
since the .xref data covers everything.  `#ifndef VTYSH_EXTRACT_PL`
checks are equally obsolete.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26 17:12:34 +01:00
Donald Sharp cf00164b69 *: Create and use infrastructure to show debugs in lib
There are lib debugs being set but never show up in
`show debug` commands because there was no way to show
that they were being used.  Add a bit of infrastructure
to allow this and then use it for `debug route-map`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-10-07 12:39:05 -04:00
Anuradha Karuppiah 36c3b29675 zebra: infastructure for the new dataplane plugin
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2022-06-27 07:56:55 -04:00
Anuradha Karuppiah 4cf4fad153 zebra: add support for maintaining local neigh entries
Currently specific local neighbors (attached to SVIs) are maintatined
in an EVPN specific database. There is a need to maintain L3 neighbors
for other purposes including MAC resolution for PBR nexthops.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
   Cleanup compile and fix crash
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2022-06-27 07:56:55 -04:00
Donald Sharp 38ef05ea33 zebra: debug zebra kernel msgdump is linux specific
The command `debug zebra kernel msgdump is netlink specific.
There is no point at all to allow this to be configed on non
netlink platforms.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-08-06 10:04:40 -04:00
Philippe Guibert 077c07cc58 zebra: storage of gre information in zebra layer
zebra is able to get information about gre tunnels.
zebra_gre file is created to handle hooks, but is not yet used.
also, debug zebra gre command is done to add gre traces.
A zebra_gre file is used for complementary actions that may be needed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-04-30 10:33:15 +02:00
Donald Sharp 4d0773c4ea zebra: msgdump debug strangeness cleanup
a) `debug zebra kernel` turns off `debug zebra kernel msgdump....`
this is odd and bad

b) `debug zebra kernel msgdump send` turns off receive and vice versa
this is counter intuitive as well

c) `no zebra kernel msgdump ...` turns off all kernel level debugging
we should only turn off msgdump specific debugs

d) `no debug zebra kernel` turns off all kernel level debugging
we should leave msgdump on.

e) Fix `show run` and show debug output

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-29 08:22:53 -04:00
Mark Stapp 04dda09218 zebra: add 'detail' mpls debug setting
Add setting and cli for 'debug zebra mpls detail'.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-04-05 15:53:48 -04:00
Stephen Worley 8eeca5a201 zebra: add some debugging for PBR events in zebra
Add some debugging for PBR events internal to zebra,
specifically ADD/UPDATE/DELETE of pbr rules.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2021-02-01 13:32:37 -05:00
Igor Ryzhov dd73744d8c *: move "show debugging ..." commands to enable node
Use the same node for "show debugging" commands in all daemons.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02 15:06:05 +03:00
Anuradha Karuppiah f188e68e5c zebra: debug flags for MAC-IP sync
Filters for zebra debug logs.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05 06:46:13 -07:00
Anuradha Karuppiah 94eb163591 zebra: debug flags for evpn-mh ES and MAC-ECMP
Filters for MH debug logs

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05 06:46:12 -07:00
David Lamparter f4b8291fcb *: move CLI node names to cmd_node->name
And again for the name.  Why on earth would we centralize this, just so
people can forget to update it?

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:59 +02:00
David Lamparter 612c2c15d8 *: remove second parameter on install_node()
There is really no reason to not put this in the cmd_node.

And while we're add it, rename from pointless ".func" to ".config_write".

[v2: fix forgotten ldpd config_write]

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter 249a771b63 *: remove cmd_node->vtysh
The only nodes that have this as 0 don't have a "->func" anyway, so the
entire thing is really just pointless.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
David Lamparter 62b346eefa *: clean up cmd_node initializers
... and use named assignments everywhere (so I can change the struct.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16 12:53:00 +02:00
Anuradha Karuppiah ef011a4287 zebra: mlag debug was not being persisted
Added the mlag keyword to the config level also (in addition to the
view level).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-02-14 09:18:30 -08:00
Mark Stapp cb6070bd79 zebra: include zebra nexthop debug in show runn
Add show output for 'debug zebra nexthop [detail]' category.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-01-21 09:26:44 -05:00
Mark Stapp d4b4b70cdc zebra: add a debug category for nexthops
Add a category for nexthops and nh-groups, since we've got
quite a bit of code in there now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-23 08:47:38 -05:00
Donald Sharp 50872b0804 zebra: Add detailed debugging command for NHT tracking
Add a detailed debugging command for NHT tracking and add
the detailed output to the log about why we make some decisions
that we are.  I tried to model this like the rib processing
detailed debugs that we added a few months back.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-27 16:22:22 -04:00
Donald Sharp 236667251d zebra: Add code to allow us to add debug for mlag
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-31 09:20:46 -05:00
Mark Stapp 5709131cec zebra: resolve style issues in dplane commit
Resolve (most) style issues in the initial zebra dataplane
commit branch.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-10-25 08:34:30 -04:00
Mark Stapp 5be41a1c8b zebra: fix debug dplane cli
Fix debug dplane cli doc text; mismatch caused a vtysh error.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-09-19 18:34:25 -04:00
Mark Stapp 6582b00201 zebra: add 'debug dplane' support and cli
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-09-19 18:34:25 -04:00
Philippe Guibert 77151b6f01 zebra: PBR show debugging IPSET/IPTABLE hooks declared
This hook can be used if the plugin module wrap_script is used.
This hook is called to dump the debugging status of this module, on the
vty.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-05-25 15:49:38 +02:00
Lou Berger 996c93142d *: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06 14:04:32 -05:00
Renato Westphal efd7904eab *: add missing \n in some help strings
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-24 19:30:30 -02:00
Daniel Walton 66b8ce1a17 Merge branch 'master' into bgpd-debug-updates-prefix 2017-09-27 09:21:26 -04:00
Donald Sharp 95744ad864 zebra: Display if we are debugging zebra vxlan or not
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-26 15:43:23 -04:00
Daniel Walton 8527ce3a31 zebra: return CMD_SUCCESS when enabling debugs 2017-09-19 14:01:28 +00:00
Donald Sharp 87f6dc504d *: Add 'show debugging' command from vtysh
Allow vtysh to query every daemon about its
debugging status in one go.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-21 07:23:59 -04:00
David Lamparter 69965f533a zebra: fix pseudowire code re. upstream changes
- VTY_NEWLINE is out
- thread API changed with the extra arg
- struct rib got renamed to struct route_entry
- MPLS_NO_LABEL was removed
- RB-tree implementation has some extra args

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-09 13:03:39 +02:00
ßingen 6833ae01bc zebra: add pseudowire manager
Base framework for supporting MPLS pseudowires in FRR.

A consistent zserv interface is provided so that any client daemon
(e.g. ldpd, bgpd) can install/uninstall pseudowires in a standard
way. Static pseudowires can also be implemented by using the same
interface.

When zebra receives a request to install a pseudowire and the installation
in the kernel or hardware fails, a notification is sent back to the
client daemon and a new install attempt is made every 60 seconds (until
it succeeds).

Support for external dataplanes is provided by the use of hooks to
install/uninstall pseudowires.

Signed-off-by: ßingen <bingen@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-09 12:35:15 +02:00
Daniel Walton ba9d46ff14 zebra: debug cleanup
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-07-25 12:07:07 -07:00
whitespace / reindent d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
Donald Sharp 2850f0ea58 bgpd, zebra: Cleanup warnings from new code
1) Clean up VTY_NEWLINE -> \n
2) Remove usages of VTY_GET_INTEGER

Signed-off-by: Donald Sharp
2017-07-14 08:52:45 -04:00
Donald Sharp 1ea6b3f237 Merge remote-tracking branch 'origin/master' into evpn_plus_struct_attr 2017-07-14 08:24:46 -04:00
Donald Sharp da571b7a6c Merge remote-tracking branch 'origin/master' into evpn_plus_struct_attr 2017-07-14 08:11:05 -04:00
David Lamparter 2d8270596a Merge remote-tracking branch 'frr/master' into newline-redux
Lots of conflicts from CMD_WARNING_CONFIG_FAILED...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 13:07:30 +02:00
David Lamparter 55f70b671f *: remove VTYNL, part 4 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +02:00
David Lamparter 26a429fe8e *: remove VTYNL, part 2 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:02 +02:00
Daniel Walton f1a05de982 vtysh: return non-zero for configuration failures
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

This allows frr-reload.py (or anything else that scripts via vtysh)
to know if the vtysh command worked or hit an error.
2017-07-13 19:56:08 +00:00
vivek 13d60d351c zebra: VNI and VTEP handling
Implement fundamental handling for VNIs and VTEPs:
- Handle EVPN enable/disable by client (advertise-all-vni)
- Create/update/delete VNIs based on VxLAN interface events and inform
client
- Handle VTEP add/delete from client and install into kernel
- New debug command for VxLAN/EVPN
- kernel interface (Linux/netlink only)

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-12 12:26:02 -04:00
Quentin Young 1318e7c841 *: s/VTY_NEWLINE/VTYNL/g
Should be able to fit more vty_out onto one line now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:54 +00:00
David Lamparter 896014f4bc *: make consistent & update GPLv2 file headers
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)

Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15 16:37:41 +02:00