Merge pull request #4695 from donaldsharp/zebra_zapi_msgs

Zebra zapi msgs - improve debugs
This commit is contained in:
Mark Stapp 2019-07-18 09:38:12 -04:00 committed by GitHub
commit facbec892e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 15 deletions

View File

@ -227,7 +227,6 @@ void pbr_nhgroup_add_cb(const char *name)
DEBUGD(&pbr_dbg_nht, "%s: Added nexthop-group %s", __PRETTY_FUNCTION__, DEBUGD(&pbr_dbg_nht, "%s: Added nexthop-group %s", __PRETTY_FUNCTION__,
name); name);
pbr_nht_install_nexthop_group(pnhgc, nhgc->nhg);
pbr_map_check_nh_group_change(name); pbr_map_check_nh_group_change(name);
} }

View File

@ -39,6 +39,7 @@
#include "zebra/label_manager.h" #include "zebra/label_manager.h"
#include "zebra/zebra_errors.h" #include "zebra/zebra_errors.h"
#include "zebra/zapi_msg.h" #include "zebra/zapi_msg.h"
#include "zebra/debug.h"
#define CONNECTION_DELAY 5 #define CONNECTION_DELAY 5
@ -116,6 +117,7 @@ int release_daemon_label_chunks(uint8_t proto, unsigned short instance)
int count = 0; int count = 0;
int ret; int ret;
if (IS_ZEBRA_DEBUG_PACKET)
zlog_debug("%s: Releasing chunks for client proto %s, instance %d", zlog_debug("%s: Releasing chunks for client proto %s, instance %d",
__func__, zebra_route_string(proto), instance); __func__, zebra_route_string(proto), instance);
@ -129,6 +131,7 @@ int release_daemon_label_chunks(uint8_t proto, unsigned short instance)
} }
} }
if (IS_ZEBRA_DEBUG_PACKET)
zlog_debug("%s: Released %d label chunks", __func__, count); zlog_debug("%s: Released %d label chunks", __func__, count);
return count; return count;
@ -371,6 +374,7 @@ int release_label_chunk(uint8_t proto, unsigned short instance, uint32_t start,
int ret = -1; int ret = -1;
/* check that size matches */ /* check that size matches */
if (IS_ZEBRA_DEBUG_PACKET)
zlog_debug("Releasing label chunk: %u - %u", start, end); zlog_debug("Releasing label chunk: %u - %u", start, end);
/* find chunk and disown */ /* find chunk and disown */
for (ALL_LIST_ELEMENTS_RO(lbl_mgr.lc_list, node, lmc)) { for (ALL_LIST_ELEMENTS_RO(lbl_mgr.lc_list, node, lmc)) {

View File

@ -1431,12 +1431,10 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
if (!CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP) if (!CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP)
|| api.nexthop_num == 0) { || api.nexthop_num == 0) {
char buf_prefix[PREFIX_STRLEN];
prefix2str(&api.prefix, buf_prefix, sizeof(buf_prefix));
flog_warn(EC_ZEBRA_RX_ROUTE_NO_NEXTHOPS, flog_warn(EC_ZEBRA_RX_ROUTE_NO_NEXTHOPS,
"%s: received a route without nexthops for prefix %s", "%s: received a route without nexthops for prefix %pFX from client %s",
__func__, buf_prefix); __func__, &api.prefix,
zebra_route_string(client->proto));
XFREE(MTYPE_RE, re); XFREE(MTYPE_RE, re);
return; return;
} }
@ -1938,6 +1936,7 @@ static void zread_get_label_chunk(struct zserv *client, struct stream *msg,
"Unable to assign Label Chunk of size %u to %s instance %u", "Unable to assign Label Chunk of size %u to %s instance %u",
size, zebra_route_string(proto), instance); size, zebra_route_string(proto), instance);
else else
if (IS_ZEBRA_DEBUG_PACKET)
zlog_debug("Assigned Label Chunk %u - %u to %s instance %u", zlog_debug("Assigned Label Chunk %u - %u to %s instance %u",
lmc->start, lmc->end, lmc->start, lmc->end,
zebra_route_string(proto), instance); zebra_route_string(proto), instance);

View File

@ -9719,6 +9719,7 @@ void zebra_vxlan_sg_replay(ZAPI_HANDLER_ARGS)
SET_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG); SET_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG);
if (!EVPN_ENABLED(zvrf)) { if (!EVPN_ENABLED(zvrf)) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug("VxLAN SG replay request on unexpected vrf %d", zlog_debug("VxLAN SG replay request on unexpected vrf %d",
zvrf->vrf->vrf_id); zvrf->vrf->vrf_id);
return; return;