summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/gre/interface.c
diff options
context:
space:
mode:
authorPierre Pfister <ppfister@cisco.com>2016-05-23 12:51:54 +0100
committerChris Luke <chris_luke@cable.comcast.com>2016-05-23 14:46:13 +0000
commit78ea9c2869967693b77949ec154deef6340d01f5 (patch)
tree9c6d53c885c230a8bcf5b945e6f0a3e061095161 /vnet/vnet/gre/interface.c
parent53f09e36f97a28a42a2e3eb58032c75691de4f4c (diff)
VPP-81: Print interface name after creating an interface with CLI
When the CLI is used to create an interface, and whend the operation succeeds, the newly created interface name is printed-out. The patch includes the following interfaces types: - AF_PACKET - Vhost User - Netmap - GRE - L2TP - MPLS-GRE - Loopback Change-Id: Id518c139ec63a261eae81d2ed95c4cd1f10b5157 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'vnet/vnet/gre/interface.c')
-rw-r--r--vnet/vnet/gre/interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vnet/vnet/gre/interface.c b/vnet/vnet/gre/interface.c
index 1e442bc94eb..ae59b246608 100644
--- a/vnet/vnet/gre/interface.c
+++ b/vnet/vnet/gre/interface.c
@@ -159,6 +159,7 @@ create_gre_tunnel_command_fn (vlib_main_t * vm,
int rv;
u32 num_m_args = 0;
u8 is_add = 1;
+ u32 sw_if_index;
/* Get a line of input. */
if (! unformat_user (input, unformat_line_input, line_input))
@@ -191,11 +192,12 @@ create_gre_tunnel_command_fn (vlib_main_t * vm,
clib_memcpy(&a->src, &src, sizeof(src));
clib_memcpy(&a->dst, &dst, sizeof(dst));
- rv = vnet_gre_add_del_tunnel (a, 0);
+ rv = vnet_gre_add_del_tunnel (a, &sw_if_index);
switch(rv)
{
case 0:
+ vlib_cli_output(vm, "%U\n", format_vnet_sw_if_index_name, vnet_get_main(), sw_if_index);
break;
case VNET_API_ERROR_INVALID_VALUE:
return clib_error_return (0, "GRE tunnel already exists...");