summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-03-17 21:13:09 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-03-17 21:13:09 -0400
commitda11e32521af32b4db39eeb48f2725e9f3db824d (patch)
treeba4ef32067ef07174f15ff4f0883b4a93b4a84a3 /pimd/pim_cmd.c
parent78c16071f99bf3a5df1800a26656c3362eb0ba48 (diff)
pimd: Make the rpf scan per vrf.
We know the vrf that we are in when we need to initiate a rescan of the rpf cache. So pass it in and use that information. This should help the rescan at scale with several vrf's cutting out a lot of unnecessary work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 803e7bb013..a8935bf80d 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -2566,8 +2566,8 @@ static void pim_show_upstream_rpf(struct pim_instance *pim, struct vty *vty,
}
}
-static void show_rpf_refresh_stats(struct vty *vty, time_t now,
- json_object *json)
+static void show_rpf_refresh_stats(struct vty *vty, struct pim_instance *pim,
+ time_t now, json_object *json)
{
char refresh_uptime[10];
@@ -2579,7 +2579,7 @@ static void show_rpf_refresh_stats(struct vty *vty, time_t now,
qpim_rpf_cache_refresh_delay_msec);
json_object_int_add(
json, "rpfCacheRefreshTimer",
- pim_time_timer_remain_msec(qpim_rpf_cache_refresher));
+ pim_time_timer_remain_msec(pim->rpf_cache_refresher));
json_object_int_add(json, "rpfCacheRefreshRequests",
qpim_rpf_cache_refresh_requests);
json_object_int_add(json, "rpfCacheRefreshEvents",
@@ -2600,7 +2600,7 @@ static void show_rpf_refresh_stats(struct vty *vty, time_t now,
"Nexthop Lookups: %lld\n"
"Nexthop Lookups Avoided: %lld\n",
qpim_rpf_cache_refresh_delay_msec,
- pim_time_timer_remain_msec(qpim_rpf_cache_refresher),
+ pim_time_timer_remain_msec(pim->rpf_cache_refresher),
(long long)qpim_rpf_cache_refresh_requests,
(long long)qpim_rpf_cache_refresh_events,
refresh_uptime, (long long)qpim_nexthop_lookups,
@@ -2642,9 +2642,9 @@ static void pim_show_rpf(struct pim_instance *pim, struct vty *vty, u_char uj)
if (uj) {
json = json_object_new_object();
- show_rpf_refresh_stats(vty, now, json);
+ show_rpf_refresh_stats(vty, pim, now, json);
} else {
- show_rpf_refresh_stats(vty, now, json);
+ show_rpf_refresh_stats(vty, pim, now, json);
vty_out(vty, "\n");
vty_out(vty,
"Source Group RpfIface RpfAddress RibNextHop Metric Pref\n");
@@ -4337,7 +4337,7 @@ static void pim_cmd_show_ip_multicast_helper(struct pim_instance *pim,
vty_out(vty, "\n");
- show_rpf_refresh_stats(vty, now, NULL);
+ show_rpf_refresh_stats(vty, pim, now, NULL);
vty_out(vty, "\n");