]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #4305 from qlyoung/fix-lua-build
authorMark Stapp <mjs@voltanet.io>
Fri, 10 May 2019 19:43:34 +0000 (15:43 -0400)
committerGitHub <noreply@github.com>
Fri, 10 May 2019 19:43:34 +0000 (15:43 -0400)
build: fix Lua build

doc/user/zebra.rst
zebra/zebra_mpls.c

index 51ada8bc62d306d4ab103a560e3f88b08178c56f..f38db9d24105d6b3fbccf827adfb51445b5f424c 100644 (file)
@@ -685,6 +685,40 @@ replaces the information sent in the first message.
 If the connection to the FPM goes down for some reason, zebra sends
 the FPM a complete copy of the forwarding table(s) when it reconnects.
 
+.. _zebra-dplane:
+
+Dataplane Commands
+==================
+
+The zebra dataplane subsystem provides a framework for FIB
+programming. Zebra uses the dataplane to program the local kernel as
+it makes changes to objects such as IP routes, MPLS LSPs, and
+interface IP addresses. The dataplane runs in its own pthread, in
+order to off-load work from the main zebra pthread.
+
+
+.. index:: show zebra dplane [detailed]
+.. clicmd:: show zebra dplane [detailed]
+
+   Display statistics about the updates and events passing through the
+   dataplane subsystem.
+
+
+.. index:: show zebra dplane providers
+.. clicmd:: show zebra dplane providers
+
+   Display information about the running dataplane plugins that are
+   providing updates to a FIB. By default, the local kernel plugin is
+   present.
+
+
+.. index:: zebra dplane limit [NUMBER]
+.. clicmd:: zebra dplane limit [NUMBER]
+
+   Configure the limit on the number of pending updates that are
+   waiting to be processed by the dataplane pthread.
+
+
 zebra Terminal Mode Commands
 ============================
 
index 5c375a6befc00018e8015c09052021644036c824..f1082a5996cafe1a9e91e4cf4a4b3363212d9b7d 100644 (file)
@@ -2874,7 +2874,11 @@ void zebra_mpls_print_lsp_table(struct vty *vty, struct zebra_vrf *zvrf,
                                        ifp = if_lookup_by_index_per_ns(
                                                        zns,
                                                        nexthop->ifindex);
-                                       vty_out(vty, "%15s", ifp->name);
+                                       if (ifp)
+                                               vty_out(vty, "%15s", ifp->name);
+                                       else
+                                               vty_out(vty, "%15s", "Null");
+
                                        break;
                                }
                                case NEXTHOP_TYPE_IPV4:
@@ -2999,11 +3003,30 @@ int zebra_mpls_write_label_block_config(struct vty *vty, struct zebra_vrf *zvrf)
 /*
  * Called when VRF becomes inactive, cleans up information but keeps
  * the table itself.
- * NOTE: Currently supported only for default VRF.
  */
 void zebra_mpls_cleanup_tables(struct zebra_vrf *zvrf)
 {
-       hash_iterate(zvrf->lsp_table, lsp_uninstall_from_kernel, NULL);
+       struct zebra_vrf *def_zvrf;
+       afi_t afi;
+
+       if (zvrf_id(zvrf) == VRF_DEFAULT)
+               hash_iterate(zvrf->lsp_table, lsp_uninstall_from_kernel, NULL);
+       else {
+               /*
+                * For other vrfs, we try to remove associated LSPs; we locate
+                * the LSPs in the default vrf.
+                */
+               def_zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
+
+               /* At shutdown, the default may be gone already */
+               if (def_zvrf == NULL)
+                       return;
+
+               for (afi = AFI_IP; afi < AFI_MAX; afi++) {
+                       if (zvrf->label[afi] != MPLS_LABEL_NONE)
+                               lsp_uninstall(def_zvrf, zvrf->label[afi]);
+               }
+       }
 }
 
 /*