summaryrefslogtreecommitdiff
path: root/pimd/pim_join.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_join.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_join.c')
-rw-r--r--pimd/pim_join.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index 42d4a51874..ff41b28ba4 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -112,13 +112,10 @@ static void recv_join(struct interface *ifp,
for (ALL_LIST_ELEMENTS_RO (up->sources, up_node, child))
{
- char buff[100];
-
- strcpy (buff, pim_str_sg_dump (&child->sg));
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s %s: Join(S,G)=%s from %s",
__FILE__, __PRETTY_FUNCTION__,
- buff, pim_str_sg_dump (sg));
+ child->sg_str, up->sg_str);
if (pim_upstream_evaluate_join_desired (child))
{
@@ -183,13 +180,9 @@ static void recv_prune(struct interface *ifp,
struct pim_interface *pim_ifp = ifp->info;
if (PIM_DEBUG_PIM_TRACE)
- {
- char buff[100];
- strcpy (buff, pim_str_sg_dump (&child->sg));
- zlog_debug("%s %s: Prune(S,G)=%s from %s",
- __FILE__, __PRETTY_FUNCTION__,
- buff, pim_str_sg_dump (sg));
- }
+ zlog_debug("%s %s: Prune(S,G)=%s from %s",
+ __FILE__, __PRETTY_FUNCTION__,
+ child->sg_str, up->sg_str);
if (!c_oil)
continue;
@@ -408,7 +401,7 @@ int pim_joinprune_send(struct interface *ifp,
zlog_debug("%s: sending %s(S,G)=%s to upstream=%s on interface %s",
__PRETTY_FUNCTION__,
send_join ? "Join" : "Prune",
- pim_str_sg_dump (&up->sg), dst_str, ifp->name);
+ up->sg_str, dst_str, ifp->name);
}
if (PIM_INADDR_IS_ANY(upstream_addr)) {
@@ -418,7 +411,7 @@ int pim_joinprune_send(struct interface *ifp,
zlog_debug("%s: %s(S,G)=%s: upstream=%s is myself on interface %s",
__PRETTY_FUNCTION__,
send_join ? "Join" : "Prune",
- pim_str_sg_dump (&up->sg), dst_str, ifp->name);
+ up->sg_str, dst_str, ifp->name);
}
return 0;
}