diff options
author | 2016-08-24 14:32:39 +0200 | |
---|---|---|
committer | 2016-08-25 07:41:08 +0000 | |
commit | 8d281b36e5124e61201a12c90fde1dfceab39fce (patch) | |
tree | 714f40455b4879fa54adc9c804cee725b241d7ee /vnet/vnet/devices/dpdk/vhost_user.c | |
parent | dc731bd4b1ad6ea588334c681d1409cbdec9ce67 (diff) |
Fix issues with vhost-user when dpdk vhost-user is disabled, fixes VPP-347, VPP-349
Change-Id: I774bab98e43d55678a67a7708ca50edbbd4cbb06
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/devices/dpdk/vhost_user.c')
-rw-r--r-- | vnet/vnet/devices/dpdk/vhost_user.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c index 11a81c2d7cb..58cff7b940f 100644 --- a/vnet/vnet/devices/dpdk/vhost_user.c +++ b/vnet/vnet/devices/dpdk/vhost_user.c @@ -1790,6 +1790,7 @@ dpdk_vhost_user_process_if (vlib_main_t * vm, dpdk_device_t * xd, void *ctx) } return 0; } +#endif /* * CLI functions @@ -1800,6 +1801,7 @@ dpdk_vhost_user_connect_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { +#if DPDK_VHOST_USER dpdk_main_t *dm = &dpdk_main; unformat_input_t _line_input, *line_input = &_line_input; u8 *sock_filename = NULL; @@ -1813,7 +1815,9 @@ dpdk_vhost_user_connect_command_fn (vlib_main_t * vm, if (dm->conf->use_virtio_vhost) { +#endif return vhost_user_connect_command_fn (vm, input, cmd); +#if DPDK_VHOST_USER } /* Get a line of input. */ @@ -1854,6 +1858,7 @@ dpdk_vhost_user_connect_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index); return 0; +#endif } /* *INDENT-OFF* */ @@ -1902,7 +1907,11 @@ dpdk_vhost_user_delete_command_fn (vlib_main_t * vm, vnet_main_t *vnm = vnet_get_main (); +#if DPDK_VHOST_USER dpdk_vhost_user_delete_if (vnm, vm, sw_if_index); +#else + vhost_user_delete_if (vnm, vm, sw_if_index); +#endif return 0; } @@ -1925,6 +1934,7 @@ show_dpdk_vhost_user_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { +#if DPDK_VHOST_USER clib_error_t *error = 0; dpdk_main_t *dm = &dpdk_main; vnet_main_t *vnm = vnet_get_main (); @@ -1952,7 +1962,9 @@ show_dpdk_vhost_user_command_fn (vlib_main_t * vm, if (dm->conf->use_virtio_vhost) { +#endif return show_vhost_user_command_fn (vm, input, cmd); +#if DPDK_VHOST_USER } while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) @@ -2089,6 +2101,7 @@ show_dpdk_vhost_user_command_fn (vlib_main_t * vm, done: vec_free (hw_if_indices); return error; +#endif } /* *INDENT-OFF* */ @@ -2098,7 +2111,6 @@ VLIB_CLI_COMMAND (show_vhost_user_command, static) = { .function = show_dpdk_vhost_user_command_fn, }; /* *INDENT-ON* */ -#endif /* * fd.io coding-style-patch-verification: ON |