diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 02:58:12 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 02:58:12 +0200 |
commit | 16286195e474b37e05fd5759927f16d73c833bbb (patch) | |
tree | 5ba83b5964ff6523b5d9ba5ce4231da57fe6692f /lib | |
parent | Changes to improve BGP convergence time: (diff) | |
download | frr-16286195e474b37e05fd5759927f16d73c833bbb.tar.xz frr-16286195e474b37e05fd5759927f16d73c833bbb.zip |
Overhual BGP debugs
Summary of changes
- added an option to enable keepalive debugs for a specific peer
- added an option to enable inbound and/or outbound updates debugs for a specific peer
- added an option to enable update debugs for a specific prefix
- added an option to enable zebra debugs for a specific prefix
- combined "deb bgp", "deb bgp events" and "deb bgp fsm" into "deb bgp neighbor-events". "deb bgp neighbor-events" can be enabled for a specific peer.
- merged "deb bgp filters" into "deb bgp update"
- moved the per-peer logging to one central log file. We now have the ability to filter all verbose debugs on a per-peer and per-prefix basis so we no longer need to keep log files per-peer. This simplifies troubleshooting by keeping all BGP logs in one location. The use
r can then grep for the peer IP they are interested in if they wish to see the logs for a specific peer.
- Changed "show debugging" in isis to "show debugging isis" to be consistent with all other protocols. This was very confusing for the user because they would type "show debug" and expect to see a list of debugs enabled across all protocols.
- Removed "undebug" from the parser for BGP. Again this was to be consisten with all other protocols.
- Removed the "all" keyword from the BGP debug parser. The user can now do "no debug bgp" to disable all BGP debugs, before you had to type "no deb all bgp" which was confusing.
The new parse tree for BGP debugging is:
deb bgp as4
deb bgp as4 segment
deb bgp keepalives [A.B.C.D|WORD|X:X::X:X]
deb bgp neighbor-events [A.B.C.D|WORD|X:X::X:X]
deb bgp nht
deb bgp updates [in|out] [A.B.C.D|WORD|X:X::X:X]
deb bgp updates prefix [A.B.C.D/M|X:X::X:X/M]
deb bgp zebra
deb bgp zebra prefix [A.B.C.D/M|X:X::X:X/M]
Diffstat (limited to 'lib')
-rw-r--r-- | lib/log.c | 22 | ||||
-rw-r--r-- | lib/log.h | 12 | ||||
-rw-r--r-- | lib/memtypes.c | 2 |
3 files changed, 2 insertions, 34 deletions
@@ -582,28 +582,6 @@ ZLOG_FUNC(zlog_debug, LOG_DEBUG) #undef ZLOG_FUNC -#define PLOG_FUNC(FUNCNAME,PRIORITY) \ -void \ -FUNCNAME(struct zlog *zl, const char *format, ...) \ -{ \ - va_list args; \ - va_start(args, format); \ - vzlog (zl, PRIORITY, format, args); \ - va_end(args); \ -} - -PLOG_FUNC(plog_err, LOG_ERR) - -PLOG_FUNC(plog_warn, LOG_WARNING) - -PLOG_FUNC(plog_info, LOG_INFO) - -PLOG_FUNC(plog_notice, LOG_NOTICE) - -PLOG_FUNC(plog_debug, LOG_DEBUG) - -#undef PLOG_FUNC - void _zlog_assert_failed (const char *assertion, const char *file, unsigned int line, const char *function) @@ -120,18 +120,6 @@ extern void zlog_info (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); extern void zlog_notice (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); extern void zlog_debug (const char *format, ...) PRINTF_ATTRIBUTE(1, 2); -/* For bgpd's peer oriented log. */ -extern void plog_err (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3); -extern void plog_warn (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3); -extern void plog_info (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3); -extern void plog_notice (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3); -extern void plog_debug (struct zlog *, const char *format, ...) - PRINTF_ATTRIBUTE(2, 3); - /* Set logging level for the given destination. If the log_level argument is ZLOG_DISABLED, then the destination is disabled. This function should not be used for file logging (use zlog_set_file diff --git a/lib/memtypes.c b/lib/memtypes.c index 00ed0a48e..ca3a4a4f7 100644 --- a/lib/memtypes.c +++ b/lib/memtypes.c @@ -146,6 +146,8 @@ struct memory_list memory_list_bgp[] = { MTYPE_TRANSIT, "BGP transit attr" }, { MTYPE_TRANSIT_VAL, "BGP transit val" }, { 0, NULL }, + { MTYPE_BGP_DEBUG_FILTER, "BGP debug filter" }, + { 0, NULL }, { MTYPE_BGP_DISTANCE, "BGP distance" }, { MTYPE_BGP_NEXTHOP_CACHE, "BGP nexthop" }, { MTYPE_BGP_CONFED_LIST, "BGP confed list" }, |