DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 24.03 0/8] document scheduling types for eventdev drivers
@ 2023-11-20 17:25 Bruce Richardson
  2023-11-20 17:25 ` [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types Bruce Richardson
                   ` (9 more replies)
  0 siblings, 10 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:25 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The various eventdev drivers, while fitting under a common API, do not
all support all scheduling types. The eventdev API is missing some way
to query the particular scheduling support for a driver, a key piece of
information for application developers. This patchset adds the necessary
capability flags, and documentation feature rows, then, driver-by-driver
adds the necessary flags to both code and docs.

Bruce Richardson (8):
  eventdev: add capability flags for supported sched types
  event/cnxk: add schedule-type capability flags
  event/dlb2: add schedule-type capability flags
  event/dpaa*: add schedule-type capability flags
  event/dsw: add schedule-type capability flags
  event/octeontx: add schedule-type capability flags
  event/opdl: add schedule-type capability flags
  event/sw: add schedule-type capability flags

 doc/guides/eventdevs/features/cnxk.ini     |  3 +++
 doc/guides/eventdevs/features/default.ini  |  3 +++
 doc/guides/eventdevs/features/dlb2.ini     |  3 +++
 doc/guides/eventdevs/features/dpaa.ini     |  2 ++
 doc/guides/eventdevs/features/dpaa2.ini    |  2 ++
 doc/guides/eventdevs/features/dsw.ini      |  1 +
 doc/guides/eventdevs/features/octeontx.ini |  3 +++
 doc/guides/eventdevs/features/opdl.ini     |  2 ++
 doc/guides/eventdevs/features/sw.ini       |  3 +++
 drivers/event/cnxk/cnxk_eventdev.c         |  5 ++++-
 drivers/event/dlb2/dlb2.c                  |  5 ++++-
 drivers/event/dpaa/dpaa_eventdev.c         |  2 ++
 drivers/event/dpaa2/dpaa2_eventdev.c       |  2 ++
 drivers/event/dsw/dsw_evdev.c              |  1 +
 drivers/event/octeontx/ssovf_evdev.c       |  3 +++
 drivers/event/opdl/opdl_evdev.c            |  3 +++
 drivers/event/sw/sw_evdev.c                |  3 +++
 lib/eventdev/rte_eventdev.h                | 21 +++++++++++++++++++++
 18 files changed, 65 insertions(+), 2 deletions(-)

--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
@ 2023-11-20 17:25 ` Bruce Richardson
  2023-11-20 17:48   ` Jerin Jacob
  2023-11-21  9:30   ` Mattias Rönnblom
  2023-11-20 17:26 ` [PATCH 24.03 2/8] event/cnxk: add schedule-type capability flags Bruce Richardson
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:25 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Jerin Jacob

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>
---
 doc/guides/eventdevs/features/default.ini |  3 +++
 lib/eventdev/rte_eventdev.h               | 21 +++++++++++++++++++++
 2 files changed, 24 insertions(+)

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..9109de157e 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 << 13)
+/**< 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 << 13)
+/**< 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
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 2/8] event/cnxk: add schedule-type capability flags
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
  2023-11-20 17:25 ` [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types Bruce Richardson
@ 2023-11-20 17:26 ` Bruce Richardson
  2023-11-20 17:26 ` [PATCH 24.03 3/8] event/dlb2: " Bruce Richardson
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:26 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Pavan Nikhilesh, Shijith Thotton

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/cnxk.ini | 3 +++
 drivers/event/cnxk/cnxk_eventdev.c     | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guides/eventdevs/features/cnxk.ini b/doc/guides/eventdevs/features/cnxk.ini
index 5d353e3670..d1516372fa 100644
--- a/doc/guides/eventdevs/features/cnxk.ini
+++ b/doc/guides/eventdevs/features/cnxk.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 0c61f4c20e..e266ee2789 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -22,7 +22,10 @@ cnxk_sso_info_get(struct cnxk_sso_evdev *dev,
 	dev_info->max_event_port_dequeue_depth = 1;
 	dev_info->max_event_port_enqueue_depth = 1;
 	dev_info->max_num_events = dev->max_num_events;
-	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS |
+	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_ATOMIC |
+				  RTE_EVENT_DEV_CAP_ORDERED |
+				  RTE_EVENT_DEV_CAP_PARALLEL |
+				  RTE_EVENT_DEV_CAP_QUEUE_QOS |
 				  RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 				  RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES |
 				  RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 3/8] event/dlb2: add schedule-type capability flags
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
  2023-11-20 17:25 ` [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types Bruce Richardson
  2023-11-20 17:26 ` [PATCH 24.03 2/8] event/cnxk: add schedule-type capability flags Bruce Richardson
@ 2023-11-20 17:26 ` Bruce Richardson
  2023-11-20 22:45   ` Sevincer, Abdullah
  2023-11-20 17:26 ` [PATCH 24.03 4/8] event/dpaa*: " Bruce Richardson
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:26 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Abdullah Sevincer

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/dlb2.ini | 3 +++
 drivers/event/dlb2/dlb2.c              | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guides/eventdevs/features/dlb2.ini b/doc/guides/eventdevs/features/dlb2.ini
index 48a2a18aff..7b80286927 100644
--- a/doc/guides/eventdevs/features/dlb2.ini
+++ b/doc/guides/eventdevs/features/dlb2.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 event_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 050ace0904..770bdcbd2d 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -71,7 +71,10 @@ static struct rte_event_dev_info evdev_dlb2_default_info = {
 	.max_num_events = DLB2_MAX_NUM_LDB_CREDITS,
 	.max_single_link_event_port_queue_pairs =
 		DLB2_MAX_NUM_DIR_PORTS(DLB2_HW_V2),
-	.event_dev_cap = (RTE_EVENT_DEV_CAP_EVENT_QOS |
+	.event_dev_cap = (RTE_EVENT_DEV_CAP_ATOMIC |
+			  RTE_EVENT_DEV_CAP_ORDERED |
+			  RTE_EVENT_DEV_CAP_PARALLEL |
+			  RTE_EVENT_DEV_CAP_EVENT_QOS |
 			  RTE_EVENT_DEV_CAP_NONSEQ_MODE |
 			  RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 			  RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES |
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 4/8] event/dpaa*: add schedule-type capability flags
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
                   ` (2 preceding siblings ...)
  2023-11-20 17:26 ` [PATCH 24.03 3/8] event/dlb2: " Bruce Richardson
@ 2023-11-20 17:26 ` Bruce Richardson
  2023-11-21 10:51   ` Hemant Agrawal
  2023-11-20 17:26 ` [PATCH 24.03 5/8] event/dsw: " Bruce Richardson
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:26 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Hemant Agrawal, Sachin Saxena

Document explicitly the scheduling types supported by these drivers,
both via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/dpaa.ini  | 2 ++
 doc/guides/eventdevs/features/dpaa2.ini | 2 ++
 drivers/event/dpaa/dpaa_eventdev.c      | 2 ++
 drivers/event/dpaa2/dpaa2_eventdev.c    | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/doc/guides/eventdevs/features/dpaa.ini b/doc/guides/eventdevs/features/dpaa.ini
index b73bfa02e5..b2ee6ed93a 100644
--- a/doc/guides/eventdevs/features/dpaa.ini
+++ b/doc/guides/eventdevs/features/dpaa.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 burst_mode                 = Y
 nonseq_mode                = Y
diff --git a/doc/guides/eventdevs/features/dpaa2.ini b/doc/guides/eventdevs/features/dpaa2.ini
index c935bd0cfc..6d3c07ed66 100644
--- a/doc/guides/eventdevs/features/dpaa2.ini
+++ b/doc/guides/eventdevs/features/dpaa2.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 queue_all_types            = Y
 burst_mode                 = Y
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 46a9b88c73..57ddb85e52 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -353,6 +353,8 @@ dpaa_event_dev_info_get(struct rte_eventdev *dev,
 	dev_info->max_num_events =
 		DPAA_EVENT_MAX_NUM_EVENTS;
 	dev_info->event_dev_cap =
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 		RTE_EVENT_DEV_CAP_BURST_MODE |
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index dd4e64395f..dd62c76c86 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -404,6 +404,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
 		DPAA2_EVENT_MAX_PORT_ENQUEUE_DEPTH;
 	dev_info->max_num_events = DPAA2_EVENT_MAX_NUM_EVENTS;
 	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_BURST_MODE|
 		RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 5/8] event/dsw: add schedule-type capability flags
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
                   ` (3 preceding siblings ...)
  2023-11-20 17:26 ` [PATCH 24.03 4/8] event/dpaa*: " Bruce Richardson
@ 2023-11-20 17:26 ` Bruce Richardson
  2023-11-21  9:30   ` Mattias Rönnblom
  2023-11-20 17:26 ` [PATCH 24.03 6/8] event/octeontx: " Bruce Richardson
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:26 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Mattias Rönnblom

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/dsw.ini | 1 +
 drivers/event/dsw/dsw_evdev.c         | 1 +
 2 files changed, 2 insertions(+)

diff --git a/doc/guides/eventdevs/features/dsw.ini b/doc/guides/eventdevs/features/dsw.ini
index c8bc6b3f1d..941d257e3d 100644
--- a/doc/guides/eventdevs/features/dsw.ini
+++ b/doc/guides/eventdevs/features/dsw.ini
@@ -4,6 +4,7 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
 distributed_sched          = Y
 burst_mode                 = Y
 nonseq_mode                = Y
diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 1209e73a9d..a68ca1fe30 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -220,6 +220,7 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused,
 		.max_num_events = DSW_MAX_EVENTS,
 		.max_profiles_per_port = 1,
 		.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
+		RTE_EVENT_DEV_CAP_ATOMIC |
 		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
 		RTE_EVENT_DEV_CAP_NONSEQ_MODE|
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT|
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 6/8] event/octeontx: add schedule-type capability flags
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
                   ` (4 preceding siblings ...)
  2023-11-20 17:26 ` [PATCH 24.03 5/8] event/dsw: " Bruce Richardson
@ 2023-11-20 17:26 ` Bruce Richardson
  2023-11-20 17:26 ` [PATCH 24.03 7/8] event/opdl: " Bruce Richardson
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:26 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Jerin Jacob

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/octeontx.ini | 3 +++
 drivers/event/octeontx/ssovf_evdev.c       | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/guides/eventdevs/features/octeontx.ini b/doc/guides/eventdevs/features/octeontx.ini
index ec044e6289..06efae767a 100644
--- a/doc/guides/eventdevs/features/octeontx.ini
+++ b/doc/guides/eventdevs/features/octeontx.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index a16f24e088..3a933b1db7 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -151,6 +151,9 @@ ssovf_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *dev_info)
 	dev_info->max_event_port_enqueue_depth = 1;
 	dev_info->max_num_events =  edev->max_num_events;
 	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS |
+					RTE_EVENT_DEV_CAP_ATOMIC |
+					RTE_EVENT_DEV_CAP_ORDERED |
+					RTE_EVENT_DEV_CAP_PARALLEL |
 					RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 					RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES|
 					RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 7/8] event/opdl: add schedule-type capability flags
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
                   ` (5 preceding siblings ...)
  2023-11-20 17:26 ` [PATCH 24.03 6/8] event/octeontx: " Bruce Richardson
@ 2023-11-20 17:26 ` Bruce Richardson
  2023-11-20 17:26 ` [PATCH 24.03 8/8] event/sw: " Bruce Richardson
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:26 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Liang Ma, Peter Mccarthy

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---

Maintainers, please check this patch carefully, as I'm not sure the
correct way to document this.

According to the docs for this driver, it supports parallel only via
ordered. Therefore, I've actually made the docs inconsistent from the
flags claimed in the API. I've documented that PARALLEL is supported in
the info_get() flags, so code that checks for that will run, but I've
omitted it from the table in the docs, since it is not directly
supported. Is this a good compromise, or an accurate reflection of the
driver?
---
 doc/guides/eventdevs/features/opdl.ini | 2 ++
 drivers/event/opdl/opdl_evdev.c        | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/doc/guides/eventdevs/features/opdl.ini b/doc/guides/eventdevs/features/opdl.ini
index 5cc35d3c77..7adccc98de 100644
--- a/doc/guides/eventdevs/features/opdl.ini
+++ b/doc/guides/eventdevs/features/opdl.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
 burst_mode                 = Y
 carry_flow_id              = Y
 maintenance_free           = Y
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 0cccaf7e97..b34a5fcacd 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -376,6 +376,9 @@ opdl_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 		.max_event_port_enqueue_depth = MAX_OPDL_CONS_Q_DEPTH,
 		.max_num_events = OPDL_INFLIGHT_EVENTS_TOTAL,
 		.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE |
+				 RTE_EVENT_DEV_CAP_ORDERED |
+				 RTE_EVENT_DEV_CAP_ATOMIC |
+				 RTE_EVENT_DEV_CAP_PARALLEL |
 				 RTE_EVENT_DEV_CAP_CARRY_FLOW_ID |
 				 RTE_EVENT_DEV_CAP_MAINTENANCE_FREE,
 		.max_profiles_per_port = 1,
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 8/8] event/sw: add schedule-type capability flags
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
                   ` (6 preceding siblings ...)
  2023-11-20 17:26 ` [PATCH 24.03 7/8] event/opdl: " Bruce Richardson
@ 2023-11-20 17:26 ` Bruce Richardson
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
  9 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:26 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Harry van Haaren

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/sw.ini | 3 +++
 drivers/event/sw/sw_evdev.c          | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/guides/eventdevs/features/sw.ini b/doc/guides/eventdevs/features/sw.ini
index 8c89d3b8d2..f4d46d79b8 100644
--- a/doc/guides/eventdevs/features/sw.ini
+++ b/doc/guides/eventdevs/features/sw.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 event_qos                  = Y
 burst_mode                 = Y
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 55e7735cb0..1c01b069fe 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -600,6 +600,9 @@ sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 			.max_event_port_enqueue_depth = MAX_SW_PROD_Q_DEPTH,
 			.max_num_events = SW_INFLIGHT_EVENTS_TOTAL,
 			.event_dev_cap = (
+				RTE_EVENT_DEV_CAP_ATOMIC |
+				RTE_EVENT_DEV_CAP_ORDERED |
+				RTE_EVENT_DEV_CAP_PARALLEL |
 				RTE_EVENT_DEV_CAP_QUEUE_QOS |
 				RTE_EVENT_DEV_CAP_BURST_MODE |
 				RTE_EVENT_DEV_CAP_EVENT_QOS |
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types
  2023-11-20 17:25 ` [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types Bruce Richardson
@ 2023-11-20 17:48   ` Jerin Jacob
  2023-11-20 17:52     ` Bruce Richardson
  2023-11-21  9:30   ` Mattias Rönnblom
  1 sibling, 1 reply; 50+ messages in thread
From: Jerin Jacob @ 2023-11-20 17:48 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Jerin Jacob

On Mon, Nov 20, 2023 at 11:08 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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>
> ---
>  doc/guides/eventdevs/features/default.ini |  3 +++
>  lib/eventdev/rte_eventdev.h               | 21 +++++++++++++++++++++
>  2 files changed, 24 insertions(+)
>
> 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..9109de157e 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 << 13)
> +/**< 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 << 13)
> +/**< 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
> + */

