aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib/ip6_mfib.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-11-29 00:59:31 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-29 11:17:08 +0000
commitc87aafad759f92ae630fec52079a08ace607410b (patch)
tree36d534722eccc9ea03144eb42bf6104bf1dd294e /src/vnet/mfib/ip6_mfib.c
parent72454dd4c5196594b366883bbf732c9e067c64ec (diff)
Include allocated table memory in 'sh fib mem' output
DBGvpp# sh fib mem FIB memory Tables: SAFI Number Bytes IPv4 unicast 2 673066 IPv6 unicast 2 1054608 MPLS 1 4194312 IPv4 multicast 2 2322 IPv6 multicast 2 ??? Nodes: Name Size in-use /allocated totals Entry 96 20 / 20 1920/1920 Entry Source 32 0 / 0 0/0 Entry Path-Extensions 60 0 / 0 0/0 multicast-Entry 192 12 / 12 2304/2304 Path-list 40 28 / 28 1120/1120 uRPF-list 16 20 / 20 320/320 Path 72 28 / 28 2016/2016 Node-list elements 20 28 / 28 560/560 Node-list heads 8 30 / 30 240/240 Change-Id: I8c8f6f1c87502a40265bf4f302d0daef111a4a4e Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/mfib/ip6_mfib.c')
-rw-r--r--src/vnet/mfib/ip6_mfib.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/vnet/mfib/ip6_mfib.c b/src/vnet/mfib/ip6_mfib.c
index e4861330654..1c1f5db71f7 100644
--- a/src/vnet/mfib/ip6_mfib.c
+++ b/src/vnet/mfib/ip6_mfib.c
@@ -472,6 +472,16 @@ ip6_mfib_module_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION(ip6_mfib_module_init);
+u8 *
+format_ip6_mfib_table_memory (u8 * s, va_list * args)
+{
+ s = format(s, "%=30s %=6d %=8s\n",
+ "IPv6 multicast",
+ pool_elts(ip6_main.mfibs), "???");
+
+ return (s);
+}
+
static void
ip6_mfib_table_show_one (ip6_mfib_t *mfib,
vlib_main_t * vm,
@@ -566,7 +576,7 @@ ip6_show_mfib (vlib_main_t * vm,
unformat_input_t * input,
vlib_cli_command_t * cmd)
{
- ip6_main_t * im4 = &ip6_main;
+ ip6_main_t * im6 = &ip6_main;
mfib_table_t *mfib_table;
int verbose, matching;
ip6_address_t grp, src = {{0}};
@@ -608,7 +618,7 @@ ip6_show_mfib (vlib_main_t * vm,
break;
}
- pool_foreach (mfib_table, im4->mfibs,
+ pool_foreach (mfib_table, im6->mfibs,
({
ip6_mfib_t *mfib = &mfib_table->v6;
@@ -649,7 +659,7 @@ ip6_show_mfib (vlib_main_t * vm,
}
/*
- * This command displays the IPv4 MulticasrFIB Tables (VRF Tables) and
+ * This command displays the IPv6 MulticasrFIB Tables (VRF Tables) and
* the route entries for each table.
*
* @note This command will run for a long time when the FIB tables are
@@ -657,9 +667,9 @@ ip6_show_mfib (vlib_main_t * vm,
* a single table or summary mode.
*
* @cliexpar
- * Example of how to display all the IPv4 Multicast FIB tables:
+ * Example of how to display all the IPv6 Multicast FIB tables:
* @cliexstart{show ip fib}
- * ipv4-VRF:0, fib_index 0
+ * ipv6-VRF:0, fib_index 0
* (*, 0.0.0.0/0): flags:D,
* Interfaces:
* multicast-ip6-chain
@@ -671,18 +681,18 @@ ip6_show_mfib (vlib_main_t * vm,
* test-eth0: Accept,
* multicast-ip6-chain
* [@2]: dpo-replicate: [index:1 buckets:2 to:[0:0]]
- * [0] [@1]: ipv4-mcast: test-eth1: IP6: d0:d1:d2:d3:d4:01 -> 01:00:05:00:00:00
- * [1] [@1]: ipv4-mcast: test-eth2: IP6: d0:d1:d2:d3:d4:02 -> 01:00:05:00:00:00
+ * [0] [@1]: ipv6-mcast: test-eth1: IP6: d0:d1:d2:d3:d4:01 -> 01:00:05:00:00:00
+ * [1] [@1]: ipv6-mcast: test-eth2: IP6: d0:d1:d2:d3:d4:02 -> 01:00:05:00:00:00
*
* @cliexend
- * Example of how to display a summary of all IPv4 FIB tables:
+ * Example of how to display a summary of all IPv6 FIB tables:
* @cliexstart{show ip fib summary}
- * ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
+ * ipv6-VRF:0, fib_index 0, flow hash: src dst sport dport proto
* Prefix length Count
* 0 1
* 8 2
* 32 4
- * ipv4-VRF:7, fib_index 1, flow hash: src dst sport dport proto
+ * ipv6-VRF:7, fib_index 1, flow hash: src dst sport dport proto
* Prefix length Count
* 0 1
* 8 2