summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>2018-01-11 15:51:54 +0530
committerJerin Jacob <jerin.jacob@caviumnetworks.com>2018-01-19 16:09:56 +0100
commit561c5c7b7f7e431811a5c3bf46e4adc032e8e67d (patch)
tree377e137c29f05ac3520f3029ba38853909438508
parent5e6eb5ccd788b6e726a253406e0f8ece244c191b (diff)
downloaddpdk-561c5c7b7f7e431811a5c3bf46e4adc032e8e67d.zip
dpdk-561c5c7b7f7e431811a5c3bf46e4adc032e8e67d.tar.gz
dpdk-561c5c7b7f7e431811a5c3bf46e4adc032e8e67d.tar.xz
event/sw: update selftest ops
Update software eventdev ops to invoke selftest when application invokes `rte_event_dev_selftest`. Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
-rw-r--r--drivers/event/sw/Makefile2
-rw-r--r--drivers/event/sw/sw_evdev.c2
-rw-r--r--drivers/event/sw/sw_evdev.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/drivers/event/sw/Makefile b/drivers/event/sw/Makefile
index 0ff9a7f..c6600e8 100644
--- a/drivers/event/sw/Makefile
+++ b/drivers/event/sw/Makefile
@@ -17,6 +17,7 @@ CFLAGS += -Wno-missing-field-initializers
endif
endif
LDLIBS += -lrte_eal -lrte_eventdev -lrte_kvargs -lrte_ring
+LDLIBS += -lrte_mempool -lrte_mbuf
LDLIBS += -lrte_bus_vdev
# library version
@@ -30,6 +31,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev.c
SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_worker.c
SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_scheduler.c
SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_xstats.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_selftest.c
# export include files
SYMLINK-y-include +=
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 52eb7d0..f9daf4f 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -795,6 +795,8 @@ sw_probe(struct rte_vdev_device *vdev)
.xstats_get_names = sw_xstats_get_names,
.xstats_get_by_name = sw_xstats_get_by_name,
.xstats_reset = sw_xstats_reset,
+
+ .dev_selftest = test_sw_eventdev,
};
static const char *const args[] = {
diff --git a/drivers/event/sw/sw_evdev.h b/drivers/event/sw/sw_evdev.h
index 436b8f3..7498707 100644
--- a/drivers/event/sw/sw_evdev.h
+++ b/drivers/event/sw/sw_evdev.h
@@ -306,5 +306,6 @@ int sw_xstats_reset(struct rte_eventdev *dev,
const uint32_t ids[],
uint32_t nb_ids);
+int test_sw_eventdev(void);
#endif /* _SW_EVDEV_H_ */