[24.03,v2,8/9] event/opdl: add schedule-type capability flags

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

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Nov. 21, 2023, 11:54 a.m. UTC
  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(+)
  

Comments

Jerin Jacob Nov. 23, 2023, 4:10 a.m. UTC | #1
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
>
  
Bruce Richardson Nov. 23, 2023, 9:19 a.m. UTC | #2
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
  
Jerin Jacob Nov. 23, 2023, 9:38 a.m. UTC | #3
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
  

Patch

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,