From: Jerin Jacob <jerinjacobk@gmail.com>
To: Shijith Thotton <sthotton@marvell.com>
Cc: erik.g.carrillo@intel.com, jerinj@marvell.com, dev@dpdk.org,
pbhagavatula@marvell.com
Subject: Re: [PATCH v1] eventdev/timer: use loop to check for timeout events
Date: Mon, 20 Mar 2023 22:24:40 +0530 [thread overview]
Message-ID: <CALBAE1MM0kKEacNUeY-66QvMUps22AWNMkM1tLxDJ_tjYYQ_0g@mail.gmail.com> (raw)
In-Reply-To: <d7f77765b09c5333df105c317344e983a2f1ad45.1678867113.git.sthotton@marvell.com>
On Wed, Mar 15, 2023 at 1:31 PM Shijith Thotton <sthotton@marvell.com> wrote:
>
> Replaced sleep with a function to dequeue timer expiry events until
> either the expected number of events have been dequeued or the specified
> time has elapsed. This change closely esembles the behavior of the
> tested systems.
>
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
> -#define MAX_TRIES num_evtims
> - int sum = 0;
> - int tries = 0;
> - bool done = false;
> - while (!done) {
> - sum += rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs,
> - RTE_DIM(evs), 10);
> - if (sum >= num_evtims || ++tries >= MAX_TRIES)
> - done = true;
> -
> - rte_delay_ms(10);
Please change git comments as Fix and add Fixes: tag as it it removing
non deterministic sleep based approach for verification.
> - }
> -
> - TEST_ASSERT_EQUAL(sum, num_evtims, "Expected %d timer expiry events, "
> - "got %d", num_evtims, sum);
> -
> - TEST_ASSERT(tries < MAX_TRIES, "Exceeded max tries");
> -
> - rte_delay_ms(100);
> + n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
> + TEST_ASSERT_EQUAL(n, num_evtims, "Expected %d timer expiry events, got %d",
> + num_evtims, n);
next prev parent reply other threads:[~2023-03-20 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 8:00 Shijith Thotton
2023-03-20 16:54 ` Jerin Jacob [this message]
2023-03-21 5:20 ` [PATCH v2] eventdev/timer: fix timeout event wait behavior Shijith Thotton
2023-04-04 10:52 ` Jerin Jacob
2023-04-12 20:00 ` Carrillo, Erik G
2023-04-21 5:50 ` Jerin Jacob
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=CALBAE1MM0kKEacNUeY-66QvMUps22AWNMkM1tLxDJ_tjYYQ_0g@mail.gmail.com \
--to=jerinjacobk@gmail.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).