]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: handle config write for dataplane values
authorMark Stapp <mjs@voltanet.io>
Wed, 25 Sep 2019 18:27:12 +0000 (14:27 -0400)
committerMark Stapp <mjs@voltanet.io>
Wed, 25 Sep 2019 18:27:12 +0000 (14:27 -0400)
[7.2 version] Add the (single) dataplane config value
to the output of config write, 'show run'.

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

index 2bf541617c206633e53a71110f44fae5c18488a8..ffc1615fcb8cd0cf73738801e5d213b0bcc686ef 100644 (file)
@@ -2498,6 +2498,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 31f0fc98b39f0077eb1164d326ae45e209d1a896..bd95f6f134f2feeb16734dc45df738a53bde0c8d 100644 (file)
@@ -452,6 +452,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 38de01e228926561e58469c4b7d89f78085fc401..33b3840c0d68e362db9ab8b5662764276d5a43fa 100644 (file)
@@ -2651,6 +2651,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;
 }