DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: <jerinj@marvell.com>
Cc: "Jerin Jacob" <jerinjacobk@gmail.com>,
	hofors@lysator.liu.se, dev@dpdk.org,
	"Pavan Nikhilesh" <pbhagavatula@marvell.com>,
	"Timothy McDaniel" <timothy.mcdaniel@intel.com>,
	"Hemant Agrawal" <hemant.agrawal@nxp.com>,
	"Sachin Saxena" <sachin.saxena@oss.nxp.com>,
	"Harry van Haaren" <harry.van.haaren@intel.com>,
	"Liang Ma" <liangma@liangbit.com>,
	"Peter Mccarthy" <peter.mccarthy@intel.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: [PATCH] eventdev: remove single-event enqueue operation
Date: Tue, 4 Jul 2023 13:53:07 +0200	[thread overview]
Message-ID: <20230704115307.243031-1-mattias.ronnblom@ericsson.com> (raw)
In-Reply-To: <20230609174205.150027-1-mattias.ronnblom@ericsson.com>

Eliminate non-burst enqueue operation from Eventdev.

The effect of this change is to reduce Eventdev code complexity
somewhat and slightly improve performance.

The single-event enqueue shortcut provided a very minor performance
advantage in some situations (e.g., with a compile time-constant burst
size of '1'), but would in other situations cause a noticeable
performance penalty (e.g., rte_event_enqueue_forward_burst() with run
time-variable burst sizes varying between '1' and larger burst sizes).

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

--

PATCH: Add ABI deprecation notice.
---
 doc/guides/rel_notes/deprecation.rst       |  4 ++
 drivers/event/cnxk/cn10k_eventdev.c        |  1 -
 drivers/event/cnxk/cn10k_worker.c          | 49 ++++++++++------------
 drivers/event/cnxk/cn10k_worker.h          |  1 -
 drivers/event/cnxk/cn9k_eventdev.c         |  2 -
 drivers/event/cnxk/cn9k_worker.c           | 27 ++++--------
 drivers/event/cnxk/cn9k_worker.h           |  1 -
 drivers/event/dlb2/dlb2.c                  | 13 ------
 drivers/event/dpaa/dpaa_eventdev.c         |  7 ----
 drivers/event/dpaa2/dpaa2_eventdev.c       |  7 ----
 drivers/event/dsw/dsw_evdev.c              |  1 -
 drivers/event/dsw/dsw_evdev.h              |  1 -
 drivers/event/dsw/dsw_event.c              |  6 ---
 drivers/event/octeontx/ssovf_worker.c      | 14 ++-----
 drivers/event/opdl/opdl_evdev.c            | 13 ------
 drivers/event/opdl/opdl_evdev.h            |  1 -
 drivers/event/skeleton/skeleton_eventdev.c | 14 -------
 drivers/event/sw/sw_evdev.c                |  1 -
 drivers/event/sw/sw_evdev.h                |  1 -
 drivers/event/sw/sw_evdev_worker.c         |  6 ---
 lib/eventdev/eventdev_pmd.h                |  2 -
 lib/eventdev/eventdev_private.c            | 11 -----
 lib/eventdev/rte_eventdev.h                | 10 +----
 lib/eventdev/rte_eventdev_core.h           |  7 +---
 24 files changed, 42 insertions(+), 158 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 66431789b0..badf011ab2 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -153,3 +153,7 @@ Deprecation Notices
   The new port library API (functions rte_swx_port_*)
   will gradually transition from experimental to stable status
   starting with DPDK 23.07 release.
+
+* eventdev: The single-event enqueue operation, used by static inline
+  burst-enqueue functions in <rte_eventdev.h>, has been removed,
+  breaking the ABI. The API remains unaffected.
diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index 499a3aace7..51b2345269 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -412,7 +412,6 @@ cn10k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 #undef T
 	};
 
-	event_dev->enqueue = cn10k_sso_hws_enq;
 	event_dev->enqueue_burst = cn10k_sso_hws_enq_burst;
 	event_dev->enqueue_new_burst = cn10k_sso_hws_enq_new_burst;
 	event_dev->enqueue_forward_burst = cn10k_sso_hws_enq_fwd_burst;
