From: Jay Wang Date: Tue, 12 Nov 2024 10:20:39 +0000 (+0000) Subject: fib: fix `show ip fib memory` output error X-Git-Tag: v25.06-rc0~138 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=030a5436da0a55f9344fb32df89336c3990e4d28;p=vpp.git fib: fix `show ip fib memory` output error Put `memory` before `mem` when parsing `show ip fib` CLI command to avoid the following annoying output error. vpp# show ip fib memory ipv4-VRF:0 mtrie:343808 hash:4687 totals: mtrie:343808 hash:4687 all:348495 unknown input `ory' Type: fix Signed-off-by: Jay Wang Change-Id: I5f990243309d6e6ea339e8442f5e68ae90a98814 --- diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c index 23f70a770bf..b1198564754 100644 --- a/src/vnet/fib/ip4_fib.c +++ b/src/vnet/fib/ip4_fib.c @@ -354,8 +354,7 @@ ip4_show_fib (vlib_main_t * vm, else if (unformat (input, "mtrie")) mtrie = 1; - else if (unformat (input, "mem") || - unformat (input, "memory")) + else if (unformat (input, "memory") || unformat (input, "mem")) memory = 1; else if (unformat (input, "%U/%d", @@ -620,7 +619,7 @@ ip4_show_fib (vlib_main_t * vm, ?*/ VLIB_CLI_COMMAND (ip4_show_fib_command, static) = { .path = "show ip fib", - .short_help = "show ip fib [summary] [table ] [index ] [[/]] [mtrie] [detail]", + .short_help = "show ip fib [summary] [table ] [index ] [[/]] [mtrie] [detail] [memory]", .function = ip4_show_fib, };