[v3,1/9] eventdev: add capability flags for supported sched types

Message ID 20231212113223.31147-2-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series document scheduling types for eventdev drivers |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Dec. 12, 2023, 11:32 a.m. UTC
  Not all eventdev's support all scheduling types, for example, some may
only support atomic scheduling or others only support ordered
scheduling. There is currently no clear indication for each driver what
sched types it supports, so add capability flags to be indicated on
return from rte_event_dev_info_get() API.

Similarly add the possible scheduling types to the capabilities table in
the docs.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 doc/guides/eventdevs/features/default.ini |  3 +++
 lib/eventdev/rte_eventdev.h               | 21 +++++++++++++++++++++
 2 files changed, 24 insertions(+)
  

Patch

diff --git a/doc/guides/eventdevs/features/default.ini b/doc/guides/eventdevs/features/default.ini
index e980ae134a..1cc4303fe5 100644
--- a/doc/guides/eventdevs/features/default.ini
+++ b/doc/guides/eventdevs/features/default.ini
@@ -6,6 +6,9 @@ 
 ; the features table in the documentation.
 ;
 [Scheduling Features]
+atomic_scheduling          =
+ordered_scheduling         =
+parallel_scheduling        =
 queue_qos                  =
 event_qos                  =
 distributed_sched          =
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index ec9b02455d..d48957362c 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -326,6 +326,27 @@  struct rte_event;
  * than one.
  */
 
+#define RTE_EVENT_DEV_CAP_ATOMIC  (1ULL << 13)
+/**< Event device is capable of atomic scheduling.
+ * When this flag is set, the application can configure queues with scheduling type
+ * atomic on this event device.
+ * @see RTE_SCHED_TYPE_ATOMIC
+ */
+
+#define RTE_EVENT_DEV_CAP_ORDERED  (1ULL << 14)
+/**< Event device is capable of ordered scheduling.
+ * When this flag is set, the application can configure queues with scheduling type
+ * ordered on this event device.
+ * @see RTE_SCHED_TYPE_ORDERED
+ */
+
+#define RTE_EVENT_DEV_CAP_PARALLEL  (1ULL << 15)
+/**< Event device is capable of parallel scheduling.
+ * When this flag is set, the application can configure queues with scheduling type
+ * parallel on this event device.
+ * @see RTE_SCHED_TYPE_PARALLEL
+ */
+
 /* Event device priority levels */
 #define RTE_EVENT_DEV_PRIORITY_HIGHEST   0
 /**< Highest priority expressed across eventdev subsystem