]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: be more selective about processing LSPs 8405/head
authorMark Stapp <mjs@voltanet.io>
Mon, 5 Apr 2021 19:10:44 +0000 (15:10 -0400)
committerMark Stapp <mjs@voltanet.io>
Mon, 5 Apr 2021 19:53:48 +0000 (15:53 -0400)
When certain events occur (connected route changes e.g.)
zebra examines LSPs to see if they might have been affected. For
LSPs with backup nhlfes, skip this immediate processing and
wait for the owning protocol daemon to react.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
zebra/zebra_mpls.c

index c0c064cbc7aea4df56556a71d37907b681a03538..6d42957b24c59b025a67d802ee17c9573e3b9d56 100644 (file)
@@ -872,6 +872,22 @@ static void lsp_schedule(struct hash_bucket *bucket, void *ctxt)
        zebra_lsp_t *lsp;
 
        lsp = (zebra_lsp_t *)bucket->data;
+
+       /* In the common flow, this is used when external events occur. For
+        * LSPs with backup nhlfes, we'll assume that the forwarding
+        * plane will use the backups to handle these events, until the
+        * owning protocol can react.
+        */
+       if (ctxt == NULL) {
+               /* Skip LSPs with backups */
+               if (nhlfe_list_first(&lsp->backup_nhlfe_list) != NULL) {
+                       if (IS_ZEBRA_DEBUG_MPLS_DETAIL)
+                               zlog_debug("%s: skip LSP in-label %u",
+                                          __func__, lsp->ile.in_label);
+                       return;
+               }
+       }
+
        (void)lsp_processq_add(lsp);
 }