eventdev: introduce adapter flags for periodic mode
authorShijith Thotton <sthotton@marvell.com>
Wed, 17 Mar 2021 08:04:19 +0000 (13:34 +0530)
committerJerin Jacob <jerinj@marvell.com>
Mon, 12 Apr 2021 07:23:34 +0000 (09:23 +0200)
commita10d79a60be3177afb41fa9eb08dfb2400b9a03a
tree1d47040478ab10841c08132e911f10529de2115b
parent626b12a8d3bb018f7fc9e2eae356a375fb2d38dc
eventdev: introduce adapter flags for periodic mode

A timer adapter in periodic mode can be used to arm periodic timers.
This patch adds flags used to advertise capability and configure timer
adapter in periodic mode. Capability flag should be set for adapters
which support periodic mode.

Below is a programming sequence on the usage:
/* check for periodic mode support by reading capability. */
rte_event_timer_adapter_caps_get(...);

/* create adapter in periodic mode by setting periodic flag
   (RTE_EVENT_TIMER_ADAPTER_F_PERIODIC) and resolution. */
rte_event_timer_adapter_create_ext(...);

/* arm periodic timer of configured resolution */
rte_event_timer_arm_burst(...);

/* timer event will be periodically generated at configured
   resolution till cancel is called. */
while (running) { rte_event_dequeue_burst(...); }

/* cancel periodic timer which stops generating events */
rte_event_timer_cancel_burst(...);

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
doc/guides/prog_guide/event_timer_adapter.rst
doc/guides/rel_notes/release_21_05.rst
lib/librte_eventdev/rte_event_timer_adapter.h
lib/librte_eventdev/rte_eventdev.h