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 /bgpd/bgp_routemap.c | |
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 'bgpd/bgp_routemap.c')
-rw-r--r-- | bgpd/bgp_routemap.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index e9a19f93d..2a88f0f08 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -2652,7 +2652,7 @@ bgp_route_map_process_peer (char *rmap_name, struct peer *peer, if (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG)) { - if (BGP_DEBUG(events, EVENTS)) + if (bgp_debug_update(peer, NULL, 1)) zlog_debug("Processing route_map %s update on " "peer %s (inbound, soft-reconfig)", rmap_name, peer->host); @@ -2663,7 +2663,7 @@ bgp_route_map_process_peer (char *rmap_name, struct peer *peer, || CHECK_FLAG (peer->cap, PEER_CAP_REFRESH_NEW_RCV)) { - if (BGP_DEBUG(events, EVENTS)) + if (bgp_debug_update(peer, NULL, 1)) zlog_debug("Processing route_map %s update on " "peer %s (inbound, route-refresh)", rmap_name, peer->host); @@ -2699,7 +2699,7 @@ bgp_route_map_process_peer (char *rmap_name, struct peer *peer, if (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG)) { - if (BGP_DEBUG(events, EVENTS)) + if (bgp_debug_update(peer, NULL, 1)) zlog_debug("Processing route_map %s update on " "peer %s (import, soft-reconfig)", rmap_name, peer->host); @@ -2709,7 +2709,7 @@ bgp_route_map_process_peer (char *rmap_name, struct peer *peer, else if (CHECK_FLAG (peer->cap, PEER_CAP_REFRESH_OLD_RCV) || CHECK_FLAG (peer->cap, PEER_CAP_REFRESH_NEW_RCV)) { - if (BGP_DEBUG(events, EVENTS)) + if (bgp_debug_update(peer, NULL, 1)) zlog_debug("Processing route_map %s update on " "peer %s (import, route-refresh)", rmap_name, peer->host); @@ -2725,7 +2725,7 @@ bgp_route_map_process_peer (char *rmap_name, struct peer *peer, filter->map[RMAP_OUT].map = route_map_lookup_by_name (filter->map[RMAP_OUT].name); - if (BGP_DEBUG(events, EVENTS)) + if (bgp_debug_update(peer, NULL, 0)) zlog_debug("Processing route_map %s update on peer %s (outbound)", rmap_name, peer->host); @@ -2817,7 +2817,7 @@ bgp_route_map_process_update (void *arg, char *rmap_name, int route_update) peer->default_rmap[afi][safi].map = route_map_lookup_by_name (peer->default_rmap[afi][safi].name); - if (BGP_DEBUG(events, EVENTS)) + if (bgp_debug_update(peer, NULL, 0)) zlog_debug("Processing route_map %s update on " "default-originate", rmap_name); @@ -2838,7 +2838,7 @@ bgp_route_map_process_update (void *arg, char *rmap_name, int route_update) { bgp->table_map[afi][safi].map = route_map_lookup_by_name (bgp->table_map[afi][safi].name); - if (BGP_DEBUG(events, EVENTS)) + if (BGP_DEBUG (zebra, ZEBRA)) zlog_debug("Processing route_map %s update on " "table map", rmap_name); if (route_update) @@ -2861,7 +2861,7 @@ bgp_route_map_process_update (void *arg, char *rmap_name, int route_update) if (route_update) if (!bgp_static->backdoor) { - if (BGP_DEBUG(events, EVENTS)) + if (bgp_debug_zebra(&bn->p)) zlog_debug("Processing route_map %s update on " "static route %s", rmap_name, inet_ntop (bn->p.family, &bn->p.u.prefix, @@ -2883,7 +2883,7 @@ bgp_route_map_process_update (void *arg, char *rmap_name, int route_update) if (bgp->redist[afi][i] && route_update) { - if (BGP_DEBUG(events, EVENTS)) + if (BGP_DEBUG (zebra, ZEBRA)) zlog_debug("Processing route_map %s update on " "redistributed routes", rmap_name); @@ -2908,14 +2908,8 @@ bgp_route_map_update_timer(struct thread *thread) bgp->t_rmap_update = NULL; - if (BGP_DEBUG(events, EVENTS)) - zlog_debug("Started processing route map update"); - route_map_walk_update_list((void *)bgp, bgp_route_map_process_update_cb); - if (BGP_DEBUG(events, EVENTS)) - zlog_debug("Finished processing route map update"); - return (0); } @@ -2929,9 +2923,6 @@ bgp_route_map_mark_update (char *rmap_name) { if (bgp->t_rmap_update == NULL) { - if (BGP_DEBUG(events, EVENTS)) - zlog_debug("Starting route map update timer (in %d secs)", - bgp->rmap_update_timer); /* rmap_update_timer of 0 means don't do route updates */ if (bgp->rmap_update_timer) bgp->t_rmap_update = @@ -2946,9 +2937,6 @@ bgp_route_map_mark_update (char *rmap_name) static void bgp_route_map_add (const char *rmap_name) { - if (BGP_DEBUG (events, EVENTS)) - zlog_debug ("received route-map add of %s", rmap_name); - if (route_map_mark_updated(rmap_name, 0) == 0) bgp_route_map_mark_update(rmap_name); @@ -2958,9 +2946,6 @@ bgp_route_map_add (const char *rmap_name) static void bgp_route_map_delete (const char *rmap_name) { - if (BGP_DEBUG (events, EVENTS)) - zlog_debug ("received route-map delete of %s", rmap_name); - if (route_map_mark_updated(rmap_name, 1) == 0) bgp_route_map_mark_update(rmap_name); @@ -2970,9 +2955,6 @@ bgp_route_map_delete (const char *rmap_name) static void bgp_route_map_event (route_map_event_t event, const char *rmap_name) { - if (BGP_DEBUG (events, EVENTS)) - zlog_debug ("received route-map event for %s", rmap_name); - if (route_map_mark_updated(rmap_name, 0) == 0) bgp_route_map_mark_update(rmap_name); |