Hi Erik,

On Tue, Mar 09, 2021 at 08:04:32PM +0000, Carrillo, Erik G wrote:
> > 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(...);
> 
> It looks like periodic support is an operating mode of the adapter itself, and
> that all timers created with a periodic adapter instance will be periodic
> timers.
> 
> Is it possible to instead have "periodic/single-shot" be an attribute of an
> event timer itself, such that a single adapter instance could support either
> type of timer?
> 

With single type of timer per adapter, application can decide to create multiple
adapters of required type/mode and use as needed.

For an adapter to support both type of timers, driver ops implementation has to
follow different paths based on timer type and new capability flag should be
introduced to expose this feature. Our HW only supports single type of timer per
adapter.

Please let me know the approach you are aligned with.

Thanks,
Shijith

Reply via email to