summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorSindhu Parvathi Gopinathan <sgopinathan@nvidia.com>2023-07-19 09:00:24 +0200
committerChirag Shah <chirag@nvidia.com>2023-07-21 19:15:25 +0200
commitfadf87f358e90abddf17c1196e3c70df32127049 (patch)
tree87397e9b60190a02ebd63d64fc8ac0e4ac78514d /zebra
parentzebra: non pretty json output for show ip route (diff)
downloadfrr-fadf87f358e90abddf17c1196e3c70df32127049.tar.xz
frr-fadf87f358e90abddf17c1196e3c70df32127049.zip
zebra: non pretty json output for evpn route
Currently, json output of evpn route command are no pretty format. This is an extremely expensive operation at high VNI scale EVPN json non-pretty command support added: ``` show evpn mac vni <vni-id> detail json show evpn vni detail json ``` Ticket:#3513256 Issue:3513256 Testing: UT done Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_vxlan.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 5178448eb..50a7462d8 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -3229,7 +3229,11 @@ void zebra_vxlan_print_macs_vni(struct vty *vty, struct zebra_vrf *zvrf,
if (use_json) {
json_object_object_add(json, "macs", json_mac);
- vty_json(vty, json);
+ /*
+ * This is an extremely expensive operation at scale
+ * and non-pretty reduces memory footprint significantly.
+ */
+ vty_json_no_pretty(vty, json);
}
}
@@ -4014,8 +4018,12 @@ void zebra_vxlan_print_vnis_detail(struct vty *vty, struct zebra_vrf *zvrf,
void *))zl3vni_print_hash_detail,
&zes);
+ /*
+ * This is an extremely expensive operation at scale
+ * and non-pretty reduces memory footprint significantly.
+ */
if (use_json)
- vty_json(vty, json_array);
+ vty_json_no_pretty(vty, json_array);
}
/*