aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3/cli.c
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-08-05 12:30:42 -0700
committerDave Barach <openvpp@barachs.net>2020-08-24 10:43:52 +0000
commit067ef751d3144b5de29b20ff9384d78304dfe387 (patch)
tree7f0f6fe25d255d4fca03dde835013eb8379328b3 /src/plugins/vmxnet3/cli.c
parent34a72c61ea2952de450634f1cf9a629911d9bde7 (diff)
vmxnet3: enhance debug CLI error handling
- Display the interface name upon successfully creating the interface. - Don't go silent when error occurs. Be explicit about it. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ie4fdaf323f8b3833ad4a7af3872290141204aba8
Diffstat (limited to 'src/plugins/vmxnet3/cli.c')
-rw-r--r--src/plugins/vmxnet3/cli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c
index fd97c36aee2..ad66e768ad3 100644
--- a/src/plugins/vmxnet3/cli.c
+++ b/src/plugins/vmxnet3/cli.c
@@ -65,6 +65,9 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
vmxnet3_create_if (vm, &args);
+ if (args.error == 0)
+ vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name,
+ vnet_get_main (), args.sw_if_index);
return args.error;
}