event/octeontx: update selftest ops
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Thu, 11 Jan 2018 10:21:50 +0000 (15:51 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Fri, 19 Jan 2018 15:09:56 +0000 (16:09 +0100)
Update octeontx eventdev ops to invoke selftest when application
invokes `rte_event_dev_selftest`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
drivers/event/octeontx/Makefile
drivers/event/octeontx/ssovf_evdev.c
drivers/event/octeontx/ssovf_evdev.h

index 9ad44b0..4b5fd25 100644 (file)
@@ -14,7 +14,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
 CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
 
 LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx -lrte_pmd_octeontx
-LDLIBS += -lrte_bus_pci
+LDLIBS += -lrte_bus_pci -lrte_mempool -lrte_mbuf -lrte_kvargs
 LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map
@@ -26,6 +26,7 @@ LIBABIVER := 1
 #
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_worker.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev_selftest.c
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
 CFLAGS_ssovf_worker.o += -fno-prefetch-loop-arrays
index 203694f..f20b53d 100644 (file)
@@ -600,6 +600,8 @@ static const struct rte_eventdev_ops ssovf_ops = {
        .eth_rx_adapter_start = ssovf_eth_rx_adapter_start,
        .eth_rx_adapter_stop = ssovf_eth_rx_adapter_stop,
 
+       .dev_selftest = test_eventdev_octeontx,
+
        .dump             = ssovf_dump,
        .dev_start        = ssovf_start,
        .dev_stop         = ssovf_stop,
index 8fe18f5..5c53f7c 100644 (file)
@@ -22,6 +22,7 @@
 #define ssovf_log_dbg(fmt, ...) SSOVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
 #define ssovf_log_err(fmt, ...) SSOVF_LOG(ERR, fmt, ##__VA_ARGS__)
 #define ssovf_func_trace ssovf_log_dbg
+#define ssovf_log_selftest ssovf_log_info
 
 #define SSO_MAX_VHGRP                     (64)
 #define SSO_MAX_VHWS                      (32)
@@ -163,5 +164,6 @@ uint16_t ssows_deq_timeout_burst(void *port, struct rte_event ev[],
                uint16_t nb_events, uint64_t timeout_ticks);
 void ssows_flush_events(struct ssows *ws, uint8_t queue_id);
 void ssows_reset(struct ssows *ws);
+int test_eventdev_octeontx(void);
 
 #endif /* __SSOVF_EVDEV_H__ */