Merge pull request #11646 from opensourcerouting/fix/memory_show

bgpd: Show extended communities memory consumption
This commit is contained in:
Donald Sharp 2022-07-19 14:13:17 -04:00 committed by GitHub
commit a6de2db239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10173,9 +10173,11 @@ DEFUN (show_bgp_memory,
count, mtype_memstr(memstrbuf, sizeof(memstrbuf), count, mtype_memstr(memstrbuf, sizeof(memstrbuf),
count * sizeof(struct community))); count * sizeof(struct community)));
if ((count = mtype_stats_alloc(MTYPE_ECOMMUNITY))) if ((count = mtype_stats_alloc(MTYPE_ECOMMUNITY)))
vty_out(vty, "%ld BGP community entries, using %s of memory\n", vty_out(vty,
count, mtype_memstr(memstrbuf, sizeof(memstrbuf), "%ld BGP ext-community entries, using %s of memory\n",
count * sizeof(struct ecommunity))); count,
mtype_memstr(memstrbuf, sizeof(memstrbuf),
count * sizeof(struct ecommunity)));
if ((count = mtype_stats_alloc(MTYPE_LCOMMUNITY))) if ((count = mtype_stats_alloc(MTYPE_LCOMMUNITY)))
vty_out(vty, vty_out(vty,
"%ld BGP large-community entries, using %s of memory\n", "%ld BGP large-community entries, using %s of memory\n",