diff options
author | Neale Ranns <nranns@cisco.com> | 2019-03-12 02:34:07 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-03-12 16:50:23 +0000 |
commit | 36abbf10045ba81733410f50a3f5a9463f7137d1 (patch) | |
tree | 3adcabaa69bcbe4cbe801c45866a1f4c46c12443 /src/plugins/gbp/gbp_itf.c | |
parent | 7bd343509fa30f9713b6efa9a4acb83e0ab86cfb (diff) |
GBP: L3 out fixes
Change-Id: I0562d597fd45c7ddcb6db42cf17d3ffb569eb140
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_itf.c')
-rw-r--r-- | src/plugins/gbp/gbp_itf.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/plugins/gbp/gbp_itf.c b/src/plugins/gbp/gbp_itf.c index 7cfe9da0ab0..4944f278144 100644 --- a/src/plugins/gbp/gbp_itf.c +++ b/src/plugins/gbp/gbp_itf.c @@ -194,15 +194,48 @@ format_gbp_itf (u8 * s, va_list * args) gi = gbp_itf_get (gii); - s = format (s, "%U locks:%d input-feats:%U output-feats:%U", + s = format (s, "%U locks:%d bd-index:%d input-feats:%U output-feats:%U", format_vnet_sw_if_index_name, vnet_get_main (), gi->gi_sw_if_index, gi->gi_locks, + gi->gi_bd_index, format_l2_input_features, gi->gi_l2_input_fb, 0, format_l2_output_features, gi->gi_l2_output_fb, 0); return (s); } +static clib_error_t * +gbp_itf_show (vlib_main_t * vm, + unformat_input_t * input, vlib_cli_command_t * cmd) +{ + u32 gii; + + vlib_cli_output (vm, "Interfaces:"); + + vec_foreach_index (gii, gbp_itfs) + { + vlib_cli_output (vm, " [%d] %U", gii, format_gbp_itf, gii); + } + + return (NULL); +} + +/*? + * Show Group Based Interfaces + * + * @cliexpar + * @cliexstart{show gbp contract} + * @cliexend + ?*/ +/* *INDENT-OFF* */ +VLIB_CLI_COMMAND (gbp_contract_show_node, static) = { + .path = "show gbp interface", + .short_help = "show gbp interface\n", + .function = gbp_itf_show, +}; +/* *INDENT-ON* */ + + /* * fd.io coding-style-patch-verification: ON * |