[4/4] eventdev: have timer adapter appropriately report idle
Checks
Commit Message
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(-)
Comments
> -----Original Message-----
> From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> Sent: Monday, October 10, 2022 9:54 AM
> To: Jayatheerthan, Jay <jay.jayatheerthan@intel.com>; Carrillo, Erik G
> <erik.g.carrillo@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jerin Jacob <jerinj@marvell.com>
> Cc: dev@dpdk.org; Van Haaren, Harry <harry.van.haaren@intel.com>;
> hofors@lysator.liu.se; mattias.ronnblom <mattias.ronnblom@ericsson.com>
> Subject: [PATCH 4/4] eventdev: have timer adapter appropriately report idle
>
> 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>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
@@ -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