X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fprog_guide%2Fevent_timer_adapter.rst;h=7547059a059191774184b4d9fd88f312dbfb097e;hb=6cc51b1293ceac4a77d4bf7ac91a8bbd59e1f78c;hp=a95efbe0d8a332df5f485fa1493c9cd0d0790956;hpb=43628b3df237069558ee5e6be417ae410b8ef6e1;p=dpdk.git diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst index a95efbe0d8..7547059a05 100644 --- a/doc/guides/prog_guide/event_timer_adapter.rst +++ b/doc/guides/prog_guide/event_timer_adapter.rst @@ -35,7 +35,7 @@ device upon timer expiration. The Event Timer Adapter API represents each event timer with a generic struct, which contains an event and user metadata. The ``rte_event_timer`` struct is -defined in ``lib/librte_event/librte_event_timer_adapter.h``. +defined in ``lib/event/librte_event_timer_adapter.h``. .. _timer_expiry_event: @@ -138,6 +138,18 @@ This function is passed a callback function that will be invoked if the adapter needs to create an event port, giving the application the opportunity to control how it is done. +Adapter modes +^^^^^^^^^^^^^ +An event timer adapter can be configured in either periodic or non-periodic mode +to support timers of the respective type. A periodic timer expires at a fixed +time interval repeatedly till it is cancelled. A non-periodic timer expires only +once. The periodic capability flag, ``RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC``, +can be set for implementations that support periodic mode if desired. To +configure an adapter in periodic mode, ``timer_adapter_flags`` of +``rte_event_timer_adapter_conf`` is set to include the periodic flag +``RTE_EVENT_TIMER_ADAPTER_F_PERIODIC``. Maximum timeout (``max_tmo_nsec``) does +not apply to periodic mode. + Retrieve Event Timer Adapter Contextual Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The event timer adapter implementation may have constraints on tick resolution @@ -229,7 +241,9 @@ Now we can arm the event timer with ``rte_event_timer_arm_burst()``: Once an event timer expires, the application may free it or rearm it as necessary. If the application will rearm the timer, the state should be reset -to RTE_EVENT_TIMER_NOT_ARMED by the application before rearming it. +to RTE_EVENT_TIMER_NOT_ARMED by the application before rearming it. Timer expiry +events will be generated once or periodically until the timer is cancelled based +on adapter mode. Multiple Event Timers with Same Expiry Value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^