[PATCH v7] api: timer: support period setting directly with frequency#2323
[PATCH v7] api: timer: support period setting directly with frequency#2323TuomasTaipale wants to merge 2 commits intoOpenDataPlane:masterfrom
Conversation
0cd8102 to
eabd867
Compare
eabd867 to
4dd48d2
Compare
4dd48d2 to
a9b6979
Compare
a9b6979 to
c1a881d
Compare
|
Hi @TuomasTaipale , Instead of adding ODP_TIMER_TYPE_PERIODIC_2, could the period configuration method be a separate mode field inside the periodic sub-struct? as there is really only one periodic timer concept. typedef enum { The mode would sit next to the union it discriminates. This would also avoid needing to recall a type_1 -> PERIODIC, type_2 -> PERIODIC_2 mapping. |
c1a881d to
af6f323
Compare
@shijith Thanks for checking. Initially we had this two-level structure for the new periodic types but decided not to go with that as it would be perhaps a bit cumbersome/error-prone for application. Using the existing In v6, swapped the |
Add alternative method for configuring periodic timer frequency for timer pools and timers. The new method introduces a new periodic timer type `ODP_TIMER_TYPE_PERIODIC_FREQ` to be used with periodic timer capability checks and timer pool creation. Old periodic timer type `ODP_TIMER_TYPE_PERIODIC` is renamed to `ODP_TIMER_TYPE_PERIODIC_BASE_MUL` to better reflect the differences between these two types. Capability checks and timer pool configuration is based on a list of constraining periodic timer frequencies that are used to dimension the underlying timer pool resources. Subsequently, timers from the new type of timer pools can be started directly with a wanted timer frequency. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Print new periodic timer support and frequency capabilities. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com>
af6f323 to
bfcfa57
Compare
On top of #2320
v5:
v6:
v7: