mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
isisd: add guard debug when compiling with EXTREME_DEBUG
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
627fa28a42
commit
b081493527
|
@ -312,8 +312,10 @@ void isis_circuit_add_addr(struct isis_circuit *circuit,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug("Added IP address %pFX to circuit %s",
|
if (IS_DEBUG_EVENTS)
|
||||||
connected->address, circuit->interface->name);
|
zlog_debug("Added IP address %pFX to circuit %s",
|
||||||
|
connected->address,
|
||||||
|
circuit->interface->name);
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
}
|
}
|
||||||
if (connected->address->family == AF_INET6) {
|
if (connected->address->family == AF_INET6) {
|
||||||
|
@ -350,8 +352,10 @@ void isis_circuit_add_addr(struct isis_circuit *circuit,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug("Added IPv6 address %pFX to circuit %s",
|
if (IS_DEBUG_EVENTS)
|
||||||
connected->address, circuit->interface->name);
|
zlog_debug("Added IPv6 address %pFX to circuit %s",
|
||||||
|
connected->address,
|
||||||
|
circuit->interface->name);
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,9 +685,11 @@ int isis_circuit_up(struct isis_circuit *circuit)
|
||||||
ETH_ALEN);
|
ETH_ALEN);
|
||||||
}
|
}
|
||||||
#ifdef EXTREME_DEGUG
|
#ifdef EXTREME_DEGUG
|
||||||
zlog_debug("isis_circuit_if_add: if_id %d, isomtu %d snpa %s",
|
if (IS_DEBUG_EVENTS)
|
||||||
circuit->interface->ifindex, ISO_MTU(circuit),
|
zlog_debug(
|
||||||
snpa_print(circuit->u.bc.snpa));
|
"isis_circuit_if_add: if_id %d, isomtu %d snpa %s",
|
||||||
|
circuit->interface->ifindex, ISO_MTU(circuit),
|
||||||
|
snpa_print(circuit->u.bc.snpa));
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
|
|
||||||
circuit->u.bc.adjdb[0] = list_new();
|
circuit->u.bc.adjdb[0] = list_new();
|
||||||
|
|
|
@ -101,11 +101,13 @@ static int isis_multicast_join(int fd, int registerto, int if_num)
|
||||||
mreq.mr_type = PACKET_MR_ALLMULTI;
|
mreq.mr_type = PACKET_MR_ALLMULTI;
|
||||||
}
|
}
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug(
|
if (IS_DEBUG_EVENTS)
|
||||||
"isis_multicast_join(): fd=%d, reg_to=%d, if_num=%d, address = %02x:%02x:%02x:%02x:%02x:%02x",
|
zlog_debug(
|
||||||
fd, registerto, if_num, mreq.mr_address[0], mreq.mr_address[1],
|
"isis_multicast_join(): fd=%d, reg_to=%d, if_num=%d, address = %02x:%02x:%02x:%02x:%02x:%02x",
|
||||||
mreq.mr_address[2], mreq.mr_address[3], mreq.mr_address[4],
|
fd, registerto, if_num, mreq.mr_address[0],
|
||||||
mreq.mr_address[5]);
|
mreq.mr_address[1], mreq.mr_address[2],
|
||||||
|
mreq.mr_address[3], mreq.mr_address[4],
|
||||||
|
mreq.mr_address[5]);
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq,
|
if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq,
|
||||||
sizeof(struct packet_mreq))) {
|
sizeof(struct packet_mreq))) {
|
||||||
|
|
|
@ -511,10 +511,12 @@ static struct isis_vertex *isis_spf_add_root(struct isis_spftree *spftree)
|
||||||
isis_vertex_queue_append(&spftree->paths, vertex);
|
isis_vertex_queue_append(&spftree->paths, vertex);
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug("ISIS-SPF: added this IS %s %s depth %d dist %d to PATHS",
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
vtype2string(vertex->type),
|
zlog_debug(
|
||||||
vid2string(vertex, buff, sizeof(buff)), vertex->depth,
|
"ISIS-SPF: added this IS %s %s depth %d dist %d to PATHS",
|
||||||
vertex->d_N);
|
vtype2string(vertex->type),
|
||||||
|
vid2string(vertex, buff, sizeof(buff)), vertex->depth,
|
||||||
|
vertex->d_N);
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
|
|
||||||
return vertex;
|
return vertex;
|
||||||
|
@ -629,11 +631,13 @@ isis_spf_add2tent(struct isis_spftree *spftree, enum vertextype vtype, void *id,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug(
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
"ISIS-SPF: add to TENT %s %s %s depth %d dist %d adjcount %d",
|
zlog_debug(
|
||||||
print_sys_hostname(vertex->N.id), vtype2string(vertex->type),
|
"ISIS-SPF: add to TENT %s %s %s depth %d dist %d adjcount %d",
|
||||||
vid2string(vertex, buff, sizeof(buff)), vertex->depth,
|
print_sys_hostname(vertex->N.id),
|
||||||
vertex->d_N, listcount(vertex->Adj_N));
|
vtype2string(vertex->type),
|
||||||
|
vid2string(vertex, buff, sizeof(buff)), vertex->depth,
|
||||||
|
vertex->d_N, listcount(vertex->Adj_N));
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
|
|
||||||
isis_vertex_queue_insert(&spftree->tents, vertex);
|
isis_vertex_queue_insert(&spftree->tents, vertex);
|
||||||
|
@ -721,10 +725,12 @@ static void process_N(struct isis_spftree *spftree, enum vertextype vtype,
|
||||||
vertex = isis_find_vertex(&spftree->paths, id, vtype);
|
vertex = isis_find_vertex(&spftree->paths, id, vtype);
|
||||||
if (vertex) {
|
if (vertex) {
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug(
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
"ISIS-SPF: process_N %s %s %s dist %d already found from PATH",
|
zlog_debug(
|
||||||
print_sys_hostname(vertex->N.id), vtype2string(vtype),
|
"ISIS-SPF: process_N %s %s %s dist %d already found from PATH",
|
||||||
vid2string(vertex, buff, sizeof(buff)), dist);
|
print_sys_hostname(vertex->N.id),
|
||||||
|
vtype2string(vtype),
|
||||||
|
vid2string(vertex, buff, sizeof(buff)), dist);
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
assert(dist >= vertex->d_N);
|
assert(dist >= vertex->d_N);
|
||||||
return;
|
return;
|
||||||
|
@ -735,12 +741,15 @@ static void process_N(struct isis_spftree *spftree, enum vertextype vtype,
|
||||||
if (vertex) {
|
if (vertex) {
|
||||||
/* 1) */
|
/* 1) */
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug(
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
"ISIS-SPF: process_N %s %s %s dist %d parent %s adjcount %d",
|
zlog_debug(
|
||||||
print_sys_hostname(vertex->N.id), vtype2string(vtype),
|
"ISIS-SPF: process_N %s %s %s dist %d parent %s adjcount %d",
|
||||||
vid2string(vertex, buff, sizeof(buff)), dist,
|
print_sys_hostname(vertex->N.id),
|
||||||
(parent ? print_sys_hostname(parent->N.id) : "null"),
|
vtype2string(vtype),
|
||||||
(parent ? listcount(parent->Adj_N) : 0));
|
vid2string(vertex, buff, sizeof(buff)), dist,
|
||||||
|
(parent ? print_sys_hostname(parent->N.id)
|
||||||
|
: "null"),
|
||||||
|
(parent ? listcount(parent->Adj_N) : 0));
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
if (vertex->d_N == dist) {
|
if (vertex->d_N == dist) {
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
|
@ -778,9 +787,11 @@ static void process_N(struct isis_spftree *spftree, enum vertextype vtype,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug("ISIS-SPF: process_N add2tent %s %s dist %d parent %s",
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
print_sys_hostname(id), vtype2string(vtype), dist,
|
zlog_debug(
|
||||||
(parent ? print_sys_hostname(parent->N.id) : "null"));
|
"ISIS-SPF: process_N add2tent %s %s dist %d parent %s",
|
||||||
|
print_sys_hostname(id), vtype2string(vtype), dist,
|
||||||
|
(parent ? print_sys_hostname(parent->N.id) : "null"));
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
|
|
||||||
isis_spf_add2tent(spftree, vtype, id, dist, depth, NULL, psid, parent);
|
isis_spf_add2tent(spftree, vtype, id, dist, depth, NULL, psid, parent);
|
||||||
|
@ -839,8 +850,9 @@ lspfragloop:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug("ISIS-SPF: process_lsp %s",
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
print_sys_hostname(lsp->hdr.lsp_id));
|
zlog_debug("ISIS-SPF: process_lsp %s",
|
||||||
|
print_sys_hostname(lsp->hdr.lsp_id));
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
|
|
||||||
if (no_overload) {
|
if (no_overload) {
|
||||||
|
@ -1477,10 +1489,12 @@ static void add_to_paths(struct isis_spftree *spftree,
|
||||||
isis_vertex_queue_append(&spftree->paths, vertex);
|
isis_vertex_queue_append(&spftree->paths, vertex);
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug("ISIS-SPF: added %s %s %s depth %d dist %d to PATHS",
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
print_sys_hostname(vertex->N.id), vtype2string(vertex->type),
|
zlog_debug("ISIS-SPF: added %s %s %s depth %d dist %d to PATHS",
|
||||||
vid2string(vertex, buff, sizeof(buff)), vertex->depth,
|
print_sys_hostname(vertex->N.id),
|
||||||
vertex->d_N);
|
vtype2string(vertex->type),
|
||||||
|
vid2string(vertex, buff, sizeof(buff)),
|
||||||
|
vertex->depth, vertex->d_N);
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1647,10 +1661,12 @@ static void isis_spf_loop(struct isis_spftree *spftree,
|
||||||
vertex = isis_vertex_queue_pop(&spftree->tents);
|
vertex = isis_vertex_queue_pop(&spftree->tents);
|
||||||
|
|
||||||
#ifdef EXTREME_DEBUG
|
#ifdef EXTREME_DEBUG
|
||||||
zlog_debug(
|
if (IS_DEBUG_SPF_EVENTS)
|
||||||
"ISIS-SPF: get TENT node %s %s depth %d dist %d to PATHS",
|
zlog_debug(
|
||||||
print_sys_hostname(vertex->N.id),
|
"ISIS-SPF: get TENT node %s %s depth %d dist %d to PATHS",
|
||||||
vtype2string(vertex->type), vertex->depth, vertex->d_N);
|
print_sys_hostname(vertex->N.id),
|
||||||
|
vtype2string(vertex->type), vertex->depth,
|
||||||
|
vertex->d_N);
|
||||||
#endif /* EXTREME_DEBUG */
|
#endif /* EXTREME_DEBUG */
|
||||||
|
|
||||||
add_to_paths(spftree, vertex);
|
add_to_paths(spftree, vertex);
|
||||||
|
|
Loading…
Reference in a new issue