forked from Mirror/frr
ospf6d: Note when we calculated spf
Fixes: #1181 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
461b76e4ed
commit
ab0f1135b5
|
@ -576,6 +576,7 @@ static int ospf6_spf_calculation_thread(struct thread *t)
|
||||||
|
|
||||||
/* execute SPF calculation */
|
/* execute SPF calculation */
|
||||||
monotime(&start);
|
monotime(&start);
|
||||||
|
ospf6->ts_spf = start;
|
||||||
|
|
||||||
if (ospf6_is_router_abr(ospf6))
|
if (ospf6_is_router_abr(ospf6))
|
||||||
ospf6_abr_range_reset_cost(ospf6);
|
ospf6_abr_range_reset_cost(ospf6);
|
||||||
|
@ -585,6 +586,7 @@ static int ospf6_spf_calculation_thread(struct thread *t)
|
||||||
if (oa == ospf6->backbone)
|
if (oa == ospf6->backbone)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
monotime(&oa->ts_spf);
|
||||||
if (IS_OSPF6_DEBUG_SPF(PROCESS))
|
if (IS_OSPF6_DEBUG_SPF(PROCESS))
|
||||||
zlog_debug("SPF calculation for Area %s", oa->name);
|
zlog_debug("SPF calculation for Area %s", oa->name);
|
||||||
if (IS_OSPF6_DEBUG_SPF(DATABASE))
|
if (IS_OSPF6_DEBUG_SPF(DATABASE))
|
||||||
|
@ -598,6 +600,7 @@ static int ospf6_spf_calculation_thread(struct thread *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ospf6->backbone) {
|
if (ospf6->backbone) {
|
||||||
|
monotime(&ospf6->backbone->ts_spf);
|
||||||
if (IS_OSPF6_DEBUG_SPF(PROCESS))
|
if (IS_OSPF6_DEBUG_SPF(PROCESS))
|
||||||
zlog_debug("SPF calculation for Backbone area %s",
|
zlog_debug("SPF calculation for Backbone area %s",
|
||||||
ospf6->backbone->name);
|
ospf6->backbone->name);
|
||||||
|
@ -632,6 +635,7 @@ static int ospf6_spf_calculation_thread(struct thread *t)
|
||||||
"Reason: %s\n",
|
"Reason: %s\n",
|
||||||
areas_processed, (long long)runtime.tv_sec,
|
areas_processed, (long long)runtime.tv_sec,
|
||||||
(long long)runtime.tv_usec, rbuf);
|
(long long)runtime.tv_usec, rbuf);
|
||||||
|
|
||||||
ospf6->last_spf_reason = ospf6->spf_reason;
|
ospf6->last_spf_reason = ospf6->spf_reason;
|
||||||
ospf6_reset_spf_reason(ospf6);
|
ospf6_reset_spf_reason(ospf6);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -832,7 +832,7 @@ static void ospf6_show(struct vty *vty, struct ospf6 *o)
|
||||||
(long long)o->ts_spf_duration.tv_sec,
|
(long long)o->ts_spf_duration.tv_sec,
|
||||||
(long long)o->ts_spf_duration.tv_usec);
|
(long long)o->ts_spf_duration.tv_usec);
|
||||||
} else
|
} else
|
||||||
vty_out(vty, "has not been run$\n");
|
vty_out(vty, "has not been run\n");
|
||||||
threadtimer_string(now, o->t_spf_calc, buf, sizeof(buf));
|
threadtimer_string(now, o->t_spf_calc, buf, sizeof(buf));
|
||||||
vty_out(vty, " SPF timer %s%s\n", (o->t_spf_calc ? "due in " : "is "),
|
vty_out(vty, " SPF timer %s%s\n", (o->t_spf_calc ? "due in " : "is "),
|
||||||
buf);
|
buf);
|
||||||
|
|
Loading…
Reference in a new issue