]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: handle config write for dataplane values 5058/head
authorMark Stapp <mjs@voltanet.io>
Wed, 25 Sep 2019 18:05:50 +0000 (14:05 -0400)
committerMark Stapp <mjs@voltanet.io>
Wed, 25 Sep 2019 18:05:50 +0000 (14:05 -0400)
Add the (single) dataplane config value to the output of
config write, 'show run' - missed this during dplane development.

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

index 12f8a1ae3d1f825b21f0987ed1b015a6d83d6021..bf343e06e50174922d052463f4b03feec8f42733 100644 (file)
@@ -2510,6 +2510,18 @@ int dplane_show_provs_helper(struct vty *vty, bool detailed)
        return CMD_SUCCESS;
 }
 
+/*
+ * Helper for 'show run' etc.
+ */
+int dplane_config_write_helper(struct vty *vty)
+{
+       if (zdplane_info.dg_max_queued_updates != DPLANE_DEFAULT_MAX_QUEUED)
+               vty_out(vty, "zebra dplane limit %u\n",
+                       zdplane_info.dg_max_queued_updates);
+
+       return 0;
+}
+
 /*
  * Provider registration
  */
index 30dfdafdf580d40cbe73e7619552fabc1a14ce3e..be945632c1ec4487210b7d57218c832a8df81722 100644 (file)
@@ -455,6 +455,7 @@ uint32_t dplane_get_in_queue_len(void);
  */
 int dplane_show_helper(struct vty *vty, bool detailed);
 int dplane_show_provs_helper(struct vty *vty, bool detailed);
+int dplane_config_write_helper(struct vty *vty);
 
 /*
  * Dataplane providers: modules that process or consume dataplane events.
index 7984481093c45e5f01eb34a47304584f42c08ffb..515f19e8feb5d44f79f65ec4825aa317917eac77 100644 (file)
@@ -2655,6 +2655,10 @@ static int config_write_protocol(struct vty *vty)
                                                                      == MCAST_MIX_DISTANCE
                                                              ? "lower-distance"
                                                              : "longer-prefix");
+
+       /* Include dataplane info */
+       dplane_config_write_helper(vty);
+
        return 1;
 }