]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Track the # of times we ask for nexthp information
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 26 Aug 2016 12:38:18 +0000 (12:38 +0000)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:07 +0000 (20:26 -0500)
Keep an idea of how many times we are asking zebra
for nexthop information.

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

index bbc1de344328e08012816bcf48e74cd270bc3b72..a717188d1c660841b1f63b6daff3f2bd71cee8f0 100644 (file)
@@ -1102,12 +1102,14 @@ static void show_rpf_refresh_stats(struct vty *vty, time_t now)
          "RPF Cache Refresh Timer:    %ld msecs%s"
          "RPF Cache Refresh Requests: %lld%s"
          "RPF Cache Refresh Events:   %lld%s"
-         "RPF Cache Refresh Last:     %s%s",
+         "RPF Cache Refresh Last:     %s%s"
+         "Nexthop Lookups:            %lld%s",
          qpim_rpf_cache_refresh_delay_msec, VTY_NEWLINE,
          pim_time_timer_remain_msec(qpim_rpf_cache_refresher), VTY_NEWLINE,
          (long long)qpim_rpf_cache_refresh_requests, VTY_NEWLINE,
          (long long)qpim_rpf_cache_refresh_events, VTY_NEWLINE,
-         refresh_uptime, VTY_NEWLINE);
+         refresh_uptime, VTY_NEWLINE,
+         (long long) qpim_nexthop_lookups, VTY_NEWLINE);
 }
 
 static void show_scan_oil_stats(struct vty *vty, time_t now)
index 5c17c50609860d43de5ea586d2aa4d4ed075fce6..aed2a8a2c9303e1f06e47fe66940a4945c980233 100644 (file)
@@ -358,6 +358,8 @@ zclient_lookup_nexthop (struct pim_zlookup_nexthop nexthop_tab[],
   uint32_t route_metric = 0xFFFFFFFF;
   uint8_t  protocol_distance = 0xFF;
 
+  qpim_nexthop_lookups++;
+
   for (lookup = 0; lookup < max_lookup; ++lookup) {
     int num_ifindex;
     int first_ifindex;
index c00baa3596afd44739288d3e01acd8137778ffad..3d1648c270da38dbd6dfa6c0fbc8b7c4953e601b 100644 (file)
@@ -71,6 +71,7 @@ int64_t                   qpim_mroute_del_last = 0;
 struct list              *qpim_static_route_list = NULL;
 unsigned int              qpim_keep_alive_time = PIM_KEEPALIVE_PERIOD;
 signed int                qpim_rp_keep_alive_time = 0;
+int64_t                   qpim_nexthop_lookups = 0;
 
 int32_t qpim_register_suppress_time = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;
 int32_t qpim_register_probe_time = PIM_REGISTER_PROBE_TIME_DEFAULT;
index 268b5ca60fd1e097aeb885f11e64bda670bcf6d1..cbc95c2eee4990e5cc84f61982bb9f20bab931a7 100644 (file)
@@ -103,6 +103,7 @@ int64_t                   qpim_mroute_add_events;
 int64_t                   qpim_mroute_add_last;
 int64_t                   qpim_mroute_del_events;
 int64_t                   qpim_mroute_del_last;
+int64_t                   qpim_nexthop_lookups;
 struct list              *qpim_static_route_list; /* list of routes added statically */
 extern unsigned int       qpim_keep_alive_time;
 extern signed int         qpim_rp_keep_alive_time;