Hi Petri,

This series includes your last propositions.
Please review it.

Except this series.
After the series I will send series that tries to align
local and global time under one type. Also I dislike the idea
to use different approaches for operating with local and global times.
In case of one opaque type they should be the same, so I will try
to use the same approach and reflect it in all places where it's needed.

Initially I need to have some common position for it, w/o each it's very hard 
to do.
- proposition to not bother with 32 bit counters, only for > 64-bit.
  It was initially implemented as 64-bit, so should work with current apps/imp.
  Even 32-bit systems have 64-bit counter for time.
  It greatly simplify usage of time and doesn't require to have call to get max 
time.
- add functions to convert ns to interval, not only to time
  It allows to simplify calculations of periodic events in loops.
  Allows to behave local and global functions in the same manner

All this hides at least two flags under time:
local/global and abs/interval.
Please, confirm if you are OK with this.

On 05.11.15 13:04, Ivan Khoronzhuk wrote:
This seres is intended to unbind time API names from CPU "cycles".
Also remove usage of word "cycle" from appropriate places as it's
no more valid. This patch series only change API names and adds
calls required for that and doesn't add new API functionality.
API to get rate of time and delay will be added separately
Also, global time changes will be added a little later.

In order to draw attention for the user a patch to swap args for
diff function were added just after it's renaming.

Since v5:
- renamed ODP_TIME_* constants to be ODP_TIME_*_IN_NS
- extended explanation of odp_time_t that time source can be local and global
- renamed odp_time on odp_time_local
- renamed odp_time_from_ns to odp_time_local_from_ns
- added new patch to swap arg for diff function

Since v4:
- corrected desc of time API:
   global -> local
   time stamp -> Time stamp in desc.

Since v3:
- don't use "tick" word in API names
- added opaque type odp_time_t
- added additional function: cmpr, sum, to_u64
- use "time stamp" word instead of "handle"
- described more clearly timestamps order in functions
- two new patches:
   performance: odp_pktio_perf: fix potential overflow in wait loop
   example: generator: compare ticks instead of ns in loop

Since v1, v2:
- changed series name a little bit
- added opaque type odp_time_t
- added missed spaces in printf
- removed legacy "count" words

Ivan Khoronzhuk (6):
   performance: odp_pktio_perf: fix potential overflow in wait loop
   example: generator: compare ticks instead of ns in loop
   api: time: unbind CPU cycles from time API
   linux-generic: align implementation with new time API
   test/example: avoid "cycle" word usage
   api: time: change order of arguments for diff function

  example/generator/odp_generator.c                  | 18 +++--
  example/timer/odp_timer_test.c                     | 10 +--
  include/odp/api/time.h                             | 79 +++++++++++++++++-----
  platform/linux-generic/Makefile.am                 |  1 +
  .../linux-generic/include/odp/plat/time_types.h    | 36 ++++++++++
  platform/linux-generic/include/odp/time.h          |  1 +
  platform/linux-generic/odp_schedule.c              | 16 ++---
  platform/linux-generic/odp_time.c                  | 62 ++++++++++++++---
  platform/linux-generic/odp_timer.c                 |  4 +-
  test/performance/odp_l2fwd.c                       |  2 +-
  test/performance/odp_pktio_perf.c                  | 62 +++++++++--------
  .../classification/odp_classification_test_pmr.c   | 20 +++---
  .../classification/odp_classification_tests.c      | 14 ++--
  test/validation/pktio/pktio.c                      | 31 +++++----
  test/validation/scheduler/scheduler.c              |  5 +-
  test/validation/time/time.c                        | 47 ++++++-------
  test/validation/time/time.h                        |  6 +-
  test/validation/timer/timer.c                      | 14 ++--
  18 files changed, 280 insertions(+), 148 deletions(-)
  create mode 100644 platform/linux-generic/include/odp/plat/time_types.h


--
Regards,
Ivan Khoronzhuk
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to