eventdev/timer: add telemetry
[dpdk.git] / lib / eventdev / rte_eventdev.c
index ad3217e..532a253 100644 (file)
@@ -6,26 +6,15 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdarg.h>
 #include <errno.h>
 #include <stdint.h>
 #include <inttypes.h>
-#include <sys/types.h>
-#include <sys/queue.h>
 
 #include <rte_string_fns.h>
-#include <rte_byteorder.h>
 #include <rte_log.h>
-#include <rte_debug.h>
 #include <rte_dev.h>
-#include <rte_memory.h>
-#include <rte_memcpy.h>
 #include <rte_memzone.h>
 #include <rte_eal.h>
-#include <rte_per_lcore.h>
-#include <rte_lcore.h>
-#include <rte_atomic.h>
-#include <rte_branch_prediction.h>
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_errno.h>
@@ -36,7 +25,7 @@
 
 #include "rte_eventdev.h"
 #include "eventdev_pmd.h"
-#include "rte_eventdev_trace.h"
+#include "eventdev_trace.h"
 
 static struct rte_eventdev rte_event_devices[RTE_EVENT_MAX_DEVS];
 
@@ -142,7 +131,7 @@ int
 rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps)
 {
        struct rte_eventdev *dev;
-       const struct rte_event_timer_adapter_ops *ops;
+       const struct event_timer_adapter_ops *ops;
 
        RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
 
@@ -176,11 +165,15 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
 
        if (caps == NULL)
                return -EINVAL;
-       *caps = 0;
+
+       if (dev->dev_ops->crypto_adapter_caps_get == NULL)
+               *caps = RTE_EVENT_CRYPTO_ADAPTER_SW_CAP;
+       else
+               *caps = 0;
 
        return dev->dev_ops->crypto_adapter_caps_get ?
                (*dev->dev_ops->crypto_adapter_caps_get)
-               (dev, cdev, caps) : -ENOTSUP;
+               (dev, cdev, caps) : 0;
 }
 
 int