crypto/cnxk: prevent out-of-bound access in capabilities
[dpdk.git] / drivers / event / octeontx / timvf_evdev.c
index 688e9da..090b3ed 100644 (file)
@@ -310,7 +310,7 @@ timvf_ring_create(struct rte_event_timer_adapter *adptr)
        }
 
        if (rcfg->flags & RTE_EVENT_TIMER_ADAPTER_F_SP_PUT) {
-               mp_flags = MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET;
+               mp_flags = RTE_MEMPOOL_F_SP_PUT | RTE_MEMPOOL_F_SC_GET;
                timvf_log_info("Using single producer mode");
        }
 
@@ -407,18 +407,19 @@ timvf_stats_reset(const struct rte_event_timer_adapter *adapter)
        return 0;
 }
 
-static struct rte_event_timer_adapter_ops timvf_ops = {
-       .init           = timvf_ring_create,
-       .uninit         = timvf_ring_free,
-       .start          = timvf_ring_start,
-       .stop           = timvf_ring_stop,
-       .get_info       = timvf_ring_info_get,
+static struct event_timer_adapter_ops timvf_ops = {
+       .init = timvf_ring_create,
+       .uninit = timvf_ring_free,
+       .start = timvf_ring_start,
+       .stop = timvf_ring_stop,
+       .get_info = timvf_ring_info_get,
 };
 
 int
 timvf_timer_adapter_caps_get(const struct rte_eventdev *dev, uint64_t flags,
-               uint32_t *caps, const struct rte_event_timer_adapter_ops **ops,
-               uint8_t enable_stats)
+                            uint32_t *caps,
+                            const struct event_timer_adapter_ops **ops,
+                            uint8_t enable_stats)
 {
        RTE_SET_USED(dev);