]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Log LSP-update trigger source
authorChristian Franke <chris@opensourcerouting.org>
Wed, 24 Oct 2018 03:38:53 +0000 (05:38 +0200)
committerChristian Franke <chris@opensourcerouting.org>
Wed, 24 Oct 2018 05:51:50 +0000 (07:51 +0200)
For debugging the timing of LSP generation, it is useful to know
which event caused a regeneration to be scheduled. Therefore, add
this information to the debug log.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
isisd/isis_lsp.c
isisd/isis_lsp.h

index 558bc4276bb892c7a7a1677b1ffdd49a02e8cbe7..8320ad9d75abcf63f55d0863d8c7a9bfcb991b58 100644 (file)
@@ -1388,7 +1388,9 @@ static int lsp_l2_refresh(struct thread *thread)
        return lsp_regenerate(area, IS_LEVEL_2);
 }
 
-int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo)
+int _lsp_regenerate_schedule(struct isis_area *area, int level,
+                            int all_pseudo, const char *func,
+                            const char *file, int line)
 {
        struct isis_lsp *lsp;
        uint8_t id[ISIS_SYS_ID_LEN + 2];
@@ -1402,9 +1404,11 @@ int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo)
                return ISIS_ERROR;
 
        sched_debug(
-               "ISIS (%s): Scheduling regeneration of %s LSPs, %sincluding PSNs",
+               "ISIS (%s): Scheduling regeneration of %s LSPs, %sincluding PSNs"
+               " Caller: %s %s:%d",
                area->area_tag, circuit_t2string(level),
-               all_pseudo ? "" : "not ");
+               all_pseudo ? "" : "not ",
+               func, file, line);
 
        memcpy(id, isis->sysid, ISIS_SYS_ID_LEN);
        LSP_PSEUDO_ID(id) = LSP_FRAGMENT(id) = 0;
index 4beee10081d2cfe5d82b118b62ad423a19228064..209a80ee701e4248a25a73bc9854fd9ae7015c91 100644 (file)
@@ -54,7 +54,12 @@ void lsp_db_destroy(dict_t *lspdb);
 int lsp_tick(struct thread *thread);
 
 int lsp_generate(struct isis_area *area, int level);
-int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo);
+#define lsp_regenerate_schedule(area, level, all_pseudo) \
+       _lsp_regenerate_schedule((area), (level), (all_pseudo), \
+                                __func__, __FILE__, __LINE__)
+int _lsp_regenerate_schedule(struct isis_area *area, int level,
+                            int all_pseudo, const char *func,
+                                    const char *file, int line);
 int lsp_generate_pseudo(struct isis_circuit *circuit, int level);
 int lsp_regenerate_schedule_pseudo(struct isis_circuit *circuit, int level);