From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: <dev@dpdk.org>, Harry van Haaren <harry.van.haaren@intel.com>
Cc: hofors@lysator.liu.se, david.marchand@redhat.com,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: [PATCH] service: reintroduce test dummy service delay
Date: Wed, 2 Oct 2024 21:31:15 +0200 [thread overview]
Message-ID: <20241002193115.796610-1-mattias.ronnblom@ericsson.com> (raw)
Eliminate unreachable code and have dummy service function perform a
short delay again, mimicking previous service core test behavior.
Fixes: a37e053b2364 ("service: extend service function call statistics")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
app/test/test_service_cores.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
index 7ae6bbb179..46ed9a1868 100644
--- a/app/test/test_service_cores.c
+++ b/app/test/test_service_cores.c
@@ -49,21 +49,27 @@ testsuite_teardown(void)
static int32_t dummy_cb(void *args)
{
RTE_SET_USED(args);
+ int32_t rc;
service_calls++;
switch (rte_rand_max(3)) {
case 0:
- return 0;
+ rc = 0;
+ break;
case 1:
service_idle_calls++;
- return -EAGAIN;
+ rc = -EAGAIN;
+ break;
default:
service_error_calls++;
- return -ENOENT;
+ rc = -ENOENT;
+ break;
}
rte_delay_ms(SERVICE_DELAY);
+
+ return rc;
}
static int32_t dummy_mt_unsafe_cb(void *args)
--
2.43.0
next reply other threads:[~2024-10-02 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 19:31 Mattias Rönnblom [this message]
2024-10-03 6:42 ` David Marchand
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=20241002193115.796610-1-mattias.ronnblom@ericsson.com \
--to=mattias.ronnblom@ericsson.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=hofors@lysator.liu.se \
/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).