diff options
-rw-r--r-- | pimd/pim_cmd.c | 30 | ||||
-rw-r--r-- | pimd/pim_zebra.c | 10 | ||||
-rw-r--r-- | pimd/pimd.c | 2 | ||||
-rw-r--r-- | pimd/pimd.h | 2 |
4 files changed, 34 insertions, 10 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index c845a895..df6897e3 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -1022,16 +1022,32 @@ static void pim_show_upstream_rpf(struct vty *vty) } } +static void show_rpf_refresh_stats(struct vty *vty) +{ + vty_out(vty, + "RPF Cache Refresh Delay: %ld msecs%s" + "RPF Cache Refresh Timer: %ld msecs%s" + "RPF Cache Refresh Requests: %lld%s" + "RPF Cache Refresh Events: %lld%s", + qpim_rpf_cache_refresh_delay_msec, VTY_NEWLINE, + pim_time_timer_remain_msec(qpim_rpf_cache_refresher), VTY_NEWLINE, + qpim_rpf_cache_refresh_requests, VTY_NEWLINE, + qpim_rpf_cache_refresh_events, VTY_NEWLINE); +} + static void pim_show_rpf(struct vty *vty) { struct listnode *up_node; struct pim_upstream *up; + show_rpf_refresh_stats(vty); + + vty_out(vty, "%s", VTY_NEWLINE); + vty_out(vty, "Source Group RpfIface RpfAddress RibNextHop Metric Pref%s", VTY_NEWLINE); - for (ALL_LIST_ELEMENTS_RO(qpim_upstream_list, up_node, up)) { char src_str[100]; char grp_str[100]; @@ -1847,7 +1863,7 @@ static void show_multicast_interfaces(struct vty *vty) vty_out(vty, "%s", VTY_NEWLINE); - vty_out(vty, "Interface Address ifIndex VifIndex PktsIn PktsOut BytesIn BytesOut%s", + vty_out(vty, "Interface Address ifi Vif PktsIn PktsOut BytesIn BytesOut%s", VTY_NEWLINE); for (ALL_LIST_ELEMENTS_RO(iflist, node, ifp)) { @@ -1878,7 +1894,7 @@ static void show_multicast_interfaces(struct vty *vty) ifaddr = pim_ifp->primary_address; - vty_out(vty, "%-9s %-15s %7d %8d %6lu %7lu %7lu %8lu%s", + vty_out(vty, "%-9s %-15s %3d %3d %7lu %7lu %10lu %10lu%s", ifp->name, inet_ntoa(ifaddr), ifp->ifindex, @@ -1934,12 +1950,8 @@ DEFUN (show_ip_multicast, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); - vty_out(vty, "RPF Cache Refresh Delay: %ld msecs%s", - qpim_rpf_cache_refresh_delay_msec, - VTY_NEWLINE); - vty_out(vty, "RPF Cache Refresh Timer: %ld msecs%s", - pim_time_timer_remain_msec(qpim_rpf_cache_refresher), - VTY_NEWLINE); + + show_rpf_refresh_stats(vty); show_multicast_interfaces(vty); diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 56e4dba1..9764532b 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -447,13 +447,21 @@ static int on_rpf_cache_refresh(struct thread *t) /* update kernel multicast forwarding cache (MFC) */ scan_oil(); + ++qpim_rpf_cache_refresh_events; + return 0; } static void sched_rpf_cache_refresh() { - if (qpim_rpf_cache_refresher) + ++qpim_rpf_cache_refresh_requests; + + if (qpim_rpf_cache_refresher) { + /* Refresh timer is already running */ return; + } + + /* Start refresh timer */ if (PIM_DEBUG_ZEBRA) { zlog_debug("%s: triggering %ld msec timer", diff --git a/pimd/pimd.c b/pimd/pimd.c index f255a28f..e8afe779 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -54,6 +54,8 @@ struct zclient *qpim_zclient_lookup = 0; struct pim_assert_metric qpim_infinite_assert_metric; long qpim_rpf_cache_refresh_delay_msec = 10000; struct thread *qpim_rpf_cache_refresher = 0; +int64_t qpim_rpf_cache_refresh_requests = 0; +int64_t qpim_rpf_cache_refresh_events = 0; struct in_addr qpim_inaddr_any; static void pim_free() diff --git a/pimd/pimd.h b/pimd/pimd.h index 10f8518a..aaf5faae 100644 --- a/pimd/pimd.h +++ b/pimd/pimd.h @@ -80,6 +80,8 @@ struct zclient *qpim_zclient_lookup; struct pim_assert_metric qpim_infinite_assert_metric; long qpim_rpf_cache_refresh_delay_msec; struct thread *qpim_rpf_cache_refresher; +int64_t qpim_rpf_cache_refresh_requests; +int64_t qpim_rpf_cache_refresh_events; struct in_addr qpim_inaddr_any; #define PIM_JP_HOLDTIME (qpim_t_periodic * 7 / 2) |