DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Naga Harish K, S V" <s.v.naga.harish.k@intel.com>
To: "Carrillo, Erik G" <erik.g.carrillo@intel.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>
Cc: "pbhagavatula@marvell.com" <pbhagavatula@marvell.com>,
	"sthotton@marvell.com" <sthotton@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v2 1/4] eventdev/timer: add periodic event timer support
Date: Thu, 11 Aug 2022 15:43:55 +0000	[thread overview]
Message-ID: <DM6PR11MB38681164A0C570740C0123F7A1649@DM6PR11MB3868.namprd11.prod.outlook.com> (raw)
In-Reply-To: <IA1PR11MB641837D3902BA1B69FEB87ADB9659@IA1PR11MB6418.namprd11.prod.outlook.com>

Hi Gabe,

> -----Original Message-----
> From: Carrillo, Erik G <erik.g.carrillo@intel.com>
> Sent: Thursday, August 11, 2022 1:25 AM
> To: Naga Harish K, S V <s.v.naga.harish.k@intel.com>; jerinj@marvell.com
> Cc: pbhagavatula@marvell.com; sthotton@marvell.com; dev@dpdk.org
> Subject: RE: [PATCH v2 1/4] eventdev/timer: add periodic event timer
> support
> 
> Hi Harish,
> 
> > -----Original Message-----
> > From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> > Sent: Wednesday, August 10, 2022 2:07 AM
> > To: Carrillo, Erik G <erik.g.carrillo@intel.com>; jerinj@marvell.com
> > Cc: pbhagavatula@marvell.com; sthotton@marvell.com; dev@dpdk.org
> > Subject: [PATCH v2 1/4] eventdev/timer: add periodic event timer
> > support
> >
> > This patch adds support to configure and use periodic event timers in
> > software timer adapter.
> >
> > The structure ``rte_event_timer_adapter_stats`` is extended by adding
> > a new field, ``evtim_drop_count``. This stat represents the number of
> > times an event_timer expiry event is dropped by the event timer adapter.
> >
> > Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> > ---
> >  lib/eventdev/rte_event_timer_adapter.c | 86 ++++++++++++++++++-----
> --
> > -  lib/eventdev/rte_event_timer_adapter.h |  2 +
> >  lib/eventdev/rte_eventdev.c            |  6 +-
> >  3 files changed, 67 insertions(+), 27 deletions(-)
> >
> > diff --git a/lib/eventdev/rte_event_timer_adapter.c
> > b/lib/eventdev/rte_event_timer_adapter.c
> > index e0d978d641..0de88dfc0f 100644
> > --- a/lib/eventdev/rte_event_timer_adapter.c
> > +++ b/lib/eventdev/rte_event_timer_adapter.c
> > @@ -53,6 +53,14 @@ static const struct event_timer_adapter_ops
> > swtim_ops;  #define EVTIM_SVC_LOG_DBG(...) (void)0  #endif
> >
> > +static inline enum rte_timer_type
> > +get_event_timer_type(const struct rte_event_timer_adapter *adapter) {
> 
> Let's call this function "get_timer_type" since it is selecting a type for an
> rte_timer.
> 
Taken in v3 version of the patch

> > +	return (adapter->data->conf.flags &
> > +			RTE_EVENT_TIMER_ADAPTER_F_PERIODIC) ?
> > +			PERIODICAL : SINGLE;
> > +}
> > +
> >  static int
> >  default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t
> > *event_port_id,
> >  		     void *conf_arg)
> > @@ -195,10 +203,11 @@ rte_event_timer_adapter_create_ext(
> >  	adapter->data->conf = *conf;  /* copy conf structure */
> >
> >  	/* Query eventdev PMD for timer adapter capabilities and ops */
> > -	ret = dev->dev_ops->timer_adapter_caps_get(dev,
> > +	ret = dev->dev_ops->timer_adapter_caps_get ?
> > +				dev->dev_ops-
> > >timer_adapter_caps_get(dev,
> >  						   adapter->data->conf.flags,
> >  						   &adapter->data->caps,
> > -						   &adapter->ops);
> > +						   &adapter->ops) : 0;
> >  	if (ret < 0) {
> >  		rte_errno = -ret;
> >  		goto free_memzone;
> 
> IMO, this hunk would read better as:
> 
>         if (dev->dev_ops->timer_adapter_caps_get) {
>                 ret = dev->dev_ops->timer_adapter_caps_get(dev,
>                                 adapter->data->conf.flags, &adapter->data->caps,
>                                 &adapter->ops);
>                 if (ret < 0) {
>                         rte_errno = -ret;
>                         goto free_memzone;
>                 }
>         }
> 

Taken in v3 version of the patch

> > @@ -348,10 +357,11 @@ rte_event_timer_adapter_lookup(uint16_t
> > adapter_id)
> >  	dev = &rte_eventdevs[adapter->data->event_dev_id];
> >
> >  	/* Query eventdev PMD for timer adapter capabilities and ops */
> > -	ret = dev->dev_ops->timer_adapter_caps_get(dev,
> > +	ret = dev->dev_ops->timer_adapter_caps_get ?
> > +			dev->dev_ops->timer_adapter_caps_get(dev,
> >  						   adapter->data->conf.flags,
> >  						   &adapter->data->caps,
> > -						   &adapter->ops);
> > +						   &adapter->ops) : 0;
> >  	if (ret < 0) {
> >  		rte_errno = EINVAL;
> >  		return NULL;
> 
> Same comment as above for this hunk...
> 
> Thanks,
> Erik

  reply	other threads:[~2022-08-11 15:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 16:25 [PATCH " Naga Harish K S V
2022-08-03 16:25 ` [PATCH 4/4] test/event: update periodic event timer tests Naga Harish K S V
2022-08-10  7:07 ` [PATCH v2 1/4] eventdev/timer: add periodic event timer support Naga Harish K S V
2022-08-10  7:07   ` [PATCH v2 4/4] test/event: update periodic event timer tests Naga Harish K S V
2022-08-10 19:55   ` [PATCH v2 1/4] eventdev/timer: add periodic event timer support Carrillo, Erik G
2022-08-11 15:43     ` Naga Harish K, S V [this message]
2022-08-11 15:36   ` [PATCH v3 " Naga Harish K S V
2022-08-11 15:36     ` [PATCH v3 4/4] test/event: update periodic event timer tests Naga Harish K S V
2022-08-11 19:22     ` [PATCH v3 1/4] eventdev/timer: add periodic event timer support Carrillo, Erik G
2022-08-12 16:10       ` Naga Harish K, S V
2022-08-12 16:07     ` [PATCH v4 " Naga Harish K S V
2022-08-12 16:07       ` [PATCH v4 4/4] test/event: update periodic event timer tests Naga Harish K S V
2022-08-18 13:13         ` Carrillo, Erik G
2022-08-18 13:06       ` [PATCH v4 1/4] eventdev/timer: add periodic event timer support Carrillo, Erik G
2022-09-14  5:08       ` [PATCH v5 " Naga Harish K S V
2022-09-14  5:08         ` [PATCH v5 2/4] timer: fix function to stop all timers Naga Harish K S V
2022-09-14  5:08         ` [PATCH v5 3/4] test/event: update periodic event timer tests Naga Harish K S V
2022-09-14  5:08         ` [PATCH v5 4/4] doc: remove deprication notice Naga Harish K S V
2022-09-14  5:15       ` [PATCH v5 1/4] eventdev/timer: add periodic event timer support Naga Harish K S V
2022-09-14  5:15         ` [PATCH v5 2/4] timer: fix function to stop all timers Naga Harish K S V
2022-09-14  5:15         ` [PATCH v5 3/4] test/event: update periodic event timer tests Naga Harish K S V
2022-09-14  5:15         ` [PATCH v5 4/4] doc: remove deprecation notice Naga Harish K S V
2022-09-14 12:41           ` Jerin Jacob
2022-09-14 13:54             ` Naga Harish K, S V
2022-09-14 13:51         ` [PATCH v6 1/3] eventdev/timer: add periodic event timer support Naga Harish K S V
2022-09-14 13:51           ` [PATCH v6 2/3] timer: fix function to stop all timers Naga Harish K S V
2022-09-14 13:51           ` [PATCH v6 3/3] test/event: update periodic event timer tests Naga Harish K S V
2022-09-14 15:24           ` [PATCH v6 1/3] eventdev/timer: add periodic event timer support Jerin Jacob
2022-09-14 16:43             ` Naga Harish K, S V
2022-09-14 15:33           ` [PATCH v7 " Naga Harish K S V
2022-09-14 15:33             ` [PATCH v7 2/3] timer: fix function to stop all timers Naga Harish K S V
2022-09-15  6:41               ` Jerin Jacob
2022-09-16  4:40                 ` Naga Harish K, S V
2022-10-05 12:59                   ` Thomas Monjalon
2022-09-26  5:21                 ` Naga Harish K, S V
2022-09-14 15:33             ` [PATCH v7 3/3] test/event: update periodic event timer tests Naga Harish K S V
2022-09-15  6:43               ` Jerin Jacob
2022-09-15  6:40             ` [PATCH v7 1/3] eventdev/timer: add periodic event timer support Jerin Jacob
2022-08-10  7:01 [PATCH v2 1/4] " Naga Harish K S V
2022-09-13 12:07 ` Jerin Jacob
2022-09-14  5:16   ` Naga Harish K, S V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB38681164A0C570740C0123F7A1649@DM6PR11MB3868.namprd11.prod.outlook.com \
    --to=s.v.naga.harish.k@intel.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=sthotton@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).