From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: Jay Jayatheerthan <jay.jayatheerthan@intel.com>,
Erik Gabriel Carrillo <erik.g.carrillo@intel.com>,
Abhinandan Gujjar <abhinandan.gujjar@intel.com>,
Jerin Jacob <jerinj@marvell.com>
Cc: dev@dpdk.org, "Harry van Haaren" <harry.van.haaren@intel.com>,
hofors@lysator.liu.se,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: [PATCH 4/4] eventdev: have timer adapter appropriately report idle
Date: Mon, 10 Oct 2022 16:54:06 +0200 [thread overview]
Message-ID: <20221010145406.118880-5-mattias.ronnblom@ericsson.com> (raw)
In-Reply-To: <20221010145406.118880-1-mattias.ronnblom@ericsson.com>
Update the Event Timer Adapter's service function to report as idle
(i.e., return -EAGAIN) in case no timer events were enqueued to the
event device.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
lib/eventdev/rte_event_timer_adapter.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index 1731770b5e..a0f14bf861 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -785,6 +785,7 @@ swtim_service_func(void *arg)
struct swtim *sw = swtim_pmd_priv(adapter);
uint16_t nb_evs_flushed = 0;
uint16_t nb_evs_invalid = 0;
+ const uint64_t prior_enq_count = sw->stats.ev_enq_count;
if (swtim_did_tick(sw)) {
rte_timer_alt_manage(sw->timer_data_id,
@@ -811,7 +812,7 @@ swtim_service_func(void *arg)
rte_event_maintain(adapter->data->event_dev_id,
adapter->data->event_port_id, 0);
- return 0;
+ return prior_enq_count == sw->stats.ev_enq_count ? -EAGAIN : 0;
}
/* The adapter initialization function rounds the mempool size up to the next
--
2.34.1
next prev parent reply other threads:[~2022-10-10 14:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 14:54 [PATCH 0/4] Have event adapters report idle status Mattias Rönnblom
2022-10-10 14:54 ` [PATCH 1/4] eventdev: have crypto adapter appropriately report idle Mattias Rönnblom
2022-10-17 5:47 ` Gujjar, Abhinandan S
2022-10-10 14:54 ` [PATCH 2/4] eventdev: have ethernet Rx " Mattias Rönnblom
2022-10-11 7:10 ` Jayatheerthan, Jay
2022-10-13 1:32 ` Naga Harish K, S V
2022-10-13 9:53 ` Mattias Rönnblom
2022-10-14 17:36 ` Jerin Jacob
2022-10-17 12:36 ` Naga Harish K, S V
2022-10-18 9:19 ` Jayatheerthan, Jay
2022-10-10 14:54 ` [PATCH 3/4] eventdev: have ethernet Tx " Mattias Rönnblom
2022-10-11 7:10 ` Jayatheerthan, Jay
2022-10-13 1:30 ` Naga Harish K, S V
2022-10-18 9:19 ` Jayatheerthan, Jay
2022-10-19 11:32 ` Jerin Jacob
2022-10-10 14:54 ` Mattias Rönnblom [this message]
2022-10-17 21:42 ` [PATCH 4/4] eventdev: have timer " Carrillo, Erik G
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=20221010145406.118880-5-mattias.ronnblom@ericsson.com \
--to=mattias.ronnblom@ericsson.com \
--cc=abhinandan.gujjar@intel.com \
--cc=dev@dpdk.org \
--cc=erik.g.carrillo@intel.com \
--cc=harry.van.haaren@intel.com \
--cc=hofors@lysator.liu.se \
--cc=jay.jayatheerthan@intel.com \
--cc=jerinj@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).