]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Add 'debug mroute detail'
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 Aug 2016 01:13:22 +0000 (21:13 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:06 +0000 (20:26 -0500)
When there is allot of IGMP activity for the
kernel upcall that we are ignoring, just
ignore it for the moment as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_cmd.c
pimd/pim_mroute.c
pimd/pim_vty.c
pimd/pimd.h

index b51fe39a7bbd77ec36bff6f36752060ad9a1f0fc..d5f1255e17c9e40fb0c2d3cad01a6229827c92f1 100644 (file)
@@ -3683,6 +3683,17 @@ DEFUN (debug_mroute,
   return CMD_SUCCESS;
 }
 
+DEFUN (debug_mroute_detail,
+       debug_mroute_detail_cmd,
+       "debug mroute detail",
+       DEBUG_STR
+       DEBUG_MROUTE_STR
+       "detailed\n")
+{
+  PIM_DO_DEBUG_MROUTE_DETAIL;
+  return CMD_SUCCESS;
+}
+
 DEFUN (no_debug_mroute,
        no_debug_mroute_cmd,
        "no debug mroute",
@@ -3694,6 +3705,17 @@ DEFUN (no_debug_mroute,
   return CMD_SUCCESS;
 }
 
+DEFUN (no_debug_mroute_detail,
+       no_debug_mroute_detail_cmd,
+       "no debug mroute detail",
+       NO_STR
+       DEBUG_STR
+       DEBUG_MROUTE_STR
+       "detailed\n")
+{
+  PIM_DONT_DEBUG_MROUTE_DETAIL;
+  return CMD_SUCCESS;
+}
 
 DEFUN (debug_static,
        debug_static_cmd,
@@ -4817,7 +4839,9 @@ void pim_cmd_init()
   install_element (ENABLE_NODE, &debug_igmp_trace_cmd);
   install_element (ENABLE_NODE, &no_debug_igmp_trace_cmd);
   install_element (ENABLE_NODE, &debug_mroute_cmd);
+  install_element (ENABLE_NODE, &debug_mroute_detail_cmd);
   install_element (ENABLE_NODE, &no_debug_mroute_cmd);
+  install_element (ENABLE_NODE, &no_debug_mroute_detail_cmd);
   install_element (ENABLE_NODE, &debug_static_cmd);
   install_element (ENABLE_NODE, &no_debug_static_cmd);
   install_element (ENABLE_NODE, &debug_pim_cmd);
@@ -4848,7 +4872,9 @@ void pim_cmd_init()
   install_element (CONFIG_NODE, &debug_igmp_trace_cmd);
   install_element (CONFIG_NODE, &no_debug_igmp_trace_cmd);
   install_element (CONFIG_NODE, &debug_mroute_cmd);
+  install_element (CONFIG_NODE, &debug_mroute_detail_cmd);
   install_element (CONFIG_NODE, &no_debug_mroute_cmd);
+  install_element (CONFIG_NODE, &no_debug_mroute_detail_cmd);
   install_element (CONFIG_NODE, &debug_static_cmd);
   install_element (CONFIG_NODE, &no_debug_static_cmd);
   install_element (CONFIG_NODE, &debug_pim_cmd);
index 28c7f7dc8861b82e4ade3ee514fd39889832acd9..f222e5f575c58d5b0a48cc3fee14ecbd4d5ff0ae 100644 (file)
@@ -131,7 +131,7 @@ pim_mroute_msg_nocache (int fd, struct interface *ifp, const struct igmpmsg *msg
    */
   if (!pim_mroute_connected_to_source (ifp, msg->im_src))
     {
-      if (PIM_DEBUG_MROUTE)
+      if (PIM_DEBUG_MROUTE_DETAIL)
        zlog_debug ("%s: Received incoming packet that doesn't originate on our seg",
                   __PRETTY_FUNCTION__);
       return 0;
@@ -193,7 +193,7 @@ pim_mroute_msg_wholepkt (int fd, struct interface *ifp, const char *buf)
 
   up = pim_upstream_find(&sg);
   if (!up) {
-    if (PIM_DEBUG_MROUTE) {
+    if (PIM_DEBUG_MROUTE_DETAIL) {
       zlog_debug("%s: Unable to find upstream channel WHOLEPKT%s",
                 __PRETTY_FUNCTION__, pim_str_sg_dump (&sg));
     }
@@ -399,7 +399,7 @@ int pim_mroute_msg(int fd, const char *buf, int buf_size)
   /* kernel upcall must have protocol=0 */
   if (ip_hdr->ip_p) {
     /* this is not a kernel upcall */
-    if (PIM_DEBUG_MROUTE) {
+    if (PIM_DEBUG_MROUTE_DETAIL) {
       pim_inet4_dump("<src?>", ip_hdr->ip_src, src_str, sizeof(src_str));
       pim_inet4_dump("<grp?>", ip_hdr->ip_dst, grp_str, sizeof(grp_str));
       zlog_debug("%s: not a kernel upcall proto=%d src: %s dst: %s msg_size=%d",
index e27c69411c792112622712c4b1646b1e70783e69..f279136651410b3a0b472a70af33018f609f9599 100644 (file)
@@ -63,6 +63,11 @@ pim_debug_config_write (struct vty *vty)
     ++writes;
   }
 
+  if (PIM_DEBUG_MROUTE_DETAIL) {
+    vty_out (vty, "debug mroute detail%s", VTY_NEWLINE);
+    ++writes;
+  }
+
   if (PIM_DEBUG_PIM_EVENTS) {
     vty_out(vty, "debug pim events%s", VTY_NEWLINE);
     ++writes;
index a1bd225343e402817d5a7a1d32c143ccbbf574aa..e9b67aaa99e7b539da6fa1d9c85161daa68b1105 100644 (file)
 #define PIM_MASK_ZEBRA               (1 << 11)
 #define PIM_MASK_SSMPINGD            (1 << 12)
 #define PIM_MASK_MROUTE              (1 << 13)
-#define PIM_MASK_PIM_HELLO           (1 << 14)
-#define PIM_MASK_PIM_J_P             (1 << 15)
-#define PIM_MASK_STATIC              (1 << 16)
-#define PIM_MASK_PIM_REG             (1 << 17)
+#define PIM_MASK_MROUTE_DETAIL       (1 << 14)
+#define PIM_MASK_PIM_HELLO           (1 << 15)
+#define PIM_MASK_PIM_J_P             (1 << 16)
+#define PIM_MASK_STATIC              (1 << 17)
+#define PIM_MASK_PIM_REG             (1 << 18)
 
 const char *const PIM_ALL_SYSTEMS;
 const char *const PIM_ALL_ROUTERS;
@@ -132,6 +133,7 @@ extern int32_t qpim_register_probe_time;
 #define PIM_DEBUG_ZEBRA               (qpim_debugs & PIM_MASK_ZEBRA)
 #define PIM_DEBUG_SSMPINGD            (qpim_debugs & PIM_MASK_SSMPINGD)
 #define PIM_DEBUG_MROUTE              (qpim_debugs & PIM_MASK_MROUTE)
+#define PIM_DEBUG_MROUTE_DETAIL       (qpim_debugs & PIM_MASK_MROUTE_DETAIL)
 #define PIM_DEBUG_PIM_HELLO           (qpim_debugs & PIM_MASK_PIM_HELLO)
 #define PIM_DEBUG_PIM_J_P             (qpim_debugs & PIM_MASK_PIM_J_P)
 #define PIM_DEBUG_PIM_REG             (qpim_debugs & PIM_MASK_PIM_REG)
@@ -153,6 +155,7 @@ extern int32_t qpim_register_probe_time;
 #define PIM_DO_DEBUG_ZEBRA               (qpim_debugs |= PIM_MASK_ZEBRA)
 #define PIM_DO_DEBUG_SSMPINGD            (qpim_debugs |= PIM_MASK_SSMPINGD)
 #define PIM_DO_DEBUG_MROUTE              (qpim_debugs |= PIM_MASK_MROUTE)
+#define PIM_DO_DEBUG_MROUTE_DETAIL       (qpim_debugs |= PIM_MASK_MROUTE_DETAIL)
 #define PIM_DO_DEBUG_PIM_HELLO           (qpim_debugs |= PIM_MASK_PIM_HELLO)
 #define PIM_DO_DEBUG_PIM_J_P             (qpim_debugs |= PIM_MASK_PIM_J_P)
 #define PIM_DO_DEBUG_PIM_REG             (qpim_debugs |= PIM_MASK_PIM_REG)
@@ -170,6 +173,7 @@ extern int32_t qpim_register_probe_time;
 #define PIM_DONT_DEBUG_ZEBRA               (qpim_debugs &= ~PIM_MASK_ZEBRA)
 #define PIM_DONT_DEBUG_SSMPINGD            (qpim_debugs &= ~PIM_MASK_SSMPINGD)
 #define PIM_DONT_DEBUG_MROUTE              (qpim_debugs &= ~PIM_MASK_MROUTE)
+#define PIM_DONT_DEBUG_MROUTE_DETAIL       (qpim_debugs &= ~PIM_MASK_MROUTE_DETAIL)
 #define PIM_DONT_DEBUG_PIM_HELLO           (qpim_debugs &= ~PIM_MASK_PIM_HELLO)
 #define PIM_DONT_DEBUG_PIM_J_P             (qpim_debugs &= ~PIM_MASK_PIM_J_P)
 #define PIM_DONT_DEBUG_PIM_REG             (qpim_debugs &= ~PIM_MASK_PIM_REG)