mbox series

[0/6] Extend and set event queue attributes at runtime

Message ID cover.1648549553.git.sthotton@marvell.com (mailing list archive)
Headers show
Series Extend and set event queue attributes at runtime | expand

Message

Shijith Thotton March 29, 2022, 1:10 p.m. UTC
This series adds support for setting event queue attributes at runtime
and adds two new event queue attributes weight and affinity. Eventdev
capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
capability to set attributes at runtime and rte_event_queue_attr_set()
API is used to set the attributes.

Attributes weight and affinity are not yet added to rte_event_queue_conf
structure to avoid ABI break and will be added in 22.11. Till then, PMDs
using the new attributes are expected to manage them.

Test application changes and example implementation are added as last
three patches.

Pavan Nikhilesh (1):
  common/cnxk: use lock when accessing mbox of SSO

Shijith Thotton (5):
  eventdev: support to set queue attributes at runtime
  eventdev: add weight and affinity to queue attributes
  doc: announce change in event queue conf structure
  test/event: test cases to test runtime queue attribute
  event/cnxk: support to set runtime queue attributes

 app/test/test_eventdev.c                  | 146 ++++++++++++++++++
 doc/guides/eventdevs/features/cnxk.ini    |   1 +
 doc/guides/eventdevs/features/default.ini |   1 +
 doc/guides/rel_notes/deprecation.rst      |   3 +
 drivers/common/cnxk/roc_sso.c             | 174 ++++++++++++++++------
 drivers/common/cnxk/roc_sso_priv.h        |   1 +
 drivers/common/cnxk/roc_tim.c             | 134 +++++++++++------
 drivers/event/cnxk/cn10k_eventdev.c       |   4 +
 drivers/event/cnxk/cn9k_eventdev.c        |   4 +
 drivers/event/cnxk/cnxk_eventdev.c        |  81 +++++++++-
 drivers/event/cnxk/cnxk_eventdev.h        |  16 ++
 lib/eventdev/eventdev_pmd.h               |  44 ++++++
 lib/eventdev/rte_eventdev.c               |  43 ++++++
 lib/eventdev/rte_eventdev.h               |  75 +++++++++-
 lib/eventdev/version.map                  |   3 +
 15 files changed, 627 insertions(+), 103 deletions(-)

Comments

Jerin Jacob March 29, 2022, 6:49 p.m. UTC | #1
On Tue, Mar 29, 2022 at 6:42 PM Shijith Thotton <sthotton@marvell.com> wrote:
>
> This series adds support for setting event queue attributes at runtime
> and adds two new event queue attributes weight and affinity. Eventdev
> capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
> capability to set attributes at runtime and rte_event_queue_attr_set()
> API is used to set the attributes.
>
> Attributes weight and affinity are not yet added to rte_event_queue_conf
> structure to avoid ABI break and will be added in 22.11. Till then, PMDs
> using the new attributes are expected to manage them.
>
> Test application changes and example implementation are added as last
> three patches.


+ @Van Haaren, Harry  @Jayatheerthan, Jay  @Erik Gabriel Carrillo
@Gujjar, Abhinandan S  @McDaniel, Timothy  @Hemant Agrawal  @Nipun
Gupta  @Mattias Rönnblom  @lingma @Ray Kinsella