diff --git a/drivers/event/cnxk/cn10k_worker.c b/drivers/event/cnxk/cn10k_worker.c
index 9b5bf90159..62dd8e5c5d 100644
--- a/drivers/event/cnxk/cn10k_worker.c
+++ b/drivers/event/cnxk/cn10k_worker.c
@@ -107,32 +107,6 @@ sso_lmt_aw_wait_fc(struct cn10k_sso_hws *ws, int64_t req)
 	}
 }
 
-uint16_t __rte_hot
-cn10k_sso_hws_enq(void *port, const struct rte_event *ev)
-{
-	struct cn10k_sso_hws *ws = port;
-
-	switch (ev->op) {
-	case RTE_EVENT_OP_NEW:
-		return cn10k_sso_hws_new_event(ws, ev);
-	case RTE_EVENT_OP_FORWARD:
-		cn10k_sso_hws_forward_event(ws, ev);
-		break;
-	case RTE_EVENT_OP_RELEASE:
-		if (ws->swtag_req) {
-			cnxk_sso_hws_desched(ev->u64, ws->base);
-			ws->swtag_req = 0;
-			break;
-		}
-		cnxk_sso_hws_swtag_flush(ws->base);
-		break;
-	default:
-		return 0;
-	}
-
-	return 1;
-}
-
 #define VECTOR_SIZE_BITS	     0xFFFFFFFFFFF80000ULL
 #define VECTOR_GET_LINE_OFFSET(line) (19 + (3 * line))
 
@@ -384,8 +358,29 @@ uint16_t __rte_hot
 cn10k_sso_hws_enq_burst(void *port, const struct rte_event ev[],
 			uint16_t nb_events)
 {
+	struct cn10k_sso_hws *ws = port;
+
 	RTE_SET_USED(nb_events);
-	return cn10k_sso_hws_enq(port, ev);
+
+	switch (ev->op) {
+	case RTE_EVENT_OP_NEW:
+		return cn10k_sso_hws_new_event(ws, ev);
+	case RTE_EVENT_OP_FORWARD:
+		cn10k_sso_hws_forward_event(ws, ev);
+		break;
+	case RTE_EVENT_OP_RELEASE:
+		if (ws->swtag_req) {
+			cnxk_sso_hws_desched(ev->u64, ws->base);
+			ws->swtag_req = 0;
+			break;
+		}
+		cnxk_sso_hws_swtag_flush(ws->base);
+		break;
+	default:
+		return 0;
+	}
+
+	return 1;
 }
 
 uint16_t __rte_hot
diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index b4ee023723..c0db92f3a8 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -306,7 +306,6 @@ cn10k_sso_hws_get_work_empty(struct cn10k_sso_hws *ws, struct rte_event *ev,
 }
 
 /* CN10K Fastpath functions. */
-uint16_t __rte_hot cn10k_sso_hws_enq(void *port, const struct rte_event *ev);
 uint16_t __rte_hot cn10k_sso_hws_enq_burst(void *port,
 					   const struct rte_event ev[],
 					   uint16_t nb_events);
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index 6cce5477f0..fb967635af 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -434,7 +434,6 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 #undef T
 	};
 
-	event_dev->enqueue = cn9k_sso_hws_enq;
 	event_dev->enqueue_burst = cn9k_sso_hws_enq_burst;
 	event_dev->enqueue_new_burst = cn9k_sso_hws_enq_new_burst;
 	event_dev->enqueue_forward_burst = cn9k_sso_hws_enq_fwd_burst;
