From: Mark Stapp Date: Wed, 25 Sep 2019 18:05:50 +0000 (-0400) Subject: zebra: handle config write for dataplane values X-Git-Tag: base_7.3~305^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f26730e17eab452c5e111d237be6536cf89a49fb;p=mirror%2Ffrr.git zebra: handle config write for dataplane values Add the (single) dataplane config value to the output of config write, 'show run' - missed this during dplane development. Signed-off-by: Mark Stapp --- diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 12f8a1ae3d..bf343e06e5 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -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 */ diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h index 30dfdafdf5..be945632c1 100644 --- a/zebra/zebra_dplane.h +++ b/zebra/zebra_dplane.h @@ -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. diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 7984481093..515f19e8fe 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -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; }