summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/dpdk.h
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/dpdk.h
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/dpdk.h')
-rw-r--r--src/plugins/dpdk/device/dpdk.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 7e974491efe..6364d163632 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -166,7 +166,7 @@ typedef struct
#define DPDK_DEVICE_FLAG_ADMIN_UP (1 << 0)
#define DPDK_DEVICE_FLAG_PROMISC (1 << 1)
#define DPDK_DEVICE_FLAG_PMD (1 << 2)
-
+#define DPDK_DEVICE_FLAG_PMD_INIT_FAIL (1 << 3)
#define DPDK_DEVICE_FLAG_MAYBE_MULTISEG (1 << 4)
#define DPDK_DEVICE_FLAG_HAVE_SUBIF (1 << 5)
#define DPDK_DEVICE_FLAG_HQOS (1 << 6)
@@ -207,6 +207,9 @@ typedef struct
/* mac address */
u8 *default_mac_address;
+
+ /* error string */
+ clib_error_t *errors;
} dpdk_device_t;
#define DPDK_STATS_POLL_INTERVAL (10.0)
@@ -399,9 +402,9 @@ typedef struct
u8 data[256]; /* First 256 data bytes, used for hexdump */
} dpdk_rx_dma_trace_t;
-clib_error_t *dpdk_device_setup (dpdk_device_t * xd);
-clib_error_t *dpdk_device_start (dpdk_device_t * xd);
-clib_error_t *dpdk_device_stop (dpdk_device_t * xd);
+void dpdk_device_setup (dpdk_device_t * xd);
+void dpdk_device_start (dpdk_device_t * xd);
+void dpdk_device_stop (dpdk_device_t * xd);
#define foreach_dpdk_error \
_(NONE, "no error") \
@@ -424,6 +427,7 @@ void dpdk_update_link_state (dpdk_device_t * xd, f64 now);
format_function_t format_dpdk_device_name;
format_function_t format_dpdk_device;
+format_function_t format_dpdk_device_errors;
format_function_t format_dpdk_tx_dma_trace;
format_function_t format_dpdk_rx_dma_trace;
format_function_t format_dpdk_rte_mbuf;