summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-05-11 16:53:02 +0200
committerNeale Ranns <nranns@cisco.com>2017-05-15 19:03:22 +0000
commit12059c9b6da0536a74d3003cebed61225a8a8ee7 (patch)
tree59d52a498eb13ef94fa05aa51f5759f00a13c7ba /src/plugins/dpdk/device/init.c
parent7bfa119ead548fcca869bac7e777ce7137dc933b (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/init.c')
-rwxr-xr-xsrc/plugins/dpdk/device/init.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 0ee28db54a4..bcb787c82cf 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -118,11 +118,7 @@ dpdk_flag_change (vnet_main_t * vnm, vnet_hw_interface_t * hi, u32 flags)
rte_eth_dev_set_mtu (xd->device_index, hi->max_packet_bytes);
if (xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP)
- {
- clib_error_t *error;
- error = dpdk_device_start (xd);
- clib_error_report (error);
- }
+ dpdk_device_start (xd);
}
return old;
@@ -223,7 +219,6 @@ dpdk_lib_init (dpdk_main_t * dm)
u8 vlan_strip = 0;
int j;
struct rte_eth_dev_info dev_info;
- clib_error_t *rv;
struct rte_eth_link l;
dpdk_device_config_t *devconf = 0;
vlib_pci_addr_t pci_addr;
@@ -570,13 +565,16 @@ dpdk_lib_init (dpdk_main_t * dm)
hi = vnet_get_hw_interface (dm->vnet_main, xd->hw_if_index);
- rv = dpdk_device_setup (xd);
+ dpdk_device_setup (xd);
- if (rv)
- return rv;
+ if (vec_len (xd->errors))
+ clib_warning ("setup failed for device %U. Errors:\n %U",
+ format_dpdk_device_name, i,
+ format_dpdk_device_errors, xd);
if (devconf->hqos_enabled)
{
+ clib_error_t *rv;
rv = dpdk_port_setup_hqos (xd, &devconf->hqos);
if (rv)
return rv;