remove useless constructor headers
[dpdk.git] / drivers / event / octeontx / ssovf_evdev.c
index 2400b20..c2213bb 100644 (file)
 #include <rte_bus_vdev.h>
 
 #include "ssovf_evdev.h"
+#include "timvf_evdev.h"
 
 int otx_logtype_ssovf;
+static uint8_t timvf_enable_stats;
 
-RTE_INIT(otx_ssovf_init_log);
-static void
-otx_ssovf_init_log(void)
+RTE_INIT(otx_ssovf_init_log)
 {
        otx_logtype_ssovf = rte_log_register("pmd.event.octeontx");
        if (otx_logtype_ssovf >= 0)
@@ -601,6 +601,14 @@ ssovf_selftest(const char *key __rte_unused, const char *value,
        return 0;
 }
 
+static int
+ssovf_timvf_caps_get(const struct rte_eventdev *dev, uint64_t flags,
+               uint32_t *caps, const struct rte_event_timer_adapter_ops **ops)
+{
+       return timvf_timer_adapter_caps_get(dev, flags, caps, ops,
+                       timvf_enable_stats);
+}
+
 /* Initialize and register event driver with DPDK Application */
 static struct rte_eventdev_ops ssovf_ops = {
        .dev_infos_get    = ssovf_info_get,
@@ -621,6 +629,8 @@ static struct rte_eventdev_ops ssovf_ops = {
        .eth_rx_adapter_start = ssovf_eth_rx_adapter_start,
        .eth_rx_adapter_stop = ssovf_eth_rx_adapter_stop,
 
+       .timer_adapter_caps_get = ssovf_timvf_caps_get,
+
        .dev_selftest = test_eventdev_octeontx,
 
        .dump             = ssovf_dump,
@@ -644,6 +654,7 @@ ssovf_vdev_probe(struct rte_vdev_device *vdev)
 
        static const char *const args[] = {
                SSOVF_SELFTEST_ARG,
+               TIMVF_ENABLE_STATS_ARG,
                NULL
        };
 
@@ -671,6 +682,15 @@ ssovf_vdev_probe(struct rte_vdev_device *vdev)
                                rte_kvargs_free(kvlist);
                                return ret;
                        }
+
+                       ret = rte_kvargs_process(kvlist,
+                                       TIMVF_ENABLE_STATS_ARG,
+                                       ssovf_selftest, &timvf_enable_stats);
+                       if (ret != 0) {
+                               ssovf_log_err("%s: Error in timvf stats", name);
+                               rte_kvargs_free(kvlist);
+                               return ret;
+                       }
                }
 
                rte_kvargs_free(kvlist);