From 988c4e27d1038d6ce637945490744991962e6343 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Wed, 25 Sep 2019 14:27:12 -0400 Subject: [PATCH] zebra: handle config write for dataplane values [7.2 version] Add the (single) dataplane config value to the output of config write, 'show run'. Signed-off-by: Mark Stapp --- zebra/zebra_dplane.c | 12 ++++++++++++ zebra/zebra_dplane.h | 1 + zebra/zebra_vty.c | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 2bf541617c..ffc1615fcb 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -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 */ diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h index 31f0fc98b3..bd95f6f134 100644 --- a/zebra/zebra_dplane.h +++ b/zebra/zebra_dplane.h @@ -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. diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 38de01e228..33b3840c0d 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -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; }