summaryrefslogtreecommitdiff
path: root/pimd/pim_mroute.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-11-17 08:17:25 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-21 20:26:16 -0500
commit8bfb8b67ae63eb0ee81e9c928b11836dcd690d6c (patch)
tree49baa69966e7ef2aff40e05fcf8c2c2a3d3230d5 /pimd/pim_mroute.c
parent9d8b5695fe8229c86fc606f90a0078e599384c6d (diff)
pimd: Allow storing of sg in string format
Debugs are extremely expensive currently. Let's store 'struct prefix_sg sg' string format in the ifchannel, upstream and msdp_sa structures. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_mroute.c')
-rw-r--r--pimd/pim_mroute.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index 3f8ec35587..c7730acc04 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -135,11 +135,6 @@ pim_mroute_msg_nocache (int fd, struct interface *ifp, const struct igmpmsg *msg
sg.src = msg->im_src;
sg.grp = msg->im_dst;
- if (PIM_DEBUG_MROUTE) {
- zlog_debug("%s: Adding a Route %s for WHOLEPKT consumption",
- __PRETTY_FUNCTION__, pim_str_sg_dump (&sg));
- }
-
oil = pim_channel_oil_add (&sg, pim_ifp->mroute_vif_index);
if (!oil) {
if (PIM_DEBUG_MROUTE) {
@@ -159,6 +154,16 @@ pim_mroute_msg_nocache (int fd, struct interface *ifp, const struct igmpmsg *msg
}
return 0;
}
+
+ /*
+ * I moved this debug till after the actual add because
+ * I want to take advantage of the up->sg_str being filled in.
+ */
+ if (PIM_DEBUG_MROUTE) {
+ zlog_debug("%s: Adding a Route %s for WHOLEPKT consumption",
+ __PRETTY_FUNCTION__, up->sg_str);
+ }
+
PIM_UPSTREAM_FLAG_SET_SRC_STREAM(up->flags);
pim_upstream_keep_alive_timer_start (up, qpim_keep_alive_time);
@@ -294,7 +299,7 @@ pim_mroute_msg_wrongvif (int fd, struct interface *ifp, const struct igmpmsg *ms
if (PIM_DEBUG_MROUTE) {
zlog_debug("%s: WRONGVIF (S,G)=%s channel is not on Assert NoInfo state for interface %s",
__PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg), ifp->name);
+ ch->sg_str, ifp->name);
}
return -4;
}
@@ -303,7 +308,7 @@ pim_mroute_msg_wrongvif (int fd, struct interface *ifp, const struct igmpmsg *ms
if (PIM_DEBUG_MROUTE) {
zlog_debug("%s: WRONGVIF (S,G)=%s interface %s is not downstream for channel",
__PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg), ifp->name);
+ ch->sg_str, ifp->name);
}
return -5;
}
@@ -312,7 +317,7 @@ pim_mroute_msg_wrongvif (int fd, struct interface *ifp, const struct igmpmsg *ms
if (PIM_DEBUG_MROUTE) {
zlog_debug("%s: WRONGVIF (S,G)=%s assert_action_a1 failure on interface %s",
__PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg), ifp->name);
+ ch->sg_str, ifp->name);
}
return -6;
}
@@ -344,7 +349,7 @@ pim_mroute_msg_wrvifwhole (int fd, struct interface *ifp, const char *buf)
{
if (PIM_DEBUG_MROUTE)
zlog_debug ("WRVIFWHOLE (S,G)=%s found ifchannel on interface %s",
- pim_str_sg_dump (&sg), ifp->name);
+ ch->sg_str, ifp->name);
return -1;
}
#if 0