summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-11-23 21:36:26 +0100
committerRodny Molina <rmolina@linkedin.com>2018-12-07 20:45:14 +0100
commit062f4d3691e0214bcff401d9d7fd0e9eefecef55 (patch)
tree64449ec2e10863a414d4267a7937677fe809699e
parentisisd: Provide statistics about retransmitted LSPs (diff)
downloadfrr-062f4d3691e0214bcff401d9d7fd0e9eefecef55.tar.xz
frr-062f4d3691e0214bcff401d9d7fd0e9eefecef55.zip
isisd: Provide statistics over number of LSP regenerations
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
-rw-r--r--isisd/isis_lsp.c2
-rw-r--r--isisd/isisd.c4
-rw-r--r--isisd/isisd.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 86d433cff..b5d5878f8 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -1240,6 +1240,7 @@ int lsp_generate(struct isis_area *area, int level)
lsp_seqno_update(newlsp);
newlsp->last_generated = time(NULL);
lsp_flood(newlsp, NULL);
+ area->lsp_gen_count[level - 1]++;
refresh_time = lsp_refresh_time(newlsp, rem_lifetime);
@@ -1300,6 +1301,7 @@ static int lsp_regenerate(struct isis_area *area, int level)
lsp->hdr.rem_lifetime = rem_lifetime;
lsp->last_generated = time(NULL);
lsp_flood(lsp, NULL);
+ area->lsp_gen_count[level - 1]++;
for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) {
if (!frag->tlvs) {
/* Updating and flooding should only affect fragments
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 79145db02..6679950c3 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -1270,6 +1270,10 @@ DEFUN (show_isis_summary,
continue;
vty_out(vty, " Level-%d:\n", level);
+
+ vty_out(vty, " LSP0 regenerated: %" PRIu64 "\n",
+ area->lsp_gen_count[level - 1]);
+
if (area->spf_timer[level - 1])
vty_out(vty, " SPF: (pending)\n");
else
diff --git a/isisd/isisd.h b/isisd/isisd.h
index e781380c7..8c571a69e 100644
--- a/isisd/isisd.h
+++ b/isisd/isisd.h
@@ -149,6 +149,7 @@ struct isis_area {
uint16_t min_spf_interval[ISIS_LEVELS];
/* the percentage of LSP mtu size used, before generating a new frag */
int lsp_frag_threshold;
+ uint64_t lsp_gen_count[ISIS_LEVELS];
int ip_circuits;
/* logging adjacency changes? */
uint8_t log_adj_changes;