All the caps definition is 1ULL << 13. It should be unique per capa.


>  /* Event device priority levels */
>  #define RTE_EVENT_DEV_PRIORITY_HIGHEST   0
>  /**< Highest priority expressed across eventdev subsystem
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types
  2023-11-20 17:48   ` Jerin Jacob
@ 2023-11-20 17:52     ` Bruce Richardson
  0 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-20 17:52 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Jerin Jacob

On Mon, Nov 20, 2023 at 11:18:14PM +0530, Jerin Jacob wrote:
> On Mon, Nov 20, 2023 at 11:08 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > 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>
> > ---
> >  doc/guides/eventdevs/features/default.ini |  3 +++
> >  lib/eventdev/rte_eventdev.h               | 21 +++++++++++++++++++++
> >  2 files changed, 24 insertions(+)
> >
> > 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..9109de157e 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 << 13)
> > +/**< 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 << 13)
> > +/**< 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
> > + */
> 
> All the caps definition is 1ULL << 13. It should be unique per capa.
> 
Yep, good spot! Copy-paste error, naturally. :-(

Will fix in a v2.

/Bruce

^ permalink raw reply	[flat|nested] 50+ messages in thread

* RE: [PATCH 24.03 3/8] event/dlb2: add schedule-type capability flags
  2023-11-20 17:26 ` [PATCH 24.03 3/8] event/dlb2: " Bruce Richardson
@ 2023-11-20 22:45   ` Sevincer, Abdullah
  0 siblings, 0 replies; 50+ messages in thread
From: Sevincer, Abdullah @ 2023-11-20 22:45 UTC (permalink / raw)
  To: Richardson, Bruce, dev

[-- Attachment #1: Type: text/plain, Size: 59 bytes --]

Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>

[-- Attachment #2: Type: text/html, Size: 1530 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types
  2023-11-20 17:25 ` [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types Bruce Richardson
  2023-11-20 17:48   ` Jerin Jacob
@ 2023-11-21  9:30   ` Mattias Rönnblom
  2023-11-21  9:46     ` Bruce Richardson
  2023-11-21 11:12     ` Bruce Richardson
  1 sibling, 2 replies; 50+ messages in thread
From: Mattias Rönnblom @ 2023-11-21  9:30 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: Jerin Jacob

On 2023-11-20 18:25, Bruce Richardson wrote:
> 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.
> 

Should we allow an event device to advertise 
RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES, but not all of these?

With current wording of RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES prevents that, 
but you should be able to allow for this without breaking backward 
compatibility by tweaking the text from

"Event device is capable of enqueuing events of any type to any queue."

"Event device is capable of enqueuing events of any type advertised as 
supported (e.g., by RTE_EVENT_DEV_CAP_ATOMIC)."

An event device that doesn't support ordered, but does support "all" 
types seems reasonable to me, while an event device that does support 
ordered on a per-event basis, but doesn't for queue-level configuration 
does not.

If RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES is left unchanged, the user may ask 
herself what "any" means (any supported in the API, or any supported by 
the actual event device).

> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   doc/guides/eventdevs/features/default.ini |  3 +++
>   lib/eventdev/rte_eventdev.h               | 21 +++++++++++++++++++++
>   2 files changed, 24 insertions(+)
> 
> 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..9109de157e 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 << 13)
> +/**< 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 << 13)
> +/**< 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
> --
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 5/8] event/dsw: add schedule-type capability flags
  2023-11-20 17:26 ` [PATCH 24.03 5/8] event/dsw: " Bruce Richardson
@ 2023-11-21  9:30   ` Mattias Rönnblom
  2023-11-21  9:32     ` Mattias Rönnblom
  0 siblings, 1 reply; 50+ messages in thread
From: Mattias Rönnblom @ 2023-11-21  9:30 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: Mattias Rönnblom

On 2023-11-20 18:26, Bruce Richardson wrote:
> Document explicitly the scheduling types supported by this driver, both
> via info_get() function, and via table in the documentation.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   doc/guides/eventdevs/features/dsw.ini | 1 +
>   drivers/event/dsw/dsw_evdev.c         | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/doc/guides/eventdevs/features/dsw.ini b/doc/guides/eventdevs/features/dsw.ini
> index c8bc6b3f1d..941d257e3d 100644
> --- a/doc/guides/eventdevs/features/dsw.ini
> +++ b/doc/guides/eventdevs/features/dsw.ini
> @@ -4,6 +4,7 @@
>   ; Refer to default.ini for the full list of available PMD features.
>   ;
>   [Scheduling Features]
> +atomic_scheduling          = Y
>   distributed_sched          = Y
>   burst_mode                 = Y
>   nonseq_mode                = Y
> diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
> index 1209e73a9d..a68ca1fe30 100644
> --- a/drivers/event/dsw/dsw_evdev.c
> +++ b/drivers/event/dsw/dsw_evdev.c
> @@ -220,6 +220,7 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused,
>   		.max_num_events = DSW_MAX_EVENTS,
>   		.max_profiles_per_port = 1,
>   		.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
> +		RTE_EVENT_DEV_CAP_ATOMIC |
>   		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
>   		RTE_EVENT_DEV_CAP_NONSEQ_MODE|
>   		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT|
> --
> 2.39.2
> 

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

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 5/8] event/dsw: add schedule-type capability flags
  2023-11-21  9:30   ` Mattias Rönnblom
@ 2023-11-21  9:32     ` Mattias Rönnblom
  2023-11-21  9:44       ` Bruce Richardson
  0 siblings, 1 reply; 50+ messages in thread
From: Mattias Rönnblom @ 2023-11-21  9:32 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: Mattias Rönnblom

On 2023-11-21 10:30, Mattias Rönnblom wrote:
> On 2023-11-20 18:26, Bruce Richardson wrote:
>> Document explicitly the scheduling types supported by this driver, both
>> via info_get() function, and via table in the documentation.
>>
>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>> ---
>>   doc/guides/eventdevs/features/dsw.ini | 1 +
>>   drivers/event/dsw/dsw_evdev.c         | 1 +
>>   2 files changed, 2 insertions(+)
>>
>> diff --git a/doc/guides/eventdevs/features/dsw.ini 
>> b/doc/guides/eventdevs/features/dsw.ini
>> index c8bc6b3f1d..941d257e3d 100644
>> --- a/doc/guides/eventdevs/features/dsw.ini
>> +++ b/doc/guides/eventdevs/features/dsw.ini
>> @@ -4,6 +4,7 @@
>>   ; Refer to default.ini for the full list of available PMD features.
>>   ;
>>   [Scheduling Features]
>> +atomic_scheduling          = Y
>>   distributed_sched          = Y
>>   burst_mode                 = Y
>>   nonseq_mode                = Y
>> diff --git a/drivers/event/dsw/dsw_evdev.c 
>> b/drivers/event/dsw/dsw_evdev.c
>> index 1209e73a9d..a68ca1fe30 100644
>> --- a/drivers/event/dsw/dsw_evdev.c
>> +++ b/drivers/event/dsw/dsw_evdev.c
>> @@ -220,6 +220,7 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused,
>>           .max_num_events = DSW_MAX_EVENTS,
>>           .max_profiles_per_port = 1,
>>           .event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
>> +        RTE_EVENT_DEV_CAP_ATOMIC |
>>           RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
>>           RTE_EVENT_DEV_CAP_NONSEQ_MODE|
>>           RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT|
>> -- 
>> 2.39.2
>>
> 
> Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

Eh, hold on. PARALLEL is also supported.

Do we need a capability for single link as well?

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 5/8] event/dsw: add schedule-type capability flags
  2023-11-21  9:32     ` Mattias Rönnblom
@ 2023-11-21  9:44       ` Bruce Richardson
  2023-11-21  9:47         ` Bruce Richardson
  0 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21  9:44 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev, Mattias Rönnblom

On Tue, Nov 21, 2023 at 10:32:07AM +0100, Mattias Rönnblom wrote:
> On 2023-11-21 10:30, Mattias Rönnblom wrote:
> > On 2023-11-20 18:26, Bruce Richardson wrote:
> > > Document explicitly the scheduling types supported by this driver, both
> > > via info_get() function, and via table in the documentation.
> > > 
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > >   doc/guides/eventdevs/features/dsw.ini | 1 +
> > >   drivers/event/dsw/dsw_evdev.c         | 1 +
> > >   2 files changed, 2 insertions(+)
> > > 
> > > diff --git a/doc/guides/eventdevs/features/dsw.ini
> > > b/doc/guides/eventdevs/features/dsw.ini
> > > index c8bc6b3f1d..941d257e3d 100644
> > > --- a/doc/guides/eventdevs/features/dsw.ini
> > > +++ b/doc/guides/eventdevs/features/dsw.ini
> > > @@ -4,6 +4,7 @@
> > >   ; Refer to default.ini for the full list of available PMD features.
> > >   ;
> > >   [Scheduling Features]
> > > +atomic_scheduling          = Y
> > >   distributed_sched          = Y
> > >   burst_mode                 = Y
> > >   nonseq_mode                = Y
> > > diff --git a/drivers/event/dsw/dsw_evdev.c
> > > b/drivers/event/dsw/dsw_evdev.c
> > > index 1209e73a9d..a68ca1fe30 100644
> > > --- a/drivers/event/dsw/dsw_evdev.c
> > > +++ b/drivers/event/dsw/dsw_evdev.c
> > > @@ -220,6 +220,7 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused,
> > >           .max_num_events = DSW_MAX_EVENTS,
> > >           .max_profiles_per_port = 1,
> > >           .event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
> > > +        RTE_EVENT_DEV_CAP_ATOMIC |
> > >           RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
> > >           RTE_EVENT_DEV_CAP_NONSEQ_MODE|
> > >           RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT|
> > > -- 
> > > 2.39.2
> > > 
> > 
> > Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> 
> Eh, hold on. PARALLEL is also supported.
> 

Sorry, missed that. Will add in V2.

> Do we need a capability for single link as well?

I was wondering about that myself.  For this v1 I decided against it
because any ordered or atomic queue can be single link by just binding it
to a single port. The actual single link flag is jut a hint allow the
driver to be more efficient about resourcing.
However, if you think it's worthwhile calling out explicitly I can
certainly add it.

/Bruce

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types
  2023-11-21  9:30   ` Mattias Rönnblom
@ 2023-11-21  9:46     ` Bruce Richardson
  2023-11-21 11:12     ` Bruce Richardson
  1 sibling, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21  9:46 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev, Jerin Jacob

On Tue, Nov 21, 2023 at 10:30:02AM +0100, Mattias Rönnblom wrote:
> On 2023-11-20 18:25, Bruce Richardson wrote:
> > 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.
> > 
> 
> Should we allow an event device to advertise
> RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES, but not all of these?
> 
> With current wording of RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES prevents that, but
> you should be able to allow for this without breaking backward compatibility
> by tweaking the text from
> 
> "Event device is capable of enqueuing events of any type to any queue."
> 
> "Event device is capable of enqueuing events of any type advertised as
> supported (e.g., by RTE_EVENT_DEV_CAP_ATOMIC)."
> 
> An event device that doesn't support ordered, but does support "all" types
> seems reasonable to me, while an event device that does support ordered on a
> per-event basis, but doesn't for queue-level configuration does not.
> 
> If RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES is left unchanged, the user may ask
> herself what "any" means (any supported in the API, or any supported by the
> actual event device).
> 

Seems reasonable if we want to re-define this. I'm fine either way and can
add such a change to a v2 patchset if there is consensus on it.

/Bruce


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 5/8] event/dsw: add schedule-type capability flags
  2023-11-21  9:44       ` Bruce Richardson
@ 2023-11-21  9:47         ` Bruce Richardson
  0 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21  9:47 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev, Mattias Rönnblom

On Tue, Nov 21, 2023 at 09:44:37AM +0000, Bruce Richardson wrote:
> On Tue, Nov 21, 2023 at 10:32:07AM +0100, Mattias Rönnblom wrote:
> > On 2023-11-21 10:30, Mattias Rönnblom wrote:
> > > On 2023-11-20 18:26, Bruce Richardson wrote:
> > > > Document explicitly the scheduling types supported by this driver, both
> > > > via info_get() function, and via table in the documentation.
> > > > 
> > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > ---
> > > >   doc/guides/eventdevs/features/dsw.ini | 1 +
> > > >   drivers/event/dsw/dsw_evdev.c         | 1 +
> > > >   2 files changed, 2 insertions(+)
> > > > 
> > > > diff --git a/doc/guides/eventdevs/features/dsw.ini
> > > > b/doc/guides/eventdevs/features/dsw.ini
> > > > index c8bc6b3f1d..941d257e3d 100644
> > > > --- a/doc/guides/eventdevs/features/dsw.ini
> > > > +++ b/doc/guides/eventdevs/features/dsw.ini
> > > > @@ -4,6 +4,7 @@
> > > >   ; Refer to default.ini for the full list of available PMD features.
> > > >   ;
> > > >   [Scheduling Features]
> > > > +atomic_scheduling          = Y
> > > >   distributed_sched          = Y
> > > >   burst_mode                 = Y
> > > >   nonseq_mode                = Y
> > > > diff --git a/drivers/event/dsw/dsw_evdev.c
> > > > b/drivers/event/dsw/dsw_evdev.c
> > > > index 1209e73a9d..a68ca1fe30 100644
> > > > --- a/drivers/event/dsw/dsw_evdev.c
> > > > +++ b/drivers/event/dsw/dsw_evdev.c
> > > > @@ -220,6 +220,7 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused,
> > > >           .max_num_events = DSW_MAX_EVENTS,
> > > >           .max_profiles_per_port = 1,
> > > >           .event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
> > > > +        RTE_EVENT_DEV_CAP_ATOMIC |
> > > >           RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
> > > >           RTE_EVENT_DEV_CAP_NONSEQ_MODE|
> > > >           RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT|
> > > > -- 
> > > > 2.39.2
> > > > 
> > > 
> > > Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> > 
> > Eh, hold on. PARALLEL is also supported.
> > 
> 
> Sorry, missed that. Will add in V2.
> 
> > Do we need a capability for single link as well?
> 
> I was wondering about that myself.  For this v1 I decided against it
> because any ordered or atomic queue can be single link by just binding it
> to a single port. The actual single link flag is jut a hint allow the
> driver to be more efficient about resourcing.
> However, if you think it's worthwhile calling out explicitly I can
> certainly add it.

If we have such a flag, we should look to have eventdev "emulate"
single-link via ordered or atomic queues for drivers that don't directly
support it. I'm concerned that the number of different capability options
makes it difficult to write truly portable apps.

/Bruce

^ permalink raw reply	[flat|nested] 50+ messages in thread

* RE: [PATCH 24.03 4/8] event/dpaa*: add schedule-type capability flags
  2023-11-20 17:26 ` [PATCH 24.03 4/8] event/dpaa*: " Bruce Richardson
@ 2023-11-21 10:51   ` Hemant Agrawal
  0 siblings, 0 replies; 50+ messages in thread
From: Hemant Agrawal @ 2023-11-21 10:51 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: Sachin Saxena, Gagandeep Singh

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Monday, November 20, 2023 10:56 PM
> To: dev@dpdk.org
> Cc: Bruce Richardson <bruce.richardson@intel.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Sachin Saxena <sachin.saxena@nxp.com>
> Subject: [PATCH 24.03 4/8] event/dpaa*: add schedule-type capability flags
> Importance: High
> 
> Document explicitly the scheduling types supported by these drivers, both
> via info_get() function, and via table in the documentation.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  doc/guides/eventdevs/features/dpaa.ini  | 2 ++
> doc/guides/eventdevs/features/dpaa2.ini | 2 ++
>  drivers/event/dpaa/dpaa_eventdev.c      | 2 ++
>  drivers/event/dpaa2/dpaa2_eventdev.c    | 2 ++
>  4 files changed, 8 insertions(+)
> 
> diff --git a/doc/guides/eventdevs/features/dpaa.ini
> b/doc/guides/eventdevs/features/dpaa.ini
> index b73bfa02e5..b2ee6ed93a 100644
> --- a/doc/guides/eventdevs/features/dpaa.ini
> +++ b/doc/guides/eventdevs/features/dpaa.ini
> @@ -4,6 +4,8 @@
>  ; Refer to default.ini for the full list of available PMD features.
>  ;
>  [Scheduling Features]
> +atomic_scheduling          = Y
> +parallel_scheduling        = Y
>  distributed_sched          = Y
>  burst_mode                 = Y
>  nonseq_mode                = Y
> diff --git a/doc/guides/eventdevs/features/dpaa2.ini
> b/doc/guides/eventdevs/features/dpaa2.ini
> index c935bd0cfc..6d3c07ed66 100644
> --- a/doc/guides/eventdevs/features/dpaa2.ini
> +++ b/doc/guides/eventdevs/features/dpaa2.ini
> @@ -4,6 +4,8 @@
>  ; Refer to default.ini for the full list of available PMD features.
>  ;
>  [Scheduling Features]
> +atomic_scheduling          = Y
> +parallel_scheduling        = Y
>  distributed_sched          = Y
>  queue_all_types            = Y
>  burst_mode                 = Y
> diff --git a/drivers/event/dpaa/dpaa_eventdev.c
> b/drivers/event/dpaa/dpaa_eventdev.c
> index 46a9b88c73..57ddb85e52 100644
> --- a/drivers/event/dpaa/dpaa_eventdev.c
> +++ b/drivers/event/dpaa/dpaa_eventdev.c
> @@ -353,6 +353,8 @@ dpaa_event_dev_info_get(struct rte_eventdev *dev,
>  	dev_info->max_num_events =
>  		DPAA_EVENT_MAX_NUM_EVENTS;
>  	dev_info->event_dev_cap =
> +		RTE_EVENT_DEV_CAP_ATOMIC |
> +		RTE_EVENT_DEV_CAP_PARALLEL |
>  		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
>  		RTE_EVENT_DEV_CAP_BURST_MODE |
>  		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | diff --git
> a/drivers/event/dpaa2/dpaa2_eventdev.c
> b/drivers/event/dpaa2/dpaa2_eventdev.c
> index dd4e64395f..dd62c76c86 100644
> --- a/drivers/event/dpaa2/dpaa2_eventdev.c
> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
> @@ -404,6 +404,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
>  		DPAA2_EVENT_MAX_PORT_ENQUEUE_DEPTH;
>  	dev_info->max_num_events = DPAA2_EVENT_MAX_NUM_EVENTS;
>  	dev_info->event_dev_cap =
> RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
> +		RTE_EVENT_DEV_CAP_ATOMIC |
> +		RTE_EVENT_DEV_CAP_PARALLEL |
>  		RTE_EVENT_DEV_CAP_BURST_MODE|
>  		RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
>  		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types
  2023-11-21  9:30   ` Mattias Rönnblom
  2023-11-21  9:46     ` Bruce Richardson
@ 2023-11-21 11:12     ` Bruce Richardson
  2023-11-21 17:08       ` Pathak, Pravin
  1 sibling, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:12 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev, Jerin Jacob

On Tue, Nov 21, 2023 at 10:30:02AM +0100, Mattias Rönnblom wrote:
> On 2023-11-20 18:25, Bruce Richardson wrote:
> > 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.
> > 
> 
> Should we allow an event device to advertise
> RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES, but not all of these?
> 
> With current wording of RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES prevents that, but
> you should be able to allow for this without breaking backward compatibility
> by tweaking the text from
> 
> "Event device is capable of enqueuing events of any type to any queue."
> 
> "Event device is capable of enqueuing events of any type advertised as
> supported (e.g., by RTE_EVENT_DEV_CAP_ATOMIC)."
> 
> An event device that doesn't support ordered, but does support "all" types
> seems reasonable to me, while an event device that does support ordered on a
> per-event basis, but doesn't for queue-level configuration does not.
> 
> If RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES is left unchanged, the user may ask
> herself what "any" means (any supported in the API, or any supported by the
> actual event device).
> 
Two follow-up thoughts on this:

1. The use of this ALL_TYPES flag would suggest to me that we should not have
   SINGLE_LINK as an explicit queue type, in the set of
   ATOMIC/ORDERED/PARALLEL, as it would really confuse the issue as to what
   exactly all-types means. Therefore, I think we should keep single-link
   as an auxiliary hint as now.

2. The CAP_QUEUE_ALL_TYPES seems a rather blunt instrument, and I was
   thinking that we would be better to convert it over to have the
   alternative flag that says that queues only support a single-type.
   However, even then, neither really covers the full gamut of support,
   because in some cases whether or not queues support all types will
   depend upon configuration. For example, for DLB2 driver, the docs point
   out that depending upon config, a queue can support either atomic or
   parallel, or atomic or ordered - with parallel "degrading" to ordered in
   that case. It's possible we could have other PMDs which allow the final
   combination of having a queue either atomic, or ordered and parallel
   combined.
   Not sure we have an easy mechanism to express all this, so probably
   keeping the status quo - possibly with your suggested tweak - is good
   enough for now. We also need to keep things as simple as possible for
   app developers too, and try to avoid too many possible combinations.

/Bruce

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
                   ` (7 preceding siblings ...)
  2023-11-20 17:26 ` [PATCH 24.03 8/8] event/sw: " Bruce Richardson
@ 2023-11-21 11:54 ` Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
                     ` (8 more replies)
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
  9 siblings, 9 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The various eventdev drivers, while fitting under a common API, do not
all support all scheduling types. The eventdev API is missing some way
to query the particular scheduling support for a driver, a key piece of
information for application developers. This patchset adds the necessary
capability flags, and documentation feature rows, then, driver-by-driver
adds the necessary flags to both code and docs.

V2:
* Fix flag values to be unique
* Fix missing PARALLEL flag on DSW
* Add patch adjusting definition of the ALL_TYPES flag

Bruce Richardson (9):
  eventdev: add capability flags for supported sched types
  eventdev: increase flexibility of all-types flag
  event/cnxk: add schedule-type capability flags
  event/dlb2: add schedule-type capability flags
  event/dpaa*: add schedule-type capability flags
  event/dsw: add schedule-type capability flags
  event/octeontx: add schedule-type capability flags
  event/opdl: add schedule-type capability flags
  event/sw: add schedule-type capability flags

 doc/guides/eventdevs/features/cnxk.ini     |  3 ++
 doc/guides/eventdevs/features/default.ini  |  3 ++
 doc/guides/eventdevs/features/dlb2.ini     |  3 ++
 doc/guides/eventdevs/features/dpaa.ini     |  2 ++
 doc/guides/eventdevs/features/dpaa2.ini    |  2 ++
 doc/guides/eventdevs/features/dsw.ini      |  2 ++
 doc/guides/eventdevs/features/octeontx.ini |  3 ++
 doc/guides/eventdevs/features/opdl.ini     |  2 ++
 doc/guides/eventdevs/features/sw.ini       |  3 ++
 drivers/event/cnxk/cnxk_eventdev.c         |  5 ++-
 drivers/event/dlb2/dlb2.c                  |  5 ++-
 drivers/event/dpaa/dpaa_eventdev.c         |  2 ++
 drivers/event/dpaa2/dpaa2_eventdev.c       |  2 ++
 drivers/event/dsw/dsw_evdev.c              |  2 ++
 drivers/event/octeontx/ssovf_evdev.c       |  3 ++
 drivers/event/opdl/opdl_evdev.c            |  3 ++
 drivers/event/sw/sw_evdev.c                |  3 ++
 lib/eventdev/rte_eventdev.h                | 36 ++++++++++++++++++++--
 18 files changed, 79 insertions(+), 5 deletions(-)

--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 1/9] eventdev: add capability flags for supported sched types
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-23  3:59     ` Jerin Jacob
  2023-11-21 11:54   ` [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag Bruce Richardson
                     ` (7 subsequent siblings)
  8 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Jerin Jacob

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>
---
 doc/guides/eventdevs/features/default.ini |  3 +++
 lib/eventdev/rte_eventdev.h               | 21 +++++++++++++++++++++
 2 files changed, 24 insertions(+)

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
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-23  4:07     ` Jerin Jacob
  2023-11-21 11:54   ` [PATCH 24.03 v2 3/9] event/cnxk: add schedule-type capability flags Bruce Richardson
                     ` (6 subsequent siblings)
  8 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Mattias Rönnblom, Jerin Jacob

Rather than requiring that any device advertising the
RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
and parallel scheduling, we can redefine the field so that it basically
means that you don't need to specify the queue scheduling type at config
time. Instead all types of supported events can be sent to all queues.

Suggested-by: Mattias Rönnblom <hofors@lysator.liu.se>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eventdev/rte_eventdev.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index d48957362c..1c5043de26 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -250,11 +250,20 @@ struct rte_event;
  * @see rte_event_dequeue_burst()
  */
 #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
-/**< Event device is capable of enqueuing events of any type to any queue.
+/**< Event device is capable of accepting enqueued events, of any type
+ * advertised as supported by the device, to all destination queues.
+ *
+ * When this capability is set, the "schedule_type" field of the
+ * rte_event_queue_conf structure is ignored when a queue is being configured.
+ *
  * If this capability is not set, the queue only supports events of the
- *  *RTE_SCHED_TYPE_* type that it was created with.
+ *  *RTE_SCHED_TYPE_* type specified in the rte_event_queue_conf structure
+ *  at time of configuration.
  *
- * @see RTE_SCHED_TYPE_* values
+ * @see RTE_SCHED_TYPE_ATOMIC
+ * @see RTE_SCHED_TYPE_ORDERED
+ * @see RTE_SCHED_TYPE_PARALLEL
+ * @see rte_event_queue_conf.schedule_type
  */
 #define RTE_EVENT_DEV_CAP_BURST_MODE          (1ULL << 4)
 /**< Event device is capable of operating in burst mode for enqueue(forward,
--
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 3/9] event/cnxk: add schedule-type capability flags
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 4/9] event/dlb2: " Bruce Richardson
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Pavan Nikhilesh, Shijith Thotton

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/cnxk.ini | 3 +++
 drivers/event/cnxk/cnxk_eventdev.c     | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guides/eventdevs/features/cnxk.ini b/doc/guides/eventdevs/features/cnxk.ini
index 5d353e3670..d1516372fa 100644
--- a/doc/guides/eventdevs/features/cnxk.ini
+++ b/doc/guides/eventdevs/features/cnxk.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 0c61f4c20e..e266ee2789 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -22,7 +22,10 @@ cnxk_sso_info_get(struct cnxk_sso_evdev *dev,
 	dev_info->max_event_port_dequeue_depth = 1;
 	dev_info->max_event_port_enqueue_depth = 1;
 	dev_info->max_num_events = dev->max_num_events;
-	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS |
+	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_ATOMIC |
+				  RTE_EVENT_DEV_CAP_ORDERED |
+				  RTE_EVENT_DEV_CAP_PARALLEL |
+				  RTE_EVENT_DEV_CAP_QUEUE_QOS |
 				  RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 				  RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES |
 				  RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 4/9] event/dlb2: add schedule-type capability flags
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (2 preceding siblings ...)
  2023-11-21 11:54   ` [PATCH 24.03 v2 3/9] event/cnxk: add schedule-type capability flags Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 5/9] event/dpaa*: " Bruce Richardson
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Abdullah Sevincer

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
---
 doc/guides/eventdevs/features/dlb2.ini | 3 +++
 drivers/event/dlb2/dlb2.c              | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guides/eventdevs/features/dlb2.ini b/doc/guides/eventdevs/features/dlb2.ini
index 48a2a18aff..7b80286927 100644
--- a/doc/guides/eventdevs/features/dlb2.ini
+++ b/doc/guides/eventdevs/features/dlb2.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 event_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 050ace0904..770bdcbd2d 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -71,7 +71,10 @@ static struct rte_event_dev_info evdev_dlb2_default_info = {
 	.max_num_events = DLB2_MAX_NUM_LDB_CREDITS,
 	.max_single_link_event_port_queue_pairs =
 		DLB2_MAX_NUM_DIR_PORTS(DLB2_HW_V2),
-	.event_dev_cap = (RTE_EVENT_DEV_CAP_EVENT_QOS |
+	.event_dev_cap = (RTE_EVENT_DEV_CAP_ATOMIC |
+			  RTE_EVENT_DEV_CAP_ORDERED |
+			  RTE_EVENT_DEV_CAP_PARALLEL |
+			  RTE_EVENT_DEV_CAP_EVENT_QOS |
 			  RTE_EVENT_DEV_CAP_NONSEQ_MODE |
 			  RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 			  RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES |
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 5/9] event/dpaa*: add schedule-type capability flags
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (3 preceding siblings ...)
  2023-11-21 11:54   ` [PATCH 24.03 v2 4/9] event/dlb2: " Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 6/9] event/dsw: " Bruce Richardson
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Hemant Agrawal, Sachin Saxena

Document explicitly the scheduling types supported by these drivers,
both via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 doc/guides/eventdevs/features/dpaa.ini  | 2 ++
 doc/guides/eventdevs/features/dpaa2.ini | 2 ++
 drivers/event/dpaa/dpaa_eventdev.c      | 2 ++
 drivers/event/dpaa2/dpaa2_eventdev.c    | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/doc/guides/eventdevs/features/dpaa.ini b/doc/guides/eventdevs/features/dpaa.ini
index b73bfa02e5..b2ee6ed93a 100644
--- a/doc/guides/eventdevs/features/dpaa.ini
+++ b/doc/guides/eventdevs/features/dpaa.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 burst_mode                 = Y
 nonseq_mode                = Y
diff --git a/doc/guides/eventdevs/features/dpaa2.ini b/doc/guides/eventdevs/features/dpaa2.ini
index c935bd0cfc..6d3c07ed66 100644
--- a/doc/guides/eventdevs/features/dpaa2.ini
+++ b/doc/guides/eventdevs/features/dpaa2.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 queue_all_types            = Y
 burst_mode                 = Y
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 46a9b88c73..57ddb85e52 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -353,6 +353,8 @@ dpaa_event_dev_info_get(struct rte_eventdev *dev,
 	dev_info->max_num_events =
 		DPAA_EVENT_MAX_NUM_EVENTS;
 	dev_info->event_dev_cap =
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 		RTE_EVENT_DEV_CAP_BURST_MODE |
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index dd4e64395f..dd62c76c86 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -404,6 +404,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
 		DPAA2_EVENT_MAX_PORT_ENQUEUE_DEPTH;
 	dev_info->max_num_events = DPAA2_EVENT_MAX_NUM_EVENTS;
 	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_BURST_MODE|
 		RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 6/9] event/dsw: add schedule-type capability flags
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (4 preceding siblings ...)
  2023-11-21 11:54   ` [PATCH 24.03 v2 5/9] event/dpaa*: " Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 7/9] event/octeontx: " Bruce Richardson
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Mattias Rönnblom

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/dsw.ini | 2 ++
 drivers/event/dsw/dsw_evdev.c         | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/doc/guides/eventdevs/features/dsw.ini b/doc/guides/eventdevs/features/dsw.ini
index c8bc6b3f1d..4038b9dd3d 100644
--- a/doc/guides/eventdevs/features/dsw.ini
+++ b/doc/guides/eventdevs/features/dsw.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 burst_mode                 = Y
 nonseq_mode                = Y
diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 1209e73a9d..9bf7b46a24 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -220,6 +220,8 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused,
 		.max_num_events = DSW_MAX_EVENTS,
 		.max_profiles_per_port = 1,
 		.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
 		RTE_EVENT_DEV_CAP_NONSEQ_MODE|
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT|
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 7/9] event/octeontx: add schedule-type capability flags
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (5 preceding siblings ...)
  2023-11-21 11:54   ` [PATCH 24.03 v2 6/9] event/dsw: " Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 8/9] event/opdl: " Bruce Richardson
  2023-11-21 11:54   ` [PATCH 24.03 v2 9/9] event/sw: " Bruce Richardson
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Jerin Jacob

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/octeontx.ini | 3 +++
 drivers/event/octeontx/ssovf_evdev.c       | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/guides/eventdevs/features/octeontx.ini b/doc/guides/eventdevs/features/octeontx.ini
index ec044e6289..06efae767a 100644
--- a/doc/guides/eventdevs/features/octeontx.ini
+++ b/doc/guides/eventdevs/features/octeontx.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index a16f24e088..3a933b1db7 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -151,6 +151,9 @@ ssovf_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *dev_info)
 	dev_info->max_event_port_enqueue_depth = 1;
 	dev_info->max_num_events =  edev->max_num_events;
 	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS |
+					RTE_EVENT_DEV_CAP_ATOMIC |
+					RTE_EVENT_DEV_CAP_ORDERED |
+					RTE_EVENT_DEV_CAP_PARALLEL |
 					RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 					RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES|
 					RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 8/9] event/opdl: add schedule-type capability flags
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (6 preceding siblings ...)
  2023-11-21 11:54   ` [PATCH 24.03 v2 7/9] event/octeontx: " Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  2023-11-23  4:10     ` Jerin Jacob
  2023-11-21 11:54   ` [PATCH 24.03 v2 9/9] event/sw: " Bruce Richardson
  8 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Liang Ma, Peter Mccarthy

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---

Maintainers, please check this patch carefully, as I'm not sure the
correct way to document this.

According to the docs for this driver, it supports parallel only via
ordered. Therefore, I've actually made the docs inconsistent from the
flags claimed in the API. I've documented that PARALLEL is supported in
the info_get() flags, so code that checks for that will run, but I've
omitted it from the table in the docs, since it is not directly
supported. Is this a good compromise, or an accurate reflection of the
driver?
---
 doc/guides/eventdevs/features/opdl.ini | 2 ++
 drivers/event/opdl/opdl_evdev.c        | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/doc/guides/eventdevs/features/opdl.ini b/doc/guides/eventdevs/features/opdl.ini
index 5cc35d3c77..7adccc98de 100644
--- a/doc/guides/eventdevs/features/opdl.ini
+++ b/doc/guides/eventdevs/features/opdl.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
 burst_mode                 = Y
 carry_flow_id              = Y
 maintenance_free           = Y
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 0cccaf7e97..b34a5fcacd 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -376,6 +376,9 @@ opdl_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 		.max_event_port_enqueue_depth = MAX_OPDL_CONS_Q_DEPTH,
 		.max_num_events = OPDL_INFLIGHT_EVENTS_TOTAL,
 		.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE |
+				 RTE_EVENT_DEV_CAP_ORDERED |
+				 RTE_EVENT_DEV_CAP_ATOMIC |
+				 RTE_EVENT_DEV_CAP_PARALLEL |
 				 RTE_EVENT_DEV_CAP_CARRY_FLOW_ID |
 				 RTE_EVENT_DEV_CAP_MAINTENANCE_FREE,
 		.max_profiles_per_port = 1,
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 24.03 v2 9/9] event/sw: add schedule-type capability flags
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (7 preceding siblings ...)
  2023-11-21 11:54   ` [PATCH 24.03 v2 8/9] event/opdl: " Bruce Richardson
