Update software eventdev ops to invoke selftest when application invokes `rte_event_dev_selftest`.
Signed-off-by: Pavan Nikhilesh <pbhagavat...@caviumnetworks.com> Acked-by: Harry van Haaren <harry.van.haa...@intel.com> --- drivers/event/sw/Makefile | 2 ++ drivers/event/sw/sw_evdev.c | 2 ++ drivers/event/sw/sw_evdev.h | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/event/sw/Makefile b/drivers/event/sw/Makefile index 2f2b67bac..149258748 100644 --- a/drivers/event/sw/Makefile +++ b/drivers/event/sw/Makefile @@ -44,6 +44,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 @@ -57,6 +58,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 1ef634093..f40597aae 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -794,6 +794,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 d08f7d042..b1d2c371c 100644 --- a/drivers/event/sw/sw_evdev.h +++ b/drivers/event/sw/sw_evdev.h @@ -334,5 +334,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_ */ -- 2.15.1