Thread (1 message) 1 message, 1 author, 2019-06-03

[dpdk-dev] [PATCH 22/39] eventdev: add option to specify schedule mode for app stage

From: Anoob Joseph <hidden>
Date: 2019-06-03 16:53:55
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Possibly related (same subject, not in this thread)

Scheduling mode for each event queue is dependent on the same of app
stage. Configure event queue taking this also into account.

Signed-off-by: Anoob Joseph <redacted>
Signed-off-by: Lukasz Bartosik <redacted>
---
 lib/librte_eventdev/rte_eventmode_helper.c         | 24 ++++++++++++++++++++--
 .../rte_eventmode_helper_internal.h                |  8 ++++++++
 2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eventdev/rte_eventmode_helper.c b/lib/librte_eventdev/rte_eventmode_helper.c
index ec0be44..30bb357 100644
--- a/lib/librte_eventdev/rte_eventmode_helper.c
+++ b/lib/librte_eventdev/rte_eventmode_helper.c
@@ -85,6 +85,8 @@ em_parse_transfer_mode(struct rte_eventmode_helper_conf *conf,
 static void
 em_initialize_helper_conf(struct rte_eventmode_helper_conf *conf)
 {
+	struct eventmode_conf *em_conf = NULL;
+
 	/* Set default conf */
 
 	/* Packet transfer mode: poll */
@@ -92,6 +94,13 @@ em_initialize_helper_conf(struct rte_eventmode_helper_conf *conf)
 
 	/* Keep all ethernet ports enabled by default */
 	conf->eth_portmask = -1;
+
+	/* Get eventmode conf */
+	em_conf = (struct eventmode_conf *)(conf->mode_params);
+
+	/* Schedule type: ordered */
+	/* FIXME */
+	em_conf->ext_params.sched_type = RTE_SCHED_TYPE_ORDERED;
 }
 
 struct rte_eventmode_helper_conf * __rte_experimental
@@ -233,8 +242,19 @@ rte_eventmode_helper_initialize_eventdev(struct eventmode_conf *em_conf)
 			eventq_conf.event_queue_cfg =
 					eventdev_config->ev_queue_mode;
 
-			/* Set schedule type as ATOMIC */
-			eventq_conf.schedule_type = RTE_SCHED_TYPE_ATOMIC;
+			/*
+			 * All queues need to be set with sched_type as
+			 * schedule type for the application stage. One queue
+			 * would be reserved for the final eth tx stage. This
+			 * will be an atomic queue.
+			 */
+			if (j == nb_eventqueue-1) {
+				eventq_conf.schedule_type =
+					RTE_SCHED_TYPE_ATOMIC;
+			} else {
+				eventq_conf.schedule_type =
+					em_conf->ext_params.sched_type;
+			}
 
 			/* Set max atomic flows to 1024 */
 			eventq_conf.nb_atomic_flows = 1024;
diff --git a/lib/librte_eventdev/rte_eventmode_helper_internal.h b/lib/librte_eventdev/rte_eventmode_helper_internal.h
index ee41833..2a6cd90 100644
--- a/lib/librte_eventdev/rte_eventmode_helper_internal.h
+++ b/lib/librte_eventdev/rte_eventmode_helper_internal.h
@@ -61,6 +61,14 @@ struct eventmode_conf {
 	struct rte_eventmode_helper_event_link_info
 			link[EVENT_MODE_MAX_LCORE_LINKS];
 		/**< Per link conf */
+	union {
+		struct {
+			uint64_t sched_type			: 2;
+		/**< Schedule type */
+		};
+		uint64_t u64;
+	} ext_params;
+		/**< 64 bit field to specify extended params */
 };
 
 #endif /* _RTE_EVENTMODE_HELPER_INTERNAL_H_ */
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help