@ 2023-11-21 11:54   ` Bruce Richardson
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-11-21 11:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Harry van Haaren

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/sw.ini | 3 +++
 drivers/event/sw/sw_evdev.c          | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/guides/eventdevs/features/sw.ini b/doc/guides/eventdevs/features/sw.ini
index 8c89d3b8d2..f4d46d79b8 100644
--- a/doc/guides/eventdevs/features/sw.ini
+++ b/doc/guides/eventdevs/features/sw.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 event_qos                  = Y
 burst_mode                 = Y
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 55e7735cb0..1c01b069fe 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -600,6 +600,9 @@ sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 			.max_event_port_enqueue_depth = MAX_SW_PROD_Q_DEPTH,
 			.max_num_events = SW_INFLIGHT_EVENTS_TOTAL,
 			.event_dev_cap = (
+				RTE_EVENT_DEV_CAP_ATOMIC |
+				RTE_EVENT_DEV_CAP_ORDERED |
+				RTE_EVENT_DEV_CAP_PARALLEL |
 				RTE_EVENT_DEV_CAP_QUEUE_QOS |
 				RTE_EVENT_DEV_CAP_BURST_MODE |
 				RTE_EVENT_DEV_CAP_EVENT_QOS |
-- 
2.39.2


^ permalink raw reply	[flat|nested] 50+ messages in thread

* RE: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types
  2023-11-21 11:12     ` Bruce Richardson
