X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fgbp%2Fgbp_itf.c;h=4944f2781441311800a2a3c2a1950275723faff2;hb=36abbf10045ba81733410f50a3f5a9463f7137d1;hp=7cfe9da0ab0c8dd2b073cb728070ec55aa21e019;hpb=7bd343509fa30f9713b6efa9a4acb83e0ab86cfb;p=vpp.git 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 *