> Pavan Nikhilesh (1):
>   common/cnxk: use lock when accessing mbox of SSO
>
> Shijith Thotton (5):
>   eventdev: support to set queue attributes at runtime
>   eventdev: add weight and affinity to queue attributes
>   doc: announce change in event queue conf structure
>   test/event: test cases to test runtime queue attribute
>   event/cnxk: support to set runtime queue attributes
>
>  app/test/test_eventdev.c                  | 146 ++++++++++++++++++
>  doc/guides/eventdevs/features/cnxk.ini    |   1 +
>  doc/guides/eventdevs/features/default.ini |   1 +
>  doc/guides/rel_notes/deprecation.rst      |   3 +
>  drivers/common/cnxk/roc_sso.c             | 174 ++++++++++++++++------
>  drivers/common/cnxk/roc_sso_priv.h        |   1 +
>  drivers/common/cnxk/roc_tim.c             | 134 +++++++++++------
>  drivers/event/cnxk/cn10k_eventdev.c       |   4 +
>  drivers/event/cnxk/cn9k_eventdev.c        |   4 +
>  drivers/event/cnxk/cnxk_eventdev.c        |  81 +++++++++-
>  drivers/event/cnxk/cnxk_eventdev.h        |  16 ++
>  lib/eventdev/eventdev_pmd.h               |  44 ++++++
>  lib/eventdev/rte_eventdev.c               |  43 ++++++
>  lib/eventdev/rte_eventdev.h               |  75 +++++++++-
>  lib/eventdev/version.map                  |   3 +
>  15 files changed, 627 insertions(+), 103 deletions(-)
>
> --
> 2.25.1
>
Van Haaren, Harry March 30, 2022, 10:52 a.m. UTC | #2
> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Tuesday, March 29, 2022 7:50 PM
> To: Shijith Thotton <sthotton@marvell.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Carrillo, Erik G <erik.g.carrillo@intel.com>;
> Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; McDaniel, Timothy
> <timothy.mcdaniel@intel.com>; Hemant Agrawal <hemant.agrawal@nxp.com>;
> Nipun Gupta <nipun.gupta@nxp.com>; mattias.ronnblom
> <mattias.ronnblom@ericsson.com>; Ray Kinsella <mdr@ashroe.eu>
> Cc: dpdk-dev <dev@dpdk.org>; Jerin Jacob <jerinj@marvell.com>; Pavan
> Nikhilesh <pbhagavatula@marvell.com>; Liang Ma <liangma@liangbit.com>
> Subject: Re: [PATCH 0/6] Extend and set event queue attributes at runtime
> 
> On Tue, Mar 29, 2022 at 6:42 PM Shijith Thotton <sthotton@marvell.com> wrote:
> >
> > This series adds support for setting event queue attributes at runtime
> > and adds two new event queue attributes weight and affinity. Eventdev
> > capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose
> the
> > capability to set attributes at runtime and rte_event_queue_attr_set()
> > API is used to set the attributes.
> >
> > Attributes weight and affinity are not yet added to rte_event_queue_conf
> > structure to avoid ABI break and will be added in 22.11. Till then, PMDs
> > using the new attributes are expected to manage them.

When the new attributes are added to queue_conf structure in 22.11, will the attr_get() function have any real use?

If the attr_get() function is not useful post 22.11 (aka, returns const-integers?), we should consider if waiting
for ABI-break in 22.11 is a better solution as it doesn't add public API/ABI functions that only have limited time value..?

<snip>
 
> + @Van Haaren, Harry  @Jayatheerthan, Jay  @Erik Gabriel Carrillo
> @Gujjar, Abhinandan S  @McDaniel, Timothy  @Hemant Agrawal  @Nipun
> Gupta  @Mattias Rönnblom  @lingma @Ray Kinsella

Thanks for flagging Jerin, indeed I hadn't looked at this patchset yet.

From event/sw point of view, the new runtime queue attribute capability is not
available, so the feature flag will not be set.

<snip>

Some code comments inline on the impl patches comping up. Regards, -Harry
Shijith Thotton April 4, 2022, 7:57 a.m. UTC | #3
>> >
>> > This series adds support for setting event queue attributes at runtime
>> > and adds two new event queue attributes weight and affinity. Eventdev
>> > capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose
>> the
>> > capability to set attributes at runtime and rte_event_queue_attr_set()
>> > API is used to set the attributes.
>> >
>> > Attributes weight and affinity are not yet added to rte_event_queue_conf
>> > structure to avoid ABI break and will be added in 22.11. Till then, PMDs
>> > using the new attributes are expected to manage them.
>
>When the new attributes are added to queue_conf structure in 22.11, will the
>attr_get() function have any real use?
>
>If the attr_get() function is not useful post 22.11 (aka, returns const-integers?), we
>should consider if waiting
>for ABI-break in 22.11 is a better solution as it doesn't add public API/ABI functions
>that only have limited time value..?
>

queue_attr_get is an internal op and is not called if the op is not set by the
PMD. So no changes are needed from other PMDs to incorporate this. It is useful
to the PMDs needing the new attributes before they are added to
rte_event_queue_conf struct in 22.11.

><snip>
>
>> + @Van Haaren, Harry  @Jayatheerthan, Jay  @Erik Gabriel Carrillo
>> @Gujjar, Abhinandan S  @McDaniel, Timothy  @Hemant Agrawal  @Nipun
>> Gupta  @Mattias Rönnblom  @lingma @Ray Kinsella
>
>Thanks for flagging Jerin, indeed I hadn't looked at this patchset yet.
>
>From event/sw point of view, the new runtime queue attribute capability is not
>available, so the feature flag will not be set.
>
><snip>
>
>Some code comments inline on the impl patches comping up. Regards, -Harry