diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-02-02 16:28:19 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-02-02 16:28:19 +0100 |
commit | d7c6467ba2f55d1055babbb7fe82716ca3efdc7e (patch) | |
tree | 4a884baa25d2443017dfd7497596e171f6e20667 /bgpd | |
parent | Merge pull request #12672 from donaldsharp/remove_insecure (diff) | |
download | frr-d7c6467ba2f55d1055babbb7fe82716ca3efdc7e.tar.xz frr-d7c6467ba2f55d1055babbb7fe82716ca3efdc7e.zip |
lib, bgpd: Add ability to specify that some json output should not be pretty
Initial commit: 23b2a7ef524c9fe083b217c7f6ebaec0effc8f52
changed the json output of `show bgp <afi> <safi> json` to
not have pretty print because when under a situation where
there are a bunch of routes with a large scale ecmp show
output was taking forever and this commit cut 2 minutes out
of vtysh run time.
Subusequent commit: f4ec52f7cc99f709756d9030623a20c98a086125
changed this back.
When upgrading to latest version the long run time was noticed
due to testing. Let's add back this functionality such that
FRR can have reduced run times with vtysh when it's really
needed.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_route.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index aba8260e2..4c98ffcf0 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11588,7 +11588,16 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi, else vty_out(vty, ",\"%pFX\": ", dest_p); } - vty_json(vty, json_paths); + /* + * We are using no_pretty here because under + * extremely high settings( say lots and lots of + * routes with lots and lots of ways to reach + * that route via different paths ) this can + * save several minutes of output when FRR + * is run on older cpu's or more underperforming + * routers out there + */ + vty_json_no_pretty(vty, json_paths); json_paths = NULL; first = 0; } else |