summaryrefslogtreecommitdiff
path: root/pimd/pim_macro.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_macro.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_macro.c')
-rw-r--r--pimd/pim_macro.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/pimd/pim_macro.c b/pimd/pim_macro.c
index da12146be1..c339fce49d 100644
--- a/pimd/pim_macro.c
+++ b/pimd/pim_macro.c
@@ -26,9 +26,8 @@
#include "vty.h"
#include "plist.h"
-#include "pim_macro.h"
#include "pimd.h"
-#include "pim_str.h"
+#include "pim_macro.h"
#include "pim_iface.h"
#include "pim_ifchannel.h"
#include "pim_rp.h"
@@ -121,7 +120,7 @@ int pim_macro_ch_lost_assert(const struct pim_ifchannel *ch)
if (!ifp) {
zlog_warn("%s: (S,G)=%s: null interface",
__PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg));
+ ch->sg_str);
return 0; /* false */
}
@@ -133,7 +132,7 @@ int pim_macro_ch_lost_assert(const struct pim_ifchannel *ch)
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
__PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg), ifp->name);
+ ch->sg_str, ifp->name);
return 0; /* false */
}
@@ -170,7 +169,7 @@ int pim_macro_chisin_pim_include(const struct pim_ifchannel *ch)
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
__PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg), ch->interface->name);
+ ch->sg_str, ch->interface->name);
return 0; /* false */
}
@@ -233,8 +232,7 @@ int pim_macro_ch_could_assert_eval(const struct pim_ifchannel *ch)
ifp = ch->interface;
if (!ifp) {
zlog_warn("%s: (S,G)=%s: null interface",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg));
+ __PRETTY_FUNCTION__, ch->sg_str);
return 0; /* false */
}
@@ -390,16 +388,14 @@ int pim_macro_assert_tracking_desired_eval(const struct pim_ifchannel *ch)
ifp = ch->interface;
if (!ifp) {
zlog_warn("%s: (S,G)=%s: null interface",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg));
+ __PRETTY_FUNCTION__, ch->sg_str);
return 0; /* false */
}
pim_ifp = ifp->info;
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump (&ch->sg), ch->interface->name);
+ __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name);
return 0; /* false */
}