@ 2023-11-21 17:08       ` Pathak, Pravin
  0 siblings, 0 replies; 50+ messages in thread
From: Pathak, Pravin @ 2023-11-21 17:08 UTC (permalink / raw)
  To: Richardson, Bruce, Mattias Rönnblom; +Cc: dev, Jerin Jacob

Ideally, supporting ORing of schedule types during queue creation would have been best. But advertising all such possible combinations will be a nightmare. 
But this will allow flexibility to create an exact combination HW can support. Either support all or a subset of it. 

-----Original Message-----
From: Bruce Richardson <bruce.richardson@intel.com> 
Sent: Tuesday, November 21, 2023 6:13 AM
To: Mattias Rönnblom <hofors@lysator.liu.se>
Cc: dev@dpdk.org; Jerin Jacob <jerinj@marvell.com>
Subject: Re: [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types

On Tue, Nov 21, 2023 at 10:30:02AM +0100, Mattias Rönnblom wrote:
> On 2023-11-20 18:25, Bruce Richardson wrote:
> > 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.
> > 
> 
> Should we allow an event device to advertise 
> RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES, but not all of these?
> 
> With current wording of RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES prevents 
> that, but you should be able to allow for this without breaking 
> backward compatibility by tweaking the text from
> 
> "Event device is capable of enqueuing events of any type to any queue."
> 
> "Event device is capable of enqueuing events of any type advertised as 
> supported (e.g., by RTE_EVENT_DEV_CAP_ATOMIC)."
> 
> An event device that doesn't support ordered, but does support "all" 
> types seems reasonable to me, while an event device that does support 
> ordered on a per-event basis, but doesn't for queue-level configuration does not.
> 
> If RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES is left unchanged, the user may 
> ask herself what "any" means (any supported in the API, or any 
> supported by the actual event device).
> 
Two follow-up thoughts on this:

1. The use of this ALL_TYPES flag would suggest to me that we should not have
   SINGLE_LINK as an explicit queue type, in the set of
   ATOMIC/ORDERED/PARALLEL, as it would really confuse the issue as to what
   exactly all-types means. Therefore, I think we should keep single-link
   as an auxiliary hint as now.

2. The CAP_QUEUE_ALL_TYPES seems a rather blunt instrument, and I was
   thinking that we would be better to convert it over to have the
   alternative flag that says that queues only support a single-type.
   However, even then, neither really covers the full gamut of support,
   because in some cases whether or not queues support all types will
   depend upon configuration. For example, for DLB2 driver, the docs point
   out that depending upon config, a queue can support either atomic or
   parallel, or atomic or ordered - with parallel "degrading" to ordered in
   that case. It's possible we could have other PMDs which allow the final
   combination of having a queue either atomic, or ordered and parallel
   combined.
   Not sure we have an easy mechanism to express all this, so probably
   keeping the status quo - possibly with your suggested tweak - is good
   enough for now. We also need to keep things as simple as possible for
   app developers too, and try to avoid too many possible combinations.

/Bruce

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 v2 1/9] eventdev: add capability flags for supported sched types
  2023-11-21 11:54   ` [PATCH 24.03 v2 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
@ 2023-11-23  3:59     ` Jerin Jacob
  0 siblings, 0 replies; 50+ messages in thread
From: Jerin Jacob @ 2023-11-23  3:59 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Jerin Jacob

On Tue, Nov 21, 2023 at 5:25 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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>

Sharing the finer details of device capability to application  is always good .


Acked-by: Jerin Jacob <jerinj@marvell.com>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag
  2023-11-21 11:54   ` [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag Bruce Richardson
@ 2023-11-23  4:07     ` Jerin Jacob
  2023-12-12 11:28       ` Bruce Richardson
  0 siblings, 1 reply; 50+ messages in thread
From: Jerin Jacob @ 2023-11-23  4:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Mattias Rönnblom, Jerin Jacob

On Tue, Nov 21, 2023 at 5:25 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Rather than requiring that any device advertising the
> RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
> and parallel scheduling, we can redefine the field so that it basically
> means that you don't need to specify the queue scheduling type at config
> time. Instead all types of supported events can be sent to all queues.
>
> Suggested-by: Mattias Rönnblom <hofors@lysator.liu.se>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  lib/eventdev/rte_eventdev.h | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> index d48957362c..1c5043de26 100644
> --- a/lib/eventdev/rte_eventdev.h
> +++ b/lib/eventdev/rte_eventdev.h
> @@ -250,11 +250,20 @@ struct rte_event;
>   * @see rte_event_dequeue_burst()
>   */
>  #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
> -/**< Event device is capable of enqueuing events of any type to any queue.
> +/**< Event device is capable of accepting enqueued events, of any type
> + * advertised as supported by the device, to all destination queues.
> + *
> + * When this capability is set, the "schedule_type" field of the
> + * rte_event_queue_conf structure is ignored when a queue is being configured.

can we also add something like below or so to above line

rte_event_queue_conf structure is ignored when a queue is being
configured instead rte_event::sched_type
shall be used.

Also, git commit subject "eventdev: increase flexibility of all-types
flag", This patch is just documentation clarification. Right? It was
like this from day 1.
I would suggest the subject as "eventdev: clarify all-types flag
documentation" or so.

With above changes,

Acked-by: Jerin Jacob <jerinj@marvell.com>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 v2 8/9] event/opdl: add schedule-type capability flags
  2023-11-21 11:54   ` [PATCH 24.03 v2 8/9] event/opdl: " Bruce Richardson
@ 2023-11-23  4:10     ` Jerin Jacob
  2023-11-23  9:19       ` Bruce Richardson
  0 siblings, 1 reply; 50+ messages in thread
From: Jerin Jacob @ 2023-11-23  4:10 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Liang Ma, Peter Mccarthy

On Tue, Nov 21, 2023 at 11:47 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Document explicitly the scheduling types supported by this driver, both
> via info_get() function, and via table in the documentation.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>
> Maintainers, please check this patch carefully, as I'm not sure the
> correct way to document this.
>
> According to the docs for this driver, it supports parallel only via
> ordered. Therefore, I've actually made the docs inconsistent from the
> flags claimed in the API. I've documented that PARALLEL is supported in
> the info_get() flags, so code that checks for that will run, but I've
> omitted it from the table in the docs, since it is not directly
> supported. Is this a good compromise, or an accurate reflection of the
> driver?
> ---
>  doc/guides/eventdevs/features/opdl.ini | 2 ++
>  drivers/event/opdl/opdl_evdev.c        | 3 +++
>  2 files changed, 5 insertions(+)
>
> diff --git a/doc/guides/eventdevs/features/opdl.ini b/doc/guides/eventdevs/features/opdl.ini
> index 5cc35d3c77..7adccc98de 100644
> --- a/doc/guides/eventdevs/features/opdl.ini
> +++ b/doc/guides/eventdevs/features/opdl.ini
> @@ -4,6 +4,8 @@
>  ; Refer to default.ini for the full list of available PMD features.
>  ;
>  [Scheduling Features]
> +atomic_scheduling          = Y
> +ordered_scheduling         = Y

Missed parallel

>  burst_mode                 = Y
>  carry_flow_id              = Y
>  maintenance_free           = Y
> diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
> index 0cccaf7e97..b34a5fcacd 100644
> --- a/drivers/event/opdl/opdl_evdev.c
> +++ b/drivers/event/opdl/opdl_evdev.c
> @@ -376,6 +376,9 @@ opdl_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
>                 .max_event_port_enqueue_depth = MAX_OPDL_CONS_Q_DEPTH,
>                 .max_num_events = OPDL_INFLIGHT_EVENTS_TOTAL,
>                 .event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE |
> +                                RTE_EVENT_DEV_CAP_ORDERED |
> +                                RTE_EVENT_DEV_CAP_ATOMIC |
> +                                RTE_EVENT_DEV_CAP_PARALLEL |
>                                  RTE_EVENT_DEV_CAP_CARRY_FLOW_ID |
>                                  RTE_EVENT_DEV_CAP_MAINTENANCE_FREE,
>                 .max_profiles_per_port = 1,
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 v2 8/9] event/opdl: add schedule-type capability flags
  2023-11-23  4:10     ` Jerin Jacob
@ 2023-11-23  9:19       ` Bruce Richardson
  2023-11-23  9:38         ` Jerin Jacob
  0 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-11-23  9:19 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Liang Ma, Peter Mccarthy

On Thu, Nov 23, 2023 at 09:40:57AM +0530, Jerin Jacob wrote:
> On Tue, Nov 21, 2023 at 11:47 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Document explicitly the scheduling types supported by this driver, both
> > via info_get() function, and via table in the documentation.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >
> > Maintainers, please check this patch carefully, as I'm not sure the
> > correct way to document this.
> >
> > According to the docs for this driver, it supports parallel only via
> > ordered. Therefore, I've actually made the docs inconsistent from the
> > flags claimed in the API. I've documented that PARALLEL is supported in
> > the info_get() flags, so code that checks for that will run, but I've
> > omitted it from the table in the docs, since it is not directly
> > supported. Is this a good compromise, or an accurate reflection of the
> > driver?
> > ---
> >  doc/guides/eventdevs/features/opdl.ini | 2 ++
> >  drivers/event/opdl/opdl_evdev.c        | 3 +++
> >  2 files changed, 5 insertions(+)
> >
> > diff --git a/doc/guides/eventdevs/features/opdl.ini b/doc/guides/eventdevs/features/opdl.ini
> > index 5cc35d3c77..7adccc98de 100644
> > --- a/doc/guides/eventdevs/features/opdl.ini
> > +++ b/doc/guides/eventdevs/features/opdl.ini
> > @@ -4,6 +4,8 @@
> >  ; Refer to default.ini for the full list of available PMD features.
> >  ;
> >  [Scheduling Features]
> > +atomic_scheduling          = Y
> > +ordered_scheduling         = Y
> 
> Missed parallel
> 

Deliberate omission for now. See note above. Basically, parallel is
supported through ordered, so I added the flag below to stop apps from
breaking, but I wasn't sure about advertising it in the docs. Will add it
if you feel its best to keep them consistent.

/Bruce

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 v2 8/9] event/opdl: add schedule-type capability flags
  2023-11-23  9:19       ` Bruce Richardson
@ 2023-11-23  9:38         ` Jerin Jacob
  0 siblings, 0 replies; 50+ messages in thread
From: Jerin Jacob @ 2023-11-23  9:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Liang Ma, Peter Mccarthy

On Thu, Nov 23, 2023 at 2:52 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Nov 23, 2023 at 09:40:57AM +0530, Jerin Jacob wrote:
> > On Tue, Nov 21, 2023 at 11:47 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > Document explicitly the scheduling types supported by this driver, both
> > > via info_get() function, and via table in the documentation.
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > >
> > > Maintainers, please check this patch carefully, as I'm not sure the
> > > correct way to document this.
> > >
> > > According to the docs for this driver, it supports parallel only via
> > > ordered. Therefore, I've actually made the docs inconsistent from the
> > > flags claimed in the API. I've documented that PARALLEL is supported in
> > > the info_get() flags, so code that checks for that will run, but I've
> > > omitted it from the table in the docs, since it is not directly
> > > supported. Is this a good compromise, or an accurate reflection of the
> > > driver?
> > > ---
> > >  doc/guides/eventdevs/features/opdl.ini | 2 ++
> > >  drivers/event/opdl/opdl_evdev.c        | 3 +++
> > >  2 files changed, 5 insertions(+)
> > >
> > > diff --git a/doc/guides/eventdevs/features/opdl.ini b/doc/guides/eventdevs/features/opdl.ini
> > > index 5cc35d3c77..7adccc98de 100644
> > > --- a/doc/guides/eventdevs/features/opdl.ini
> > > +++ b/doc/guides/eventdevs/features/opdl.ini
> > > @@ -4,6 +4,8 @@
> > >  ; Refer to default.ini for the full list of available PMD features.
> > >  ;
> > >  [Scheduling Features]
> > > +atomic_scheduling          = Y
> > > +ordered_scheduling         = Y
> >
> > Missed parallel
> >
>
> Deliberate omission for now. See note above. Basically, parallel is

I see. I missed the note.

> supported through ordered, so I added the flag below to stop apps from
> breaking, but I wasn't sure about advertising it in the docs. Will add it
> if you feel its best to keep them consistent.

I think, it is better to keep them consistent.

>
> /Bruce

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag
  2023-11-23  4:07     ` Jerin Jacob
@ 2023-12-12 11:28       ` Bruce Richardson
  2023-12-12 12:47         ` Jerin Jacob
  0 siblings, 1 reply; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:28 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Mattias Rönnblom, Jerin Jacob

On Thu, Nov 23, 2023 at 09:37:58AM +0530, Jerin Jacob wrote:
> On Tue, Nov 21, 2023 at 5:25 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Rather than requiring that any device advertising the
> > RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
> > and parallel scheduling, we can redefine the field so that it basically
> > means that you don't need to specify the queue scheduling type at config
> > time. Instead all types of supported events can be sent to all queues.
> >
> > Suggested-by: Mattias Rönnblom <hofors@lysator.liu.se>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  lib/eventdev/rte_eventdev.h | 15 ++++++++++++---
> >  1 file changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> > index d48957362c..1c5043de26 100644
> > --- a/lib/eventdev/rte_eventdev.h
> > +++ b/lib/eventdev/rte_eventdev.h
> > @@ -250,11 +250,20 @@ struct rte_event;
> >   * @see rte_event_dequeue_burst()
> >   */
> >  #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
> > -/**< Event device is capable of enqueuing events of any type to any queue.
> > +/**< Event device is capable of accepting enqueued events, of any type
> > + * advertised as supported by the device, to all destination queues.
> > + *
> > + * When this capability is set, the "schedule_type" field of the
> > + * rte_event_queue_conf structure is ignored when a queue is being configured.
> 
> can we also add something like below or so to above line
> 
> rte_event_queue_conf structure is ignored when a queue is being
> configured instead rte_event::sched_type
> shall be used.
> 
Preparing v3 now and including this doc change. However, I'm also wondering
about the correct behaviour when this flag is not set. When the flag is not
set, the events enqueued should match the event type of the queue, but do
we need to enforce this, or should we?

Couple of options:
1. Actually enforce this, and state that it is an error to enqueue events
   with another scheduling type.
2. Explicitly not enforce this, and just state instead that the sched_type
   of events will be ignored.

Personally, I'd tend very much towards #2. because:
* it's easier for the app, as they can ignore the sched_type field through
  the pipeline if they want, relying on each queues type to do the right
  thing. This could be especially useful if they have fallback mechanisms
  to e.g. configure a queue as atomic if reordered is not supported etc.
  The downside is that for portable applications the sched type
  should always be set anyway, but the app doesn't lose anything in this
  case with #2 over #1.

* It's easier and more performant for the drivers, since it's one less
  check that should be performed on enqueue. The driver can just blindly
  override the sched_type provided with the queue config version.

I actually think an extension of #2 would also be nice to have for
portability, whereby an app could explicitly configure a queue to only have
a scheduling type - event if it's all-types-capable - and thereafter never
have to set the sched_type field on events. The drivers would always
remember the queue-type and explicitly set that if necessary on enqueue

Thoughts?
/Bruce

PS: Going to send v3 now anyway, based on feedback thus far. If we get
quick consensus on above, I can roll it into a v4, otherwise we can look to
clarify that situation in a separate patch later.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 0/9] document scheduling types for eventdev drivers
  2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
                   ` (8 preceding siblings ...)
  2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
@ 2023-12-12 11:32 ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
                     ` (8 more replies)
  9 siblings, 9 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson

The various eventdev drivers, while fitting under a common API, do not
all support all scheduling types. The eventdev API is missing some way
to query the particular scheduling support for a driver, a key piece of
information for application developers. This patchset adds the necessary
capability flags, and documentation feature rows, then, driver-by-driver
adds the necessary flags to both code and docs.

V3:
* Fix missing PARALLEL flag on OPDL
* Clarify further doc text on ALL_TYPES flag

V2:
* Fix flag values to be unique
* Fix missing PARALLEL flag on DSW
* Add patch adjusting definition of the ALL_TYPES flag

Bruce Richardson (9):
  eventdev: add capability flags for supported sched types
  eventdev: clarify all-types flag documentation
  event/cnxk: add schedule-type capability flags
  event/dlb2: add schedule-type capability flags
  event/dpaa*: add schedule-type capability flags
  event/dsw: add schedule-type capability flags
  event/octeontx: add schedule-type capability flags
  event/opdl: add schedule-type capability flags
  event/sw: add schedule-type capability flags

 doc/guides/eventdevs/features/cnxk.ini     |  3 ++
 doc/guides/eventdevs/features/default.ini  |  3 ++
 doc/guides/eventdevs/features/dlb2.ini     |  3 ++
 doc/guides/eventdevs/features/dpaa.ini     |  2 ++
 doc/guides/eventdevs/features/dpaa2.ini    |  2 ++
 doc/guides/eventdevs/features/dsw.ini      |  2 ++
 doc/guides/eventdevs/features/octeontx.ini |  3 ++
 doc/guides/eventdevs/features/opdl.ini     |  3 ++
 doc/guides/eventdevs/features/sw.ini       |  3 ++
 drivers/event/cnxk/cnxk_eventdev.c         |  5 ++-
 drivers/event/dlb2/dlb2.c                  |  5 ++-
 drivers/event/dpaa/dpaa_eventdev.c         |  2 ++
 drivers/event/dpaa2/dpaa2_eventdev.c       |  2 ++
 drivers/event/dsw/dsw_evdev.c              |  2 ++
 drivers/event/octeontx/ssovf_evdev.c       |  3 ++
 drivers/event/opdl/opdl_evdev.c            |  3 ++
 drivers/event/sw/sw_evdev.c                |  3 ++
 lib/eventdev/rte_eventdev.h                | 38 ++++++++++++++++++++--
 18 files changed, 82 insertions(+), 5 deletions(-)

--
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 1/9] eventdev: add capability flags for supported sched types
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 2/9] eventdev: clarify all-types flag documentation Bruce Richardson
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson

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(+)

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
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 2/9] eventdev: clarify all-types flag documentation
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-13 12:50     ` Jerin Jacob
  2023-12-13 13:20     ` Mattias Rönnblom
  2023-12-12 11:32   ` [PATCH v3 3/9] event/cnxk: add schedule-type capability flags Bruce Richardson
                     ` (6 subsequent siblings)
  8 siblings, 2 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson, Mattias Rönnblom

Rather than requiring that any device advertising the
RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
and parallel scheduling, we can redefine the field so that it basically
means that you don't need to specify the queue scheduling type at config
time. Instead all types of supported events can be sent to all queues.

Suggested-by: Mattias Rönnblom <hofors@lysator.liu.se>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/eventdev/rte_eventdev.h | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index d48957362c..35865f017f 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -250,11 +250,22 @@ struct rte_event;
  * @see rte_event_dequeue_burst()
  */
 #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
-/**< Event device is capable of enqueuing events of any type to any queue.
+/**< Event device is capable of accepting enqueued events, of any type
+ * advertised as supported by the device, to all destination queues.
+ *
+ * When this capability is set, the "schedule_type" field of the
+ * rte_event_queue_conf structure is ignored when a queue is being configured.
+ * Instead the the "sched_type" field of each event enqueued is used to
+ * select the scheduling to be performed on that event.
+ *
  * If this capability is not set, the queue only supports events of the
- *  *RTE_SCHED_TYPE_* type that it was created with.
+ *  *RTE_SCHED_TYPE_* type specified in the rte_event_queue_conf structure
+ *  at time of configuration.
  *
- * @see RTE_SCHED_TYPE_* values
+ * @see RTE_SCHED_TYPE_ATOMIC
+ * @see RTE_SCHED_TYPE_ORDERED
+ * @see RTE_SCHED_TYPE_PARALLEL
+ * @see rte_event_queue_conf.schedule_type
  */
 #define RTE_EVENT_DEV_CAP_BURST_MODE          (1ULL << 4)
 /**< Event device is capable of operating in burst mode for enqueue(forward,
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 3/9] event/cnxk: add schedule-type capability flags
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 2/9] eventdev: clarify all-types flag documentation Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 4/9] event/dlb2: " Bruce Richardson
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson, Pavan Nikhilesh, Shijith Thotton

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/cnxk.ini | 3 +++
 drivers/event/cnxk/cnxk_eventdev.c     | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guides/eventdevs/features/cnxk.ini b/doc/guides/eventdevs/features/cnxk.ini
index 5d353e3670..d1516372fa 100644
--- a/doc/guides/eventdevs/features/cnxk.ini
+++ b/doc/guides/eventdevs/features/cnxk.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 0c61f4c20e..e266ee2789 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -22,7 +22,10 @@ cnxk_sso_info_get(struct cnxk_sso_evdev *dev,
 	dev_info->max_event_port_dequeue_depth = 1;
 	dev_info->max_event_port_enqueue_depth = 1;
 	dev_info->max_num_events = dev->max_num_events;
-	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS |
+	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_ATOMIC |
+				  RTE_EVENT_DEV_CAP_ORDERED |
+				  RTE_EVENT_DEV_CAP_PARALLEL |
+				  RTE_EVENT_DEV_CAP_QUEUE_QOS |
 				  RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 				  RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES |
 				  RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 4/9] event/dlb2: add schedule-type capability flags
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (2 preceding siblings ...)
  2023-12-12 11:32   ` [PATCH v3 3/9] event/cnxk: add schedule-type capability flags Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 5/9] event/dpaa*: " Bruce Richardson
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson, Abdullah Sevincer

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
---
 doc/guides/eventdevs/features/dlb2.ini | 3 +++
 drivers/event/dlb2/dlb2.c              | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guides/eventdevs/features/dlb2.ini b/doc/guides/eventdevs/features/dlb2.ini
index 48a2a18aff..7b80286927 100644
--- a/doc/guides/eventdevs/features/dlb2.ini
+++ b/doc/guides/eventdevs/features/dlb2.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 event_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 050ace0904..770bdcbd2d 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -71,7 +71,10 @@ static struct rte_event_dev_info evdev_dlb2_default_info = {
 	.max_num_events = DLB2_MAX_NUM_LDB_CREDITS,
 	.max_single_link_event_port_queue_pairs =
 		DLB2_MAX_NUM_DIR_PORTS(DLB2_HW_V2),
-	.event_dev_cap = (RTE_EVENT_DEV_CAP_EVENT_QOS |
+	.event_dev_cap = (RTE_EVENT_DEV_CAP_ATOMIC |
+			  RTE_EVENT_DEV_CAP_ORDERED |
+			  RTE_EVENT_DEV_CAP_PARALLEL |
+			  RTE_EVENT_DEV_CAP_EVENT_QOS |
 			  RTE_EVENT_DEV_CAP_NONSEQ_MODE |
 			  RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 			  RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES |
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 5/9] event/dpaa*: add schedule-type capability flags
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (3 preceding siblings ...)
  2023-12-12 11:32   ` [PATCH v3 4/9] event/dlb2: " Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 6/9] event/dsw: " Bruce Richardson
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson, Hemant Agrawal, Sachin Saxena

Document explicitly the scheduling types supported by these drivers,
both via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 doc/guides/eventdevs/features/dpaa.ini  | 2 ++
 doc/guides/eventdevs/features/dpaa2.ini | 2 ++
 drivers/event/dpaa/dpaa_eventdev.c      | 2 ++
 drivers/event/dpaa2/dpaa2_eventdev.c    | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/doc/guides/eventdevs/features/dpaa.ini b/doc/guides/eventdevs/features/dpaa.ini
index b73bfa02e5..b2ee6ed93a 100644
--- a/doc/guides/eventdevs/features/dpaa.ini
+++ b/doc/guides/eventdevs/features/dpaa.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 burst_mode                 = Y
 nonseq_mode                = Y
diff --git a/doc/guides/eventdevs/features/dpaa2.ini b/doc/guides/eventdevs/features/dpaa2.ini
index c935bd0cfc..6d3c07ed66 100644
--- a/doc/guides/eventdevs/features/dpaa2.ini
+++ b/doc/guides/eventdevs/features/dpaa2.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 queue_all_types            = Y
 burst_mode                 = Y
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 46a9b88c73..57ddb85e52 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -353,6 +353,8 @@ dpaa_event_dev_info_get(struct rte_eventdev *dev,
 	dev_info->max_num_events =
 		DPAA_EVENT_MAX_NUM_EVENTS;
 	dev_info->event_dev_cap =
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 		RTE_EVENT_DEV_CAP_BURST_MODE |
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index dd4e64395f..dd62c76c86 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -404,6 +404,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
 		DPAA2_EVENT_MAX_PORT_ENQUEUE_DEPTH;
 	dev_info->max_num_events = DPAA2_EVENT_MAX_NUM_EVENTS;
 	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_BURST_MODE|
 		RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 6/9] event/dsw: add schedule-type capability flags
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (4 preceding siblings ...)
  2023-12-12 11:32   ` [PATCH v3 5/9] event/dpaa*: " Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 7/9] event/octeontx: " Bruce Richardson
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson, Mattias Rönnblom

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/dsw.ini | 2 ++
 drivers/event/dsw/dsw_evdev.c         | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/doc/guides/eventdevs/features/dsw.ini b/doc/guides/eventdevs/features/dsw.ini
index c8bc6b3f1d..4038b9dd3d 100644
--- a/doc/guides/eventdevs/features/dsw.ini
+++ b/doc/guides/eventdevs/features/dsw.ini
@@ -4,6 +4,8 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+parallel_scheduling        = Y
 distributed_sched          = Y
 burst_mode                 = Y
 nonseq_mode                = Y
diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 1209e73a9d..9bf7b46a24 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -220,6 +220,8 @@ dsw_info_get(struct rte_eventdev *dev __rte_unused,
 		.max_num_events = DSW_MAX_EVENTS,
 		.max_profiles_per_port = 1,
 		.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
+		RTE_EVENT_DEV_CAP_ATOMIC |
+		RTE_EVENT_DEV_CAP_PARALLEL |
 		RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
 		RTE_EVENT_DEV_CAP_NONSEQ_MODE|
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT|
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 7/9] event/octeontx: add schedule-type capability flags
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (5 preceding siblings ...)
  2023-12-12 11:32   ` [PATCH v3 6/9] event/dsw: " Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 8/9] event/opdl: " Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 9/9] event/sw: " Bruce Richardson
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/octeontx.ini | 3 +++
 drivers/event/octeontx/ssovf_evdev.c       | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/guides/eventdevs/features/octeontx.ini b/doc/guides/eventdevs/features/octeontx.ini
index ec044e6289..06efae767a 100644
--- a/doc/guides/eventdevs/features/octeontx.ini
+++ b/doc/guides/eventdevs/features/octeontx.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 distributed_sched          = Y
 queue_all_types            = Y
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index a16f24e088..3a933b1db7 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -151,6 +151,9 @@ ssovf_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *dev_info)
 	dev_info->max_event_port_enqueue_depth = 1;
 	dev_info->max_num_events =  edev->max_num_events;
 	dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS |
+					RTE_EVENT_DEV_CAP_ATOMIC |
+					RTE_EVENT_DEV_CAP_ORDERED |
+					RTE_EVENT_DEV_CAP_PARALLEL |
 					RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
 					RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES|
 					RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 8/9] event/opdl: add schedule-type capability flags
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (6 preceding siblings ...)
  2023-12-12 11:32   ` [PATCH v3 7/9] event/octeontx: " Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  2023-12-12 11:32   ` [PATCH v3 9/9] event/sw: " Bruce Richardson
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson, Liang Ma, Peter Mccarthy

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/opdl.ini | 3 +++
 drivers/event/opdl/opdl_evdev.c        | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/guides/eventdevs/features/opdl.ini b/doc/guides/eventdevs/features/opdl.ini
index 5cc35d3c77..1a97fd54a6 100644
--- a/doc/guides/eventdevs/features/opdl.ini
+++ b/doc/guides/eventdevs/features/opdl.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 burst_mode                 = Y
 carry_flow_id              = Y
 maintenance_free           = Y
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 0cccaf7e97..b34a5fcacd 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -376,6 +376,9 @@ opdl_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 		.max_event_port_enqueue_depth = MAX_OPDL_CONS_Q_DEPTH,
 		.max_num_events = OPDL_INFLIGHT_EVENTS_TOTAL,
 		.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE |
+				 RTE_EVENT_DEV_CAP_ORDERED |
+				 RTE_EVENT_DEV_CAP_ATOMIC |
+				 RTE_EVENT_DEV_CAP_PARALLEL |
 				 RTE_EVENT_DEV_CAP_CARRY_FLOW_ID |
 				 RTE_EVENT_DEV_CAP_MAINTENANCE_FREE,
 		.max_profiles_per_port = 1,
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH v3 9/9] event/sw: add schedule-type capability flags
  2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
                     ` (7 preceding siblings ...)
  2023-12-12 11:32   ` [PATCH v3 8/9] event/opdl: " Bruce Richardson
@ 2023-12-12 11:32   ` Bruce Richardson
  8 siblings, 0 replies; 50+ messages in thread
From: Bruce Richardson @ 2023-12-12 11:32 UTC (permalink / raw)
  To: dev; +Cc: jerinj, Bruce Richardson, Harry van Haaren

Document explicitly the scheduling types supported by this driver, both
via info_get() function, and via table in the documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/eventdevs/features/sw.ini | 3 +++
 drivers/event/sw/sw_evdev.c          | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/guides/eventdevs/features/sw.ini b/doc/guides/eventdevs/features/sw.ini
index 8c89d3b8d2..f4d46d79b8 100644
--- a/doc/guides/eventdevs/features/sw.ini
+++ b/doc/guides/eventdevs/features/sw.ini
@@ -4,6 +4,9 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Scheduling Features]
+atomic_scheduling          = Y
+ordered_scheduling         = Y
+parallel_scheduling        = Y
 queue_qos                  = Y
 event_qos                  = Y
 burst_mode                 = Y
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 55e7735cb0..1c01b069fe 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -600,6 +600,9 @@ sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 			.max_event_port_enqueue_depth = MAX_SW_PROD_Q_DEPTH,
 			.max_num_events = SW_INFLIGHT_EVENTS_TOTAL,
 			.event_dev_cap = (
+				RTE_EVENT_DEV_CAP_ATOMIC |
+				RTE_EVENT_DEV_CAP_ORDERED |
+				RTE_EVENT_DEV_CAP_PARALLEL |
 				RTE_EVENT_DEV_CAP_QUEUE_QOS |
 				RTE_EVENT_DEV_CAP_BURST_MODE |
 				RTE_EVENT_DEV_CAP_EVENT_QOS |
-- 
2.40.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag
  2023-12-12 11:28       ` Bruce Richardson
@ 2023-12-12 12:47         ` Jerin Jacob
  0 siblings, 0 replies; 50+ messages in thread
From: Jerin Jacob @ 2023-12-12 12:47 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Mattias Rönnblom, Jerin Jacob

On Tue, Dec 12, 2023 at 4:58 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Nov 23, 2023 at 09:37:58AM +0530, Jerin Jacob wrote:
> > On Tue, Nov 21, 2023 at 5:25 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > Rather than requiring that any device advertising the
> > > RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
> > > and parallel scheduling, we can redefine the field so that it basically
> > > means that you don't need to specify the queue scheduling type at config
> > > time. Instead all types of supported events can be sent to all queues.
> > >
> > > Suggested-by: Mattias Rönnblom <hofors@lysator.liu.se>
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > >  lib/eventdev/rte_eventdev.h | 15 ++++++++++++---
> > >  1 file changed, 12 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> > > index d48957362c..1c5043de26 100644
> > > --- a/lib/eventdev/rte_eventdev.h
> > > +++ b/lib/eventdev/rte_eventdev.h
> > > @@ -250,11 +250,20 @@ struct rte_event;
> > >   * @see rte_event_dequeue_burst()
> > >   */
> > >  #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
> > > -/**< Event device is capable of enqueuing events of any type to any queue.
> > > +/**< Event device is capable of accepting enqueued events, of any type
> > > + * advertised as supported by the device, to all destination queues.
> > > + *
> > > + * When this capability is set, the "schedule_type" field of the
> > > + * rte_event_queue_conf structure is ignored when a queue is being configured.
> >
> > can we also add something like below or so to above line
> >
> > rte_event_queue_conf structure is ignored when a queue is being
> > configured instead rte_event::sched_type
> > shall be used.
> >
> Preparing v3 now and including this doc change. However, I'm also wondering
> about the correct behaviour when this flag is not set. When the flag is not
> set, the events enqueued should match the event type of the queue, but do
> we need to enforce this, or should we?
>
> Couple of options:
> 1. Actually enforce this, and state that it is an error to enqueue events
>    with another scheduling type.
> 2. Explicitly not enforce this, and just state instead that the sched_type
>    of events will be ignored.
>
> Personally, I'd tend very much towards #2. because:
> * it's easier for the app, as they can ignore the sched_type field through
>   the pipeline if they want, relying on each queues type to do the right
>   thing. This could be especially useful if they have fallback mechanisms
>   to e.g. configure a queue as atomic if reordered is not supported etc.
>   The downside is that for portable applications the sched type
>   should always be set anyway, but the app doesn't lose anything in this
>   case with #2 over #1.
>
> * It's easier and more performant for the drivers, since it's one less
>   check that should be performed on enqueue. The driver can just blindly
>   override the sched_type provided with the queue config version.
>
> I actually think an extension of #2 would also be nice to have for
> portability, whereby an app could explicitly configure a queue to only have
> a scheduling type - event if it's all-types-capable - and thereafter never
> have to set the sched_type field on events. The drivers would always
> remember the queue-type and explicitly set that if necessary on enqueue
>
> Thoughts?


HW queues with All-type support will be costly resources, so making a
portable program
we need to spare 3 queues instead of 1 queue.

Considering the difference in eventdev capabilities, I see the most
reliable option is
end user focus on reusable packet processing stages. Have worker skeleton based
on HW device capabilities, as there are enough HW differences across
event devices.
That is the kind of theme followed in testeventdev.


> /Bruce
>
> PS: Going to send v3 now anyway, based on feedback thus far. If we get
> quick consensus on above, I can roll it into a v4, otherwise we can look to

Let's go with v3 now. Later we can discuss more on this latter.

> clarify that situation in a separate patch later.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v3 2/9] eventdev: clarify all-types flag documentation
  2023-12-12 11:32   ` [PATCH v3 2/9] eventdev: clarify all-types flag documentation Bruce Richardson
@ 2023-12-13 12:50     ` Jerin Jacob
  2023-12-13 13:20     ` Mattias Rönnblom
  1 sibling, 0 replies; 50+ messages in thread
From: Jerin Jacob @ 2023-12-13 12:50 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, jerinj, Mattias Rönnblom

On Tue, Dec 12, 2023 at 6:58 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Rather than requiring that any device advertising the
> RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
> and parallel scheduling, we can redefine the field so that it basically
> means that you don't need to specify the queue scheduling type at config
> time. Instead all types of supported events can be sent to all queues.
>
> Suggested-by: Mattias Rönnblom <hofors@lysator.liu.se>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Jerin Jacob <jerinj@marvell.com>

Series applied to dpdk-next-net-eventdev/for-main with following fixes. Thanks


[for-main]dell[dpdk-next-eventdev] $ ./devtools/checkpatches.sh -n 9
&& ./devtools/check-git-log.sh -n 9

### [PATCH] eventdev: clarify all-types flag documentation

WARNING:REPEATED_WORD: Possible repeated word: 'the'
#33: FILE: lib/eventdev/rte_eventdev.h:258:
+ * Instead the the "sched_type" field of each event enqueued is used to

total: 0 errors, 1 warnings, 25 lines checked


Contributor name/email mismatch with .mailmap:
        Mattias Rönnblom <hofors@lysator.liu.se> is not the primary
email address

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH v3 2/9] eventdev: clarify all-types flag documentation
  2023-12-12 11:32   ` [PATCH v3 2/9] eventdev: clarify all-types flag documentation Bruce Richardson
  2023-12-13 12:50     ` Jerin Jacob
@ 2023-12-13 13:20     ` Mattias Rönnblom
  1 sibling, 0 replies; 50+ messages in thread
From: Mattias Rönnblom @ 2023-12-13 13:20 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: jerinj

On 2023-12-12 12:32, Bruce Richardson wrote:
> Rather than requiring that any device advertising the
> RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
> and parallel scheduling, we can redefine the field so that it basically
> means that you don't need to specify the queue scheduling type at config
> time. Instead all types of supported events can be sent to all queues.
> 
> Suggested-by: Mattias Rönnblom <hofors@lysator.liu.se>

Please use <mattias.ronnblom@ericsson.com>.

> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
>   lib/eventdev/rte_eventdev.h | 17 ++++++++++++++---
>   1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> index d48957362c..35865f017f 100644
> --- a/lib/eventdev/rte_eventdev.h
> +++ b/lib/eventdev/rte_eventdev.h
> @@ -250,11 +250,22 @@ struct rte_event;
>    * @see rte_event_dequeue_burst()
>    */
>   #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
> -/**< Event device is capable of enqueuing events of any type to any queue.
> +/**< Event device is capable of accepting enqueued events, of any type
> + * advertised as supported by the device, to all destination queues.
> + *
> + * When this capability is set, the "schedule_type" field of the
> + * rte_event_queue_conf structure is ignored when a queue is being configured.
> + * Instead the the "sched_type" field of each event enqueued is used to

"The the" -> "the".

> + * select the scheduling to be performed on that event.
> + *
>    * If this capability is not set, the queue only supports events of the
> - *  *RTE_SCHED_TYPE_* type that it was created with.
> + *  *RTE_SCHED_TYPE_* type specified in the rte_event_queue_conf structure
> + *  at time of configuration.
>    *
> - * @see RTE_SCHED_TYPE_* values
> + * @see RTE_SCHED_TYPE_ATOMIC
> + * @see RTE_SCHED_TYPE_ORDERED
> + * @see RTE_SCHED_TYPE_PARALLEL
> + * @see rte_event_queue_conf.schedule_type
>    */
>   #define RTE_EVENT_DEV_CAP_BURST_MODE          (1ULL << 4)
>   /**< Event device is capable of operating in burst mode for enqueue(forward,

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2023-12-13 13:20 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 17:25 [PATCH 24.03 0/8] document scheduling types for eventdev drivers Bruce Richardson
2023-11-20 17:25 ` [PATCH 24.03 1/8] eventdev: add capability flags for supported sched types Bruce Richardson
2023-11-20 17:48   ` Jerin Jacob
2023-11-20 17:52     ` Bruce Richardson
2023-11-21  9:30   ` Mattias Rönnblom
2023-11-21  9:46     ` Bruce Richardson
2023-11-21 11:12     ` Bruce Richardson
2023-11-21 17:08       ` Pathak, Pravin
2023-11-20 17:26 ` [PATCH 24.03 2/8] event/cnxk: add schedule-type capability flags Bruce Richardson
2023-11-20 17:26 ` [PATCH 24.03 3/8] event/dlb2: " Bruce Richardson
2023-11-20 22:45   ` Sevincer, Abdullah
2023-11-20 17:26 ` [PATCH 24.03 4/8] event/dpaa*: " Bruce Richardson
2023-11-21 10:51   ` Hemant Agrawal
2023-11-20 17:26 ` [PATCH 24.03 5/8] event/dsw: " Bruce Richardson
2023-11-21  9:30   ` Mattias Rönnblom
2023-11-21  9:32     ` Mattias Rönnblom
2023-11-21  9:44       ` Bruce Richardson
2023-11-21  9:47         ` Bruce Richardson
2023-11-20 17:26 ` [PATCH 24.03 6/8] event/octeontx: " Bruce Richardson
2023-11-20 17:26 ` [PATCH 24.03 7/8] event/opdl: " Bruce Richardson
2023-11-20 17:26 ` [PATCH 24.03 8/8] event/sw: " Bruce Richardson
2023-11-21 11:54 ` [PATCH 24.03 v2 0/9] document scheduling types for eventdev drivers Bruce Richardson
2023-11-21 11:54   ` [PATCH 24.03 v2 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
2023-11-23  3:59     ` Jerin Jacob
2023-11-21 11:54   ` [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag Bruce Richardson
2023-11-23  4:07     ` Jerin Jacob
2023-12-12 11:28       ` Bruce Richardson
2023-12-12 12:47         ` Jerin Jacob
2023-11-21 11:54   ` [PATCH 24.03 v2 3/9] event/cnxk: add schedule-type capability flags Bruce Richardson
2023-11-21 11:54   ` [PATCH 24.03 v2 4/9] event/dlb2: " Bruce Richardson
2023-11-21 11:54   ` [PATCH 24.03 v2 5/9] event/dpaa*: " Bruce Richardson
2023-11-21 11:54   ` [PATCH 24.03 v2 6/9] event/dsw: " Bruce Richardson
2023-11-21 11:54   ` [PATCH 24.03 v2 7/9] event/octeontx: " Bruce Richardson
2023-11-21 11:54   ` [PATCH 24.03 v2 8/9] event/opdl: " Bruce Richardson
2023-11-23  4:10     ` Jerin Jacob
2023-11-23  9:19       ` Bruce Richardson
2023-11-23  9:38         ` Jerin Jacob
2023-11-21 11:54   ` [PATCH 24.03 v2 9/9] event/sw: " Bruce Richardson
2023-12-12 11:32 ` [PATCH v3 0/9] document scheduling types for eventdev drivers Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 1/9] eventdev: add capability flags for supported sched types Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 2/9] eventdev: clarify all-types flag documentation Bruce Richardson
2023-12-13 12:50     ` Jerin Jacob
2023-12-13 13:20     ` Mattias Rönnblom
2023-12-12 11:32   ` [PATCH v3 3/9] event/cnxk: add schedule-type capability flags Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 4/9] event/dlb2: " Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 5/9] event/dpaa*: " Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 6/9] event/dsw: " Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 7/9] event/octeontx: " Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 8/9] event/opdl: " Bruce Richardson
2023-12-12 11:32   ` [PATCH v3 9/9] event/sw: " Bruce Richardson

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).