From ddb3175f8f54620bbf5a58883565d2939b8331e9 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Thu, 29 Jun 2017 19:49:55 +0530 Subject: [PATCH] event/octeontx: add enqueue new op variant OCTEONTX can have optimized handling of events if the PMD knows it is a producer pattern in advance and it can support burst mode if all the events has op == RTE_EVENT_OP_NEW. Signed-off-by: Jerin Jacob Acked-by: Gage Eads Acked-by: Harry van Haaren --- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/event/octeontx/ssovf_evdev.h | 2 ++ drivers/event/octeontx/ssovf_worker.c | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 5f97beeacb..3cd0cd49df 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -158,7 +158,7 @@ ssovf_fastpath_fns_set(struct rte_eventdev *dev) dev->schedule = NULL; dev->enqueue = ssows_enq; dev->enqueue_burst = ssows_enq_burst; - dev->enqueue_new_burst = ssows_enq_burst; + dev->enqueue_new_burst = ssows_enq_new_burst; dev->enqueue_forward_burst = ssows_enq_burst; dev->dequeue = ssows_deq; dev->dequeue_burst = ssows_deq_burst; diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h index 03902e41af..47091a46ea 100644 --- a/drivers/event/octeontx/ssovf_evdev.h +++ b/drivers/event/octeontx/ssovf_evdev.h @@ -190,6 +190,8 @@ ssovf_pmd_priv(const struct rte_eventdev *eventdev) uint16_t ssows_enq(void *port, const struct rte_event *ev); uint16_t ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events); +uint16_t ssows_enq_new_burst(void *port, + const struct rte_event ev[], uint16_t nb_events); uint16_t ssows_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks); uint16_t ssows_deq_burst(void *port, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks); diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c index 1ead476c93..5393febba2 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -201,6 +201,18 @@ ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events) return ssows_enq(port, ev); } +uint16_t __hot +ssows_enq_new_burst(void *port, const struct rte_event ev[], uint16_t nb_events) +{ + uint16_t i; + struct ssows *ws = port; + + rte_smp_wmb(); + for (i = 0; i < nb_events; i++) + ssows_new_event(ws, &ev[i]); + + return nb_events; +} void ssows_flush_events(struct ssows *ws, uint8_t queue_id) {