@@ -469,7 +468,6 @@ cn9k_sso_fp_fns_set(struct rte_eventdev *event_dev)
 				      sso_hws_tx_adptr_enq);
 
 	if (dev->dual_ws) {
-		event_dev->enqueue = cn9k_sso_hws_dual_enq;
 		event_dev->enqueue_burst = cn9k_sso_hws_dual_enq_burst;
 		event_dev->enqueue_new_burst = cn9k_sso_hws_dual_enq_new_burst;
 		event_dev->enqueue_forward_burst =
diff --git a/drivers/event/cnxk/cn9k_worker.c b/drivers/event/cnxk/cn9k_worker.c
index abbbfffd85..fa5924e113 100644
--- a/drivers/event/cnxk/cn9k_worker.c
+++ b/drivers/event/cnxk/cn9k_worker.c
@@ -8,10 +8,13 @@
 #include "cn9k_cryptodev_ops.h"
 
 uint16_t __rte_hot
-cn9k_sso_hws_enq(void *port, const struct rte_event *ev)
+cn9k_sso_hws_enq_burst(void *port, const struct rte_event ev[],
+		       uint16_t nb_events)
 {
 	struct cn9k_sso_hws *ws = port;
 
+	RTE_SET_USED(nb_events);
+
 	switch (ev->op) {
 	case RTE_EVENT_OP_NEW:
 		return cn9k_sso_hws_new_event(ws, ev);
@@ -33,14 +36,6 @@ cn9k_sso_hws_enq(void *port, const struct rte_event *ev)
 	return 1;
 }
 
-uint16_t __rte_hot
-cn9k_sso_hws_enq_burst(void *port, const struct rte_event ev[],
-		       uint16_t nb_events)
-{
-	RTE_SET_USED(nb_events);
-	return cn9k_sso_hws_enq(port, ev);
-}
-
 uint16_t __rte_hot
 cn9k_sso_hws_enq_new_burst(void *port, const struct rte_event ev[],
 			   uint16_t nb_events)
@@ -66,14 +61,18 @@ cn9k_sso_hws_enq_fwd_burst(void *port, const struct rte_event ev[],
 	return 1;
 }
 
+
 /* Dual ws ops. */
 
 uint16_t __rte_hot
-cn9k_sso_hws_dual_enq(void *port, const struct rte_event *ev)
+cn9k_sso_hws_dual_enq_burst(void *port, const struct rte_event ev[],
+			    uint16_t nb_events)
 {
 	struct cn9k_sso_hws_dual *dws = port;
 	uint64_t base;
 
+	RTE_SET_USED(nb_events);
+
 	base = dws->base[!dws->vws];
 	switch (ev->op) {
 	case RTE_EVENT_OP_NEW:
@@ -96,14 +95,6 @@ cn9k_sso_hws_dual_enq(void *port, const struct rte_event *ev)
 	return 1;
 }
 
-uint16_t __rte_hot
-cn9k_sso_hws_dual_enq_burst(void *port, const struct rte_event ev[],
-			    uint16_t nb_events)
-{
-	RTE_SET_USED(nb_events);
-	return cn9k_sso_hws_dual_enq(port, ev);
-}
-
 uint16_t __rte_hot
 cn9k_sso_hws_dual_enq_new_burst(void *port, const struct rte_event ev[],
 				uint16_t nb_events)
diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h
index 9ddab095ac..12426d58bc 100644
--- a/drivers/event/cnxk/cn9k_worker.h
+++ b/drivers/event/cnxk/cn9k_worker.h
@@ -365,7 +365,6 @@ cn9k_sso_hws_get_work_empty(uint64_t base, struct rte_event *ev,
 }
 
 /* CN9K Fastpath functions. */
-uint16_t __rte_hot cn9k_sso_hws_enq(void *port, const struct rte_event *ev);
 uint16_t __rte_hot cn9k_sso_hws_enq_burst(void *port,
 					  const struct rte_event ev[],
 					  uint16_t nb_events);
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 60c5cd4804..e7fe0ba576 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -1502,10 +1502,6 @@ dlb2_init_qe_mem(struct dlb2_port *qm_port, char *mz_name)
 	return ret;
 }
 
-static inline uint16_t
-dlb2_event_enqueue_delayed(void *event_port,
-			   const struct rte_event events[]);
-
 static inline uint16_t
 dlb2_event_enqueue_burst_delayed(void *event_port,
 				 const struct rte_event events[],
@@ -1697,7 +1693,6 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
 	 * performance reasons.
 	 */
 	if (qm_port->token_pop_mode == DELAYED_POP) {
-		dlb2->event_dev->enqueue = dlb2_event_enqueue_delayed;
 		dlb2->event_dev->enqueue_burst =
 			dlb2_event_enqueue_burst_delayed;
 		dlb2->event_dev->enqueue_new_burst =
@@ -3141,13 +3136,6 @@ dlb2_event_enqueue_burst_delayed(void *event_port,
 	return __dlb2_event_enqueue_burst(event_port, events, num, true);
 }
 
-static inline uint16_t
-dlb2_event_enqueue(void *event_port,
-		   const struct rte_event events[])
-{
-	return __dlb2_event_enqueue_burst(event_port, events, 1, false);
-}
-
 static inline uint16_t
 dlb2_event_enqueue_delayed(void *event_port,
 			   const struct rte_event events[])
@@ -4585,7 +4573,6 @@ dlb2_entry_points_init(struct rte_eventdev *dev)
 	/* Expose PMD's eventdev interface */
 
 	dev->dev_ops = &dlb2_eventdev_entry_ops;
-	dev->enqueue = dlb2_event_enqueue;
 	dev->enqueue_burst = dlb2_event_enqueue_burst;
 	dev->enqueue_new_burst = dlb2_event_enqueue_new_burst;
 	dev->enqueue_forward_burst = dlb2_event_enqueue_forward_burst;
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 4b3d16735b..8809f2ecd9 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -112,12 +112,6 @@ dpaa_event_enqueue_burst(void *port, const struct rte_event ev[],
 	return nb_events;
 }
 
-static uint16_t
-dpaa_event_enqueue(void *port, const struct rte_event *ev)
-{
-	return dpaa_event_enqueue_burst(port, ev, 1);
-}
-
 static void drain_4_bytes(int fd, fd_set *fdset)
 {
 	if (FD_ISSET(fd, fdset)) {
@@ -1008,7 +1002,6 @@ dpaa_event_dev_create(const char *name, const char *params)
 	priv = eventdev->data->dev_private;
 
 	eventdev->dev_ops       = &dpaa_eventdev_ops;
-	eventdev->enqueue       = dpaa_event_enqueue;
 	eventdev->enqueue_burst = dpaa_event_enqueue_burst;
 
 	if (dpaa_event_check_flags(params)) {
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index fa1a1ade80..de08fa1b78 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -202,12 +202,6 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[],
 
 }
 
-static uint16_t
-dpaa2_eventdev_enqueue(void *port, const struct rte_event *ev)
-{
-	return dpaa2_eventdev_enqueue_burst(port, ev, 1);
-}
-
 static void dpaa2_eventdev_dequeue_wait(uint64_t timeout_ticks)
 {
 	struct epoll_event epoll_ev;
@@ -1103,7 +1097,6 @@ dpaa2_eventdev_create(const char *name)
 	}
 
 	eventdev->dev_ops       = &dpaa2_eventdev_ops;
-	eventdev->enqueue       = dpaa2_eventdev_enqueue;
 	eventdev->enqueue_burst = dpaa2_eventdev_enqueue_burst;
 	eventdev->enqueue_new_burst = dpaa2_eventdev_enqueue_burst;
 	eventdev->enqueue_forward_burst = dpaa2_eventdev_enqueue_burst;
diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 6c5cde2468..f3bcacfaf8 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -439,7 +439,6 @@ dsw_probe(struct rte_vdev_device *vdev)
 		return -EFAULT;
 
 	dev->dev_ops = &dsw_evdev_ops;
-	dev->enqueue = dsw_event_enqueue;
 	dev->enqueue_burst = dsw_event_enqueue_burst;
 	dev->enqueue_new_burst = dsw_event_enqueue_new_burst;
 	dev->enqueue_forward_burst = dsw_event_enqueue_forward_burst;
diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h
index 6416a8a898..ca5d4714b0 100644
--- a/drivers/event/dsw/dsw_evdev.h
+++ b/drivers/event/dsw/dsw_evdev.h
@@ -263,7 +263,6 @@ struct dsw_ctl_msg {
 	struct dsw_queue_flow qfs[DSW_MAX_FLOWS_PER_MIGRATION];
 } __rte_aligned(4);
 
-uint16_t dsw_event_enqueue(void *port, const struct rte_event *event);
 uint16_t dsw_event_enqueue_burst(void *port,
 				 const struct rte_event events[],
 				 uint16_t events_len);
diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 93bbeead2e..1a4ea6629c 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -1242,12 +1242,6 @@ dsw_port_flush_out_buffers(struct dsw_evdev *dsw, struct dsw_port *source_port)
 		dsw_port_transmit_buffered(dsw, source_port, dest_port_id);
 }
 
-uint16_t
-dsw_event_enqueue(void *port, const struct rte_event *ev)
-{
-	return dsw_event_enqueue_burst(port, ev, unlikely(ev == NULL) ? 0 : 1);
-}
-
 static __rte_always_inline uint16_t
 dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
 				const struct rte_event events[],
diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c
index 36454939ea..2b0e255499 100644
--- a/drivers/event/octeontx/ssovf_worker.c
+++ b/drivers/event/octeontx/ssovf_worker.c
@@ -148,12 +148,14 @@ ssows_deq_timeout_burst_ ##name(void *port, struct rte_event ev[],	     \
 SSO_RX_ADPTR_ENQ_FASTPATH_FUNC
 #undef R
 
-__rte_always_inline uint16_t __rte_hot
-ssows_enq(void *port, const struct rte_event *ev)
+uint16_t __rte_hot
+ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events)
 {
 	struct ssows *ws = port;
 	uint16_t ret = 1;
 
+	RTE_SET_USED(nb_events);
+
 	switch (ev->op) {
 	case RTE_EVENT_OP_NEW:
 		rte_smp_wmb();
@@ -171,13 +173,6 @@ ssows_enq(void *port, const struct rte_event *ev)
 	return ret;
 }
 
-uint16_t __rte_hot
-ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events)
-{
-	RTE_SET_USED(nb_events);
-	return ssows_enq(port, ev);
-}
-
 uint16_t __rte_hot
 ssows_enq_new_burst(void *port, const struct rte_event ev[], uint16_t nb_events)
 {
@@ -336,7 +331,6 @@ ssovf_fastpath_fns_set(struct rte_eventdev *dev)
 {
 	struct ssovf_evdev *edev = ssovf_pmd_priv(dev);
 
-	dev->enqueue       = ssows_enq;
 	dev->enqueue_burst = ssows_enq_burst;
 	dev->enqueue_new_burst = ssows_enq_new_burst;
 	dev->enqueue_forward_burst = ssows_enq_fwd_burst;
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 9ce8b39b60..6bde153514 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -41,18 +41,6 @@ opdl_event_enqueue_burst(void *port,
 	return p->enq(p, ev, num);
 }
 
-uint16_t
-opdl_event_enqueue(void *port, const struct rte_event *ev)
-{
-	struct opdl_port *p = port;
-
-	if (unlikely(!p->opdl->data->dev_started))
-		return 0;
-
-
-	return p->enq(p, ev, 1);
-}
-
 uint16_t
 opdl_event_dequeue_burst(void *port,
 			 struct rte_event *ev,
@@ -714,7 +702,6 @@ opdl_probe(struct rte_vdev_device *vdev)
 
 	dev->dev_ops = &evdev_opdl_ops;
 
-	dev->enqueue = opdl_event_enqueue;
 	dev->enqueue_burst = opdl_event_enqueue_burst;
 	dev->enqueue_new_burst = opdl_event_enqueue_burst;
 	dev->enqueue_forward_burst = opdl_event_enqueue_burst;
diff --git a/drivers/event/opdl/opdl_evdev.h b/drivers/event/opdl/opdl_evdev.h
index 1ca166b37c..1bf862cfff 100644
--- a/drivers/event/opdl/opdl_evdev.h
+++ b/drivers/event/opdl/opdl_evdev.h
@@ -275,7 +275,6 @@ opdl_pmd_priv_const(const struct rte_eventdev *eventdev)
 	return eventdev->data->dev_private;
 }
 
-uint16_t opdl_event_enqueue(void *port, const struct rte_event *ev);
 uint16_t opdl_event_enqueue_burst(void *port, const struct rte_event ev[],
 		uint16_t num);
 
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index 8513b9a013..b31c902d42 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -25,18 +25,6 @@
 #define EVENTDEV_NAME_SKELETON_PMD event_skeleton
 /**< Skeleton event device PMD name */
 
-static uint16_t
-skeleton_eventdev_enqueue(void *port, const struct rte_event *ev)
-{
-	struct skeleton_port *sp = port;
-
-	RTE_SET_USED(sp);
-	RTE_SET_USED(ev);
-	RTE_SET_USED(port);
-
-	return 0;
-}
-
 static uint16_t
 skeleton_eventdev_enqueue_burst(void *port, const struct rte_event ev[],
 			uint16_t nb_events)
@@ -349,7 +337,6 @@ skeleton_eventdev_init(struct rte_eventdev *eventdev)
 	PMD_DRV_FUNC_TRACE();
 
 	eventdev->dev_ops       = &skeleton_eventdev_ops;
-	eventdev->enqueue       = skeleton_eventdev_enqueue;
 	eventdev->enqueue_burst = skeleton_eventdev_enqueue_burst;
 	eventdev->dequeue       = skeleton_eventdev_dequeue;
 	eventdev->dequeue_burst = skeleton_eventdev_dequeue_burst;
@@ -439,7 +426,6 @@ skeleton_eventdev_create(const char *name, int socket_id)
 	}
 
 	eventdev->dev_ops       = &skeleton_eventdev_ops;
-	eventdev->enqueue       = skeleton_eventdev_enqueue;
 	eventdev->enqueue_burst = skeleton_eventdev_enqueue_burst;
 	eventdev->dequeue       = skeleton_eventdev_dequeue;
 	eventdev->dequeue_burst = skeleton_eventdev_dequeue_burst;
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index cfd659d774..7655505b7c 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -1080,7 +1080,6 @@ sw_probe(struct rte_vdev_device *vdev)
 		return -EFAULT;
 	}
 	dev->dev_ops = &evdev_sw_ops;
-	dev->enqueue = sw_event_enqueue;
 	dev->enqueue_burst = sw_event_enqueue_burst;
 	dev->enqueue_new_burst = sw_event_enqueue_burst;
 	dev->enqueue_forward_burst = sw_event_enqueue_burst;
diff --git a/drivers/event/sw/sw_evdev.h b/drivers/event/sw/sw_evdev.h
index c7b943a72b..110724d52d 100644
--- a/drivers/event/sw/sw_evdev.h
+++ b/drivers/event/sw/sw_evdev.h
@@ -288,7 +288,6 @@ sw_pmd_priv_const(const struct rte_eventdev *eventdev)
 	return eventdev->data->dev_private;
 }
 
-uint16_t sw_event_enqueue(void *port, const struct rte_event *ev);
 uint16_t sw_event_enqueue_burst(void *port, const struct rte_event ev[],
 		uint16_t num);
 
diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c
index 063b919c7e..f041bae2a0 100644
--- a/drivers/event/sw/sw_evdev_worker.c
+++ b/drivers/event/sw/sw_evdev_worker.c
@@ -131,12 +131,6 @@ sw_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num)
 	return enq;
 }
 
-uint16_t
-sw_event_enqueue(void *port, const struct rte_event *ev)
-{
-	return sw_event_enqueue_burst(port, ev, 1);
-}
-
 uint16_t
 sw_event_dequeue_burst(void *port, struct rte_event *ev, uint16_t num,
 		uint64_t wait)
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index c68c3a2262..fab0bf501b 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -159,8 +159,6 @@ struct rte_eventdev {
 	uint8_t attached : 1;
 	/**< Flag indicating the device is attached */
 
-	event_enqueue_t enqueue;
-	/**< Pointer to PMD enqueue function. */
 	event_enqueue_burst_t enqueue_burst;
 	/**< Pointer to PMD enqueue burst function. */
 	event_enqueue_burst_t enqueue_new_burst;
diff --git a/lib/eventdev/eventdev_private.c b/lib/eventdev/eventdev_private.c
index 1d3d9d357e..4c998669c8 100644
--- a/lib/eventdev/eventdev_private.c
+++ b/lib/eventdev/eventdev_private.c
@@ -5,15 +5,6 @@
 #include "eventdev_pmd.h"
 #include "rte_eventdev.h"
 
-static uint16_t
-dummy_event_enqueue(__rte_unused void *port,
-		    __rte_unused const struct rte_event *ev)
-{
-	RTE_EDEV_LOG_ERR(
-		"event enqueue requested for unconfigured event device");
-	return 0;
-}
-
 static uint16_t
 dummy_event_enqueue_burst(__rte_unused void *port,
 			  __rte_unused const struct rte_event ev[],
@@ -86,7 +77,6 @@ event_dev_fp_ops_reset(struct rte_event_fp_ops *fp_op)
 {
 	static void *dummy_data[RTE_MAX_QUEUES_PER_PORT];
 	static const struct rte_event_fp_ops dummy = {
-		.enqueue = dummy_event_enqueue,
 		.enqueue_burst = dummy_event_enqueue_burst,
 		.enqueue_new_burst = dummy_event_enqueue_burst,
 		.enqueue_forward_burst = dummy_event_enqueue_burst,
@@ -107,7 +97,6 @@ void
 event_dev_fp_ops_set(struct rte_event_fp_ops *fp_op,
 		     const struct rte_eventdev *dev)
 {
-	fp_op->enqueue = dev->enqueue;
 	fp_op->enqueue_burst = dev->enqueue_burst;
 	fp_op->enqueue_new_burst = dev->enqueue_new_burst;
 	fp_op->enqueue_forward_burst = dev->enqueue_forward_burst;
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index b6a4fa1495..2461d002da 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -1929,14 +1929,8 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
 	}
 #endif
 	rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (void *)fn);
-	/*
-	 * Allow zero cost non burst mode routine invocation if application
-	 * requests nb_events as const one
-	 */
-	if (nb_events == 1)
-		return (fp_ops->enqueue)(port, ev);
-	else
-		return fn(port, ev, nb_events);
+
+	return fn(port, ev, nb_events);
 }
 
 /**
diff --git a/lib/eventdev/rte_eventdev_core.h b/lib/eventdev/rte_eventdev_core.h
index c328bdbc82..5bc3e645b9 100644
--- a/lib/eventdev/rte_eventdev_core.h
+++ b/lib/eventdev/rte_eventdev_core.h
@@ -12,9 +12,6 @@
 extern "C" {
 #endif
 
-typedef uint16_t (*event_enqueue_t)(void *port, const struct rte_event *ev);
-/**< @internal Enqueue event on port of a device */
-
 typedef uint16_t (*event_enqueue_burst_t)(void *port,
 					  const struct rte_event ev[],
 					  uint16_t nb_events);
@@ -45,8 +42,6 @@ typedef uint16_t (*event_crypto_adapter_enqueue_t)(void *port,
 struct rte_event_fp_ops {
 	void **data;
 	/**< points to array of internal port data pointers */
-	event_enqueue_t enqueue;
-	/**< PMD enqueue function. */
 	event_enqueue_burst_t enqueue_burst;
 	/**< PMD enqueue burst function. */
 	event_enqueue_burst_t enqueue_new_burst;
@@ -65,7 +60,7 @@ struct rte_event_fp_ops {
 	/**< PMD Tx adapter enqueue same destination function. */
 	event_crypto_adapter_enqueue_t ca_enqueue;
 	/**< PMD Crypto adapter enqueue function. */
-	uintptr_t reserved[6];
+	uintptr_t reserved[7];
 } __rte_cache_aligned;
 
 extern struct rte_event_fp_ops rte_event_fp_ops[RTE_EVENT_MAX_DEVS];
-- 
2.34.1


  parent reply	other threads:[~2023-07-04 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 17:42 [RFC] " Mattias Rönnblom
2023-06-30  4:37 ` Jerin Jacob
2023-07-04 12:01   ` Mattias Rönnblom
2023-07-04 11:53 ` Mattias Rönnblom [this message]
2023-07-05  7:47   ` [PATCH] " Jerin Jacob
2023-07-05  8:41     ` Mattias Rönnblom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230704115307.243031-1-mattias.ronnblom@ericsson.com \
    --to=mattias.ronnblom@ericsson.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hofors@lysator.liu.se \
    --cc=jerinj@marvell.com \
    --cc=jerinjacobk@gmail.com \
    --cc=liangma@liangbit.com \
    --cc=pbhagavatula@marvell.com \
    --cc=peter.mccarthy@intel.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=timothy.mcdaniel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).