From: "Carrillo, Erik G" <erik.g.carrillo@intel.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>,
"Jerin Jacob Kollanukkaran" <jerinj@marvell.com>
Cc: "hofors@lysator.liu.se" <hofors@lysator.liu.se>,
"Naga Harish K, S V" <s.v.naga.harish.k@intel.com>,
"Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>,
Shijith Thotton <sthotton@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [EXT] [PATCH v2] eventdev/timer: add API to get remaining ticks
Date: Mon, 19 Dec 2022 21:15:55 +0000 [thread overview]
Message-ID: <IA1PR11MB64186732EF6E2A8DDC9CB4A0B9E59@IA1PR11MB6418.namprd11.prod.outlook.com> (raw)
In-Reply-To: <PH0PR18MB408616C6658290489FEFDC1ADEE59@PH0PR18MB4086.namprd18.prod.outlook.com>
<... snipped ...>
> > diff --git a/app/test/test_event_timer_adapter.c
> > b/app/test/test_event_timer_adapter.c
> > index 1a440dfd10..1a1fb48b24 100644
> > --- a/app/test/test_event_timer_adapter.c
> > +++ b/app/test/test_event_timer_adapter.c
> > @@ -1920,6 +1920,72 @@ adapter_create_max(void)
> > return TEST_SUCCESS;
> > }
> >
> > +static inline int
> > +test_timer_ticks_remaining(void)
> > +{
> > + uint64_t ticks_remaining = UINT64_MAX;
> > + struct rte_event_timer *ev_tim;
> > + struct rte_event ev;
> > + int ret, i;
> > + const struct rte_event_timer tim = {
> > + .ev.op = RTE_EVENT_OP_NEW,
> > + .ev.queue_id = 0,
> > + .ev.sched_type = RTE_SCHED_TYPE_ATOMIC,
> > + .ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
> > + .ev.event_type = RTE_EVENT_TYPE_TIMER,
> > + .state = RTE_EVENT_TIMER_NOT_ARMED,
> > + };
> > +
> > + rte_mempool_get(eventdev_test_mempool, (void **)&ev_tim);
> > + *ev_tim = tim;
> > + ev_tim->ev.event_ptr = ev_tim;
> > +#define TEST_TICKS 5
> > + ev_tim->timeout_ticks = CALC_TICKS(TEST_TICKS);
> > +
> > + /* Test that unarmed timer returns error */
> > + TEST_ASSERT_FAIL(rte_event_timer_get_remaining_ticks(timdev,
> > ev_tim,
> > + &ticks_remaining),
> > + "Didn't fail to get ticks for unarmed event timer");
>
> Please handle ENOSUP case.
>
Good catch - updated in v3.
Thanks,
Erik
<... snipped ...>
prev parent reply other threads:[~2022-12-19 21:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 19:59 Erik Gabriel Carrillo
2022-12-19 20:23 ` [EXT] " Pavan Nikhilesh Bhagavatula
2022-12-19 21:15 ` Carrillo, Erik G [this message]
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=IA1PR11MB64186732EF6E2A8DDC9CB4A0B9E59@IA1PR11MB6418.namprd11.prod.outlook.com \
--to=erik.g.carrillo@intel.com \
--cc=dev@dpdk.org \
--cc=hofors@lysator.liu.se \
--cc=jay.jayatheerthan@intel.com \
--cc=jerinj@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=s.v.naga.harish.k@intel.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).