diff options
author | Damjan Marion <damarion@cisco.com> | 2017-05-11 16:53:02 +0200 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-05-15 19:03:22 +0000 |
commit | 12059c9b6da0536a74d3003cebed61225a8a8ee7 (patch) | |
tree | 59d52a498eb13ef94fa05aa51f5759f00a13c7ba /src/plugins/dpdk/device/cli.c | |
parent | 7bfa119ead548fcca869bac7e777ce7137dc933b (diff) |
dpdk: improve error handling during device initialization
Change-Id: Ib390164abb07ca0d38fd49e7e2e6b4e9ea856405
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/cli.c')
-rw-r--r-- | src/plugins/dpdk/device/cli.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/cli.c b/src/plugins/dpdk/device/cli.c index c7e5090dd81..aeeb772d4fb 100644 --- a/src/plugins/dpdk/device/cli.c +++ b/src/plugins/dpdk/device/cli.c @@ -537,7 +537,10 @@ set_dpdk_if_desc (vlib_main_t * vm, unformat_input_t * input, if (nb_tx_desc != (u32) ~ 0) xd->nb_tx_desc = nb_tx_desc; - error = dpdk_device_setup (xd); + dpdk_device_setup (xd); + + if (vec_len (xd->errors)) + return clib_error_return (0, "%U", format_dpdk_device_errors, xd); done: unformat_free (line_input); |