[lng-odp] [PATCH v2 1/2] helper: linux: correct cpumask usage

2016-02-11 Thread Petri Savolainen
Use Linux cpu_set_t instead of odp_cpumask_t when passing cpus to Linux system calls. Signed-off-by: Petri Savolainen --- helper/linux.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helper/linux.c b/helper/linux.c index 7904d5c..7dd26d2 100644 --- a

[lng-odp] [PATCH] helper: linux: correct cpumask usage

2016-02-11 Thread Petri Savolainen
Use Linux cpu_set_t instead of odp_cpumask_t when passing cpus to Linux system calls. Signed-off-by: Petri Savolainen --- helper/linux.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helper/linux.c b/helper/linux.c index 7904d5c..7dd26d2 100644 --- a

[lng-odp] [API-NEXT PATCH 3/4] helper: remove odp_ definitions

2016-02-09 Thread Petri Savolainen
Many helper files included ODP internal headers and defined types or functions with odp_ prefix. A helper can be consider as part of application - from ODP headers it may include only odp.h and it must not define anything with odp_ prefix. Signed-off-by: Petri Savolainen --- example/generator

[lng-odp] [API-NEXT PATCH 4/4] tests: use parse mac and ip address helpers

2016-02-09 Thread Petri Savolainen
Convert some of the examples and tests to use MAC and IPv4 address parse functions instead of implementing those multiple times. There are still some examples to convert, but those would require a bit more effort. Signed-off-by: Petri Savolainen --- example/classifier/odp_classifier.c | 30

[lng-odp] [API-NEXT PATCH 2/4] helper: ip: added ipv4 address parse

2016-02-09 Thread Petri Savolainen
IPv4 address parse function is commonly needed by test applications. A common parse function harmonizes the definition IPv4 address as a command line parameter. Signed-off-by: Petri Savolainen --- helper/Makefile.am | 1 + helper/include/odp/helper/ip.h | 22 +- helper/ip.c

[lng-odp] [API-NEXT PATCH 1/4] helper: eth: added mac address parse

2016-02-09 Thread Petri Savolainen
Ethernet MAC address parse function is commonly needed by test applications. A common parse function harmonizes the definition of MAC address as a command line parameter. Signed-off-by: Petri Savolainen --- helper/Makefile.am | 1 + helper/eth.c| 36

[lng-odp] [API-NEXT PATCH] linux-generic: version: added implementation name string

2016-02-05 Thread Petri Savolainen
Added missing implementation of implementation name string and call it from validation tests and couple of other apps. Signed-off-by: Petri Savolainen --- platform/linux-generic/odp_impl.c | 8 test/performance/odp_l2fwd.c | 4 +++- test/performance

[lng-odp] [API-NEXT PATCH 3/3] api: pktio: rename single_user param

2016-02-05 Thread Petri Savolainen
nize those. This enables op_mode extensions in the future (e.g. dedicated single thread mode). Signed-off-by: Petri Savolainen --- include/odp/api/packet_io.h| 55 -- platform/linux-generic/odp_packet_io.c | 2 ++ platform/linux-generic/pktio/netm

[lng-odp] [API-NEXT PATCH 2/3] api: pktio: renames for compact type and func names

2016-02-05 Thread Petri Savolainen
() odp_pktio_pktin_queues()odp_pktin_queue() odp_pktio_pktout_queues() odp_pktout_queue() odp_pktio_input_queue_param_init() odp_pktin_queue_param_init() odp_pktio_output_queue_param_init() odp_pktout_queue_param_init() Signed-off-by: Petri Savolainen --- include/odp/api

[lng-odp] [API-NEXT PATCH 1/3] api: queue: add enq and deq mode params

2016-02-05 Thread Petri Savolainen
enq/deq calls). There is possibility to add modes later on. For example, a dedicated, single thread mode could be added, which would pin a queue (enq or deq end) to a dedicated thread. Signed-off-by: Petri Savolainen --- include/odp/api/queue.h| 51

[lng-odp] [API-NEXT PATCH 2/2] validation: stdlib: add odp_memcmp test

2016-01-29 Thread Petri Savolainen
Added test for memory compare. Signed-off-by: Petri Savolainen --- test/validation/std_clib/std_clib.c | 38 + 1 file changed, 38 insertions(+) diff --git a/test/validation/std_clib/std_clib.c b/test/validation/std_clib/std_clib.c index e53ad39..e69bc39

[lng-odp] [API-NEXT PATCH 1/2] api: stdlib: added odp_memcmp

2016-01-29 Thread Petri Savolainen
Memory compare is a commonly used C library function on data plane applications. This enables using HW offload (e.g. vector unit) for compare operations. Signed-off-by: Petri Savolainen --- include/odp/api/std_clib.h| 18 ++ platform/linux-generic/include/odp

[lng-odp] [API-NEXT PATCH 1/3] api: atomic: init functions are not atomic

2016-01-29 Thread Petri Savolainen
Highlight that application must ensure that there's no race while calling init functions. Also lock free call will never set op.init flag, since init call will not need to implement locking or other (lock free) synchronization. Signed-off-by: Petri Savolainen --- include/odp/api/ato

[lng-odp] [API-NEXT PATCH 2/3] validation: remove remaining references synchronizers

2016-01-29 Thread Petri Savolainen
Synchronizers suite was split into atomic, lock and barrier suites. Signed-off-by: Petri Savolainen --- test/validation/atomic/atomic.c | 16 test/validation/atomic/atomic.h | 12 ++-- test/validation/barrier/barrier.h | 4 ++-- test/validation/lock/lock.h

[lng-odp] [API-NEXT PATCH 3/3] validation: atomic: added lock free op test

2016-01-29 Thread Petri Savolainen
Test atomic_op bit fields and odp_atomic_lock_free_u64(). Signed-off-by: Petri Savolainen --- test/validation/atomic/atomic.c | 107 test/validation/atomic/atomic.h | 1 + 2 files changed, 108 insertions(+) diff --git a/test/validation/atomic/atomic.c

[lng-odp] [API-NEXT PATCH 6/6] linux-generic: use term plain queue instead of poll

2016-01-28 Thread Petri Savolainen
As poll queue type was renamed, update variable names and documentation accordingly. Signed-off-by: Petri Savolainen --- test/performance/odp_l2fwd.c | 30 +++--- test/performance/odp_pktio_perf.c | 22 +++--- test/performance

[lng-odp] [API-NEXT PATCH 5/6] api: queue: moved queue type into queue parameters

2016-01-28 Thread Petri Savolainen
quire definition of any other queue params (e.g. sched params). Signed-off-by: Petri Savolainen --- example/classifier/odp_classifier.c| 12 +++ example/generator/odp_generator.c | 9 ++--- example/ipsec/odp_ipsec.c

[lng-odp] [API-NEXT PATCH 3/6] api: pktio: rename pktio modes

2016-01-28 Thread Petri Savolainen
to _DIRECT, which is future proof to support additional direct calls for packet input/output. Signed-off-by: Petri Savolainen --- example/ipsec/odp_ipsec.c | 2 +- example/packet/odp_pktio.c | 4 +- include/odp/api/packet_io.h

[lng-odp] [API-NEXT PATCH 4/6] api: queue: define queue type as enum

2016-01-28 Thread Petri Savolainen
Fixed odp_queue_type_t to be an enum. Type need to be fixed so that it can be added as part of odp_queue_param_t. Signed-off-by: Petri Savolainen --- include/odp/api/queue.h| 43 +- .../linux-generic/include/odp/plat/queue_types.h | 8 2

[lng-odp] [API-NEXT PATCH 2/6] api: queue: rename QUEUE_TYPE_POLL to _PLAIN

2016-01-28 Thread Petri Savolainen
plication can directly dequeue (instead of using the scheduler). Signed-off-by: Petri Savolainen --- example/generator/odp_generator.c | 6 +++--- example/ipsec/odp_ipsec.c | 6 +++--- example/time/time_global_test.c

[lng-odp] [API-NEXT PATCH 1/6] api: sched: rename SCHED_SYNC_NONE to _PARALLEL

2016-01-28 Thread Petri Savolainen
In practice, this type of queues are referred as "parallel queues" instead of "none queues". Also "none" type is quite pessimistic term, since scheduler may perform lots of HW offload also in this mode. Signed-off-by: Petri Savolainen --- example/classifier/odp_cl

[lng-odp] [API-NEXT PATCH 0/6] Rename queue types

2016-01-28 Thread Petri Savolainen
create APIs (pool, timer, tm, ...). These modifications are preparation for removal of PKTIN and PKOUT queue types, and the single queue pktio API (odp_pktio_inq_setdef(), etc). Petri Savolainen (6): api: sched: rename SCHED_SYNC_NONE to _PARALLEL api: queue: rename QUEUE_TYPE_POLL to _PLAIN

[lng-odp] [API-NEXT PATCH] api: packet: added multicast flags

2016-01-21 Thread Petri Savolainen
Added packet flags for Ethernet and IP broad- and multicast. For application, it's more effective to check a flag than all destionation address bits. Signed-off-by: Petri Savolainen --- include/odp/api/packet_flags.h | 70 +- 1 file changed, 69 inser

[lng-odp] [API-NEXT PATCH v3 13/13] linux-generic: barrier: use API memory barrier

2016-01-20 Thread Petri Savolainen
Use full memory barrier from API instead of the internal function. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_atomic_internal.h | 6 -- platform/linux-generic/odp_barrier.c | 8 2 files changed, 4 insertions(+), 10 deletions(-) diff

[lng-odp] [API-NEXT PATCH v3 12/13] linux-generic: locks: replace internal atomics

2016-01-20 Thread Petri Savolainen
Replace internal non-relaxed atomics with API calls. Timer and spinlock were not converted since those use flags and 128 variables. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_pool_internal.h | 1 - platform/linux-generic/odp_pool.c | 1 - platform

[lng-odp] [API-NEXT PATCH v3 11/13] validation: atomic: added non-relaxed test

2016-01-20 Thread Petri Savolainen
Added validation test for all operations with non-relaxed memory model. Mainly testing that functions are available. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 82 +++ test/validation/synchronizers/synchronizers.h | 1 + 2 files

[lng-odp] [API-NEXT PATCH v3 09/13] validation: atomic: added cas test

2016-01-20 Thread Petri Savolainen
Added validation test for CAS operations. Maintained the structure of other atomic tests: one function increments and another decrements a variable. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 83 +++ test/validation/synchronizers

[lng-odp] [API-NEXT PATCH v3 10/13] validation: atomic: added xchg test

2016-01-20 Thread Petri Savolainen
Added validation test for exchange operations. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 71 +++ test/validation/synchronizers/synchronizers.h | 1 + 2 files changed, 72 insertions(+) diff --git a/test/validation/synchronizers

[lng-odp] [API-NEXT PATCH v3 08/13] validation: atomic: added max and min tests

2016-01-20 Thread Petri Savolainen
Added validation tests for atomic max and min operations. Results validation is a simple compare, since absolute min/max values depend on the number of threads. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 111 -- test/validation

[lng-odp] [API-NEXT PATCH v3 07/13] linux-generic: atomic: implemented exchange

2016-01-20 Thread Petri Savolainen
Implemented 32 and 64 bit atomic exchange operations. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 16 1 file changed, 16 insertions(+) diff --git a/platform/linux-generic/include/odp/atomic.h b/platform/linux-generic/include/odp/atomic.h

[lng-odp] [API-NEXT PATCH v3 06/13] api: atomic: added relaxed exchange operation

2016-01-20 Thread Petri Savolainen
Added 32 and 64 bit atomic exchange operations in relaxed memory ordering. These can be used e.g. to initialize a counter while counting. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/include/odp/api

[lng-odp] [API-NEXT PATCH v3 05/13] linux-generic: atomic: non-relaxed 64bit operations

2016-01-20 Thread Petri Savolainen
Implemented 64 bit non-relaxed atomic operations. Additional ordering is not needed in case of using ATOMIC_OP since it includes both acquire and release ordering. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 83 + 1 file changed

[lng-odp] [API-NEXT PATCH v3 04/13] api: atomic: add non-relaxed 64bit operations

2016-01-20 Thread Petri Savolainen
Added 64 bit versions of the same set of non-relaxed atomic operations that are already defined for 32 bit. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 99 1 file changed, 99 insertions(+) diff --git a/include/odp/api/atomic.h

[lng-odp] [API-NEXT PATCH v3 03/13] linux-generic: atomic: 32bit cas_rel and cas_acq_rel

2016-01-20 Thread Petri Savolainen
Implemented 32bit cas_rel and cas_acq_rel calls. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 37 ++--- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/include/odp/atomic.h b/platform/linux

[lng-odp] [API-NEXT PATCH v3 02/13] api: atomic: added 32bit cas_rel and cas_acq_rel

2016-01-20 Thread Petri Savolainen
Added RELEASE and ACQUIRE-and-RELEASE versions of 32 bit CAS. These are commonly needed operations in lock-free algorithms. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 86 +--- 1 file changed, 67 insertions(+), 19 deletions(-) diff

[lng-odp] [API-NEXT PATCH v3 01/13] api: atomic: rename release ordering

2016-01-20 Thread Petri Savolainen
Rename release ordering from _rls_ to _rel_ since it matches better with _acq_rel_, which is going to be used for C11 memory_order_acq_rel order. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h| 8 platform/linux-generic/include/odp/atomic.h | 6

[lng-odp] [API-NEXT PATCH v3 00/13] atomi api completion

2016-01-20 Thread Petri Savolainen
validation test v2: * rebased on latest api-next Petri Savolainen (13): api: atomic: rename release ordering api: atomic: added 32bit cas_rel and cas_acq_rel linux-generic: atomic: 32bit cas_rel and cas_acq_rel api: atomic: add non-relaxed 64bit operations linux-generic: atomic: non

[lng-odp] [API-NEXT PATCH v4 5/6] test: l2fwd: re-organize functions

2016-01-20 Thread Petri Savolainen
Re-order functions to get rid off (static) function prototypes and improve code readability. Signed-off-by: Petri Savolainen --- test/performance/odp_l2fwd.c | 645 +-- 1 file changed, 318 insertions(+), 327 deletions(-) diff --git a/test/performance

[lng-odp] [API-NEXT PATCH v4 6/6] test: l2fwd: added poll queue mode

2016-01-20 Thread Petri Savolainen
Added poll queue mode (mode == 4), which uses poll type queues for packet input. Configuration and functionality is very similar to direct recv mode. Signed-off-by: Petri Savolainen --- test/performance/odp_l2fwd.c | 197 --- 1 file changed, 165

[lng-odp] [API-NEXT PATCH v4 4/6] linux-generic: pktio: use multiqueue recv internally

2016-01-20 Thread Petri Savolainen
Use multiqueue recv for poll type input queues. Signed-off-by: Petri Savolainen --- platform/linux-generic/odp_packet_io.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index

[lng-odp] [API-NEXT PATCH v4 2/6] linux-generic: pktio: re-organize queue config code

2016-01-20 Thread Petri Savolainen
Push generic parts of input/output queue config code to upper level (into odp_packet_io.c). Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_packet_netmap.h | 7 +- platform/linux-generic/odp_packet_io.c | 186 ++--- platform/linux-generic

[lng-odp] [API-NEXT PATCH v4 3/6] linux-generic: pktio: added poll type input queue

2016-01-20 Thread Petri Savolainen
Added support for poll type input queues. Signed-off-by: Petri Savolainen --- .../linux-generic/include/odp_queue_internal.h | 2 +- platform/linux-generic/odp_packet_io.c | 23 ++ platform/linux-generic/odp_queue.c | 2 ++ 3 files changed

[lng-odp] [API-NEXT PATCH v4 1/6] linux-generic: netmap: map rings in netmap_start

2016-01-20 Thread Petri Savolainen
From: Matias Elo This is a bug fix for old API. Map pktin/pktout queues to netmap rings in netmap_start() instead of netmap_*put_queues_config() for backward compatibility with inq_setdef API. Signed-off-by: Matias Elo --- platform/linux-generic/pktio/netmap.c | 18 -- 1 file c

[lng-odp] [API-NEXT PATCH v4 0/6] Multi-queue pktio for poll mode

2016-01-20 Thread Petri Savolainen
: netmap: map rings in netmap_start Petri Savolainen (5): linux-generic: pktio: re-organize queue config code linux-generic: pktio: added poll type input queue linux-generic: pktio: use multiqueue recv internally test: l2fwd: re-organize functions test: l2fwd: added poll queue mode platform

[lng-odp] [API-NEXT PATCH v2 13/13] linux-generic: barrier: use API memory barrier

2016-01-18 Thread Petri Savolainen
Use full memory barrier from API instead of the internal function. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_atomic_internal.h | 6 -- platform/linux-generic/odp_barrier.c | 8 2 files changed, 4 insertions(+), 10 deletions(-) diff

[lng-odp] [API-NEXT PATCH v2 12/13] linux-generic: locks: replace internal atomics

2016-01-18 Thread Petri Savolainen
Replace internal non-relaxed atomics with API calls. Timer and spinlock were not converted since those use flags and 128 variables. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_pool_internal.h | 1 - platform/linux-generic/odp_pool.c | 1 - platform

[lng-odp] [API-NEXT PATCH v2 11/13] validation: atomic: added non-relaxed test

2016-01-18 Thread Petri Savolainen
Added validation test for all operations with non-relaxed memory model. Mainly testing that functions are available. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 82 +++ test/validation/synchronizers/synchronizers.h | 1 + 2 files

[lng-odp] [API-NEXT PATCH v2 10/13] validation: atomic: added xchg test

2016-01-18 Thread Petri Savolainen
Added validation test for exchange operations. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 54 +++ test/validation/synchronizers/synchronizers.h | 1 + 2 files changed, 55 insertions(+) diff --git a/test/validation/synchronizers

[lng-odp] [API-NEXT PATCH v2 09/13] validation: atomic: added cas test

2016-01-18 Thread Petri Savolainen
Added validation test for CAS operations. Maintained the structure of other atomic tests: one function increments and another decrements a variable. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 83 +++ test/validation/synchronizers

[lng-odp] [API-NEXT PATCH v2 08/13] validation: atomic: added max and min tests

2016-01-18 Thread Petri Savolainen
Added validation tests for atomic max and min operations. Results validation is a simple compare, since absolute min/max values depend on the number of threads. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 111 -- test/validation

[lng-odp] [API-NEXT PATCH v2 06/13] api: atomic: added relaxed exchange operation

2016-01-18 Thread Petri Savolainen
Added 32 and 64 bit atomic exchange operations in relaxed memory ordering. These can be used e.g. to initialize a counter while counting. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/include/odp/api

[lng-odp] [API-NEXT PATCH v2 07/13] linux-generic: atomic: implemented exchange

2016-01-18 Thread Petri Savolainen
Implemented 32 and 64 bit atomic exchange operations. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 16 1 file changed, 16 insertions(+) diff --git a/platform/linux-generic/include/odp/atomic.h b/platform/linux-generic/include/odp/atomic.h

[lng-odp] [API-NEXT PATCH v2 05/13] linux-generic: atomic: non-relaxed 64bit operations

2016-01-18 Thread Petri Savolainen
Implemented 64 bit non-relaxed atomic operations. Additional ordering is not needed in case of using ATOMIC_OP since it includes both acquire and release ordering. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 83 + 1 file changed

[lng-odp] [API-NEXT PATCH v2 04/13] api: atomic: add non-relaxed 64bit operations

2016-01-18 Thread Petri Savolainen
Added 64 bit versions of the same set of non-relaxed atomic operations that are already defined for 32 bit. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 99 1 file changed, 99 insertions(+) diff --git a/include/odp/api/atomic.h

[lng-odp] [API-NEXT PATCH v2 02/13] api: atomic: added 32bit cas_rel and cas_acq_rel

2016-01-18 Thread Petri Savolainen
Added RELEASE and ACQUIRE-and-RELEASE versions of 32 bit CAS. These are commonly needed operations in lock-free algorithms. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 86 +--- 1 file changed, 67 insertions(+), 19 deletions(-) diff

[lng-odp] [API-NEXT PATCH v2 03/13] linux-generic: atomic: 32bit cas_rel and cas_acq_rel

2016-01-18 Thread Petri Savolainen
Implemented 32bit cas_rel and cas_acq_rel calls. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 37 ++--- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/include/odp/atomic.h b/platform/linux

[lng-odp] [API-NEXT PATCH v2 01/13] api: atomic: rename release ordering

2016-01-18 Thread Petri Savolainen
Rename release ordering from _rls_ to _rel_ since it matches better with _acq_rel_, which is going to be used for C11 memory_order_acq_rel order. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h| 8 platform/linux-generic/include/odp/atomic.h | 6

[lng-odp] [API-NEXT PATCH v2 00/13] atomi api completion

2016-01-18 Thread Petri Savolainen
Petri Savolainen (13): api: atomic: rename release ordering api: atomic: added 32bit cas_rel and cas_acq_rel linux-generic: atomic: 32bit cas_rel and cas_acq_rel api: atomic: add non-relaxed 64bit operations linux-generic: atomic: non-relaxed 64bit operations api: atomic: added relaxed

[lng-odp] [PATCH 1/2] linux-generic: define posix extension level once

2016-01-14 Thread Petri Savolainen
Use only one definition for posix extension level. _GNU_SOURCE defines _POSIX_C_SOURCE based on glibc version, and is the only definition needed under Linux. Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/arch/linux

[lng-odp] [PATCH 2/2] tests: harmonize posix extensions level defines

2016-01-14 Thread Petri Savolainen
Allways use _GNU_SOURCE instead of various _POSIX_C_SOURCE defines. Signed-off-by: Petri Savolainen --- example/generator/odp_generator.c | 4 +++- example/ipsec/odp_ipsec.c | 6 -- example/ipsec/odp_ipsec_fwd_db.c | 4 +++- example/ipsec/odp_ipsec_sa_db.c | 4 +++- example/ipsec

[lng-odp] [API-NEXT PATCH v2 5/5] linux-generic: removed spin_internal

2016-01-13 Thread Petri Savolainen
Removed odp_spin() and replaced usage with odp_cpu_pause(). Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 1 - platform/linux-generic/include/odp_spin_internal.h | 58 -- platform/linux-generic/odp_barrier.c | 4

[lng-odp] [API-NEXT PATCH v2 4/5] helper: deleted odph_pause

2016-01-13 Thread Petri Savolainen
Deleted odph_pause() and replaced usage with odp_cpu_pause() calls. Signed-off-by: Petri Savolainen --- helper/Makefile.am | 1 - helper/odph_pause.h | 54 helper/ring.c| 10 +++-- helper/test/Makefile.am | 2

[lng-odp] [API-NEXT PATCH v2 3/5] linux-generic: cpu: implemented pause

2016-01-13 Thread Petri Savolainen
Implemented pause as an inline function in a cpu arch dependent header file. Signed-off-by: Petri Savolainen --- helper/Makefile.am| 2 ++ platform/linux-generic/Makefile.am| 4 +++- platform/linux-generic/Makefile.inc | 2

[lng-odp] [API-NEXT PATCH v2 1/5] linux-generic: arch: renamed cpu arch files

2016-01-13 Thread Petri Savolainen
These arch depedent files are not limited to cpu_cycle calls implementation only. Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 8 ++-- platform/linux-generic/arch/linux/odp_cpu_arch.c | 48 ++ platform/linux-generic/arch/linux

[lng-odp] [API-NEXT PATCH v2 2/5] api: cpu: added pause call

2016-01-13 Thread Petri Savolainen
Pause is used in tight loops to reduce stress to the system. Signed-off-by: Petri Savolainen --- include/odp/api/cpu.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h index 8a804d4..4cbaf58 100644 --- a/include/odp/api/cpu.h +++ b

[lng-odp] [RFC API-NEXT PATCH] api: packet: add packet segment manipulation

2016-01-11 Thread Petri Savolainen
-by: Petri Savolainen --- include/odp/api/packet.h | 82 +++- 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index 8651a47..7d315ba 100644 --- a/include/odp/api/packet.h +++ b/include/odp

[lng-odp] [RFC API-NEXT PATCH] packet segmentation

2016-01-11 Thread Petri Savolainen
er data is constant. */ odp_pktio_send_queue(pktout, pkt, NUM_MCAST); } Petri Savolainen (1): api: packet: add packet segment manipulation include/odp/api/packet.h | 82 +++- 1 file changed, 74 insertions(+), 8 dele

[lng-odp] [API-NEXT PATCH v3 6/6] test: l2fwd: added poll queue mode

2016-01-11 Thread Petri Savolainen
Added poll queue mode (mode == 4), which uses poll type queues for packet input. Configuration and functionality is very similar to direct recv mode. Signed-off-by: Petri Savolainen --- test/performance/odp_l2fwd.c | 188 --- 1 file changed, 160

[lng-odp] [API-NEXT PATCH v3 5/6] test: l2fwd: re-organize functions

2016-01-11 Thread Petri Savolainen
Re-order functions to get rid off (static) function prototypes and improve code readability. Signed-off-by: Petri Savolainen --- test/performance/odp_l2fwd.c | 645 +-- 1 file changed, 318 insertions(+), 327 deletions(-) diff --git a/test/performance

[lng-odp] [API-NEXT PATCH v3 3/6] linux-generic: pktio: added poll type input queue

2016-01-11 Thread Petri Savolainen
Added support for poll type input queues. Signed-off-by: Petri Savolainen --- .../linux-generic/include/odp_queue_internal.h | 2 +- platform/linux-generic/odp_packet_io.c | 23 ++ platform/linux-generic/odp_queue.c | 2 ++ 3 files changed

[lng-odp] [API-NEXT PATCH v3 2/6] linux-generic: pktio: re-organize queue config code

2016-01-11 Thread Petri Savolainen
Push generic parts of input/output queue config code to upper level (into odp_packet_io.c). Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_packet_netmap.h | 7 +- platform/linux-generic/odp_packet_io.c | 186 ++--- platform/linux-generic

[lng-odp] [API-NEXT PATCH v3 4/6] linux-generic: pktio: use multiqueue recv internally

2016-01-11 Thread Petri Savolainen
Use multiqueue recv for poll type input queues. Signed-off-by: Petri Savolainen --- platform/linux-generic/odp_packet_io.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index

[lng-odp] [API-NEXT PATCH v3 0/6] Multi-queue pktio for poll mode

2016-01-11 Thread Petri Savolainen
This patch set adds support for multi-queue pktio for poll mode queues. v3: * Rebased v2: * Bug correction in patch 2/6: bad netmap initialization when using the old API. Matias Elo (1): linux-generic: netmap: map rings in netmap_start Petri Savolainen (5): linux-generic: pktio

[lng-odp] [API-NEXT PATCH v3 1/6] linux-generic: netmap: map rings in netmap_start

2016-01-11 Thread Petri Savolainen
From: Matias Elo This is a bug fix for old API. Map pktin/pktout queues to netmap rings in netmap_start() instead of netmap_*put_queues_config() for backward compatibility with inq_setdef API. Signed-off-by: Matias Elo --- platform/linux-generic/pktio/netmap.c | 18 -- 1 file c

[lng-odp] [API-NEXT PATCH 12/13] linux-generic: locks: replace internal atomics

2016-01-08 Thread Petri Savolainen
Replace internal non-relaxed atomics with API calls. Timer and spinlock were not converted since those use flags and 128 variables. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_pool_internal.h | 1 - platform/linux-generic/odp_pool.c | 1 - platform

[lng-odp] [API-NEXT PATCH 08/13] validation: atomic: added max and min tests

2016-01-08 Thread Petri Savolainen
Added validation tests for atomic max and min operations. Results validation is a simple compare, since absolute min/max values depend on the number of threads. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 111 -- test/validation

[lng-odp] [API-NEXT PATCH 13/13] linux-generic: barrier: use API memory barrier

2016-01-08 Thread Petri Savolainen
Use full memory barrier from API instead of the internal function. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_atomic_internal.h | 6 -- platform/linux-generic/odp_barrier.c | 7 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git

[lng-odp] [API-NEXT PATCH 10/13] validation: atomic: added xchg test

2016-01-08 Thread Petri Savolainen
Added validation test for exchange operations. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 54 +++ test/validation/synchronizers/synchronizers.h | 1 + 2 files changed, 55 insertions(+) diff --git a/test/validation/synchronizers

[lng-odp] [API-NEXT PATCH 11/13] validation: atomic: added non-relaxed test

2016-01-08 Thread Petri Savolainen
Added validation test for all operations with non-relaxed memory model. Mainly testing that functions are available. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 82 +++ test/validation/synchronizers/synchronizers.h | 1 + 2 files

[lng-odp] [API-NEXT PATCH 09/13] validation: atomic: added cas test

2016-01-08 Thread Petri Savolainen
Added validation test for CAS operations. Maintained the structure of other atomic tests: one function increments and another decrements a variable. Signed-off-by: Petri Savolainen --- test/validation/synchronizers/synchronizers.c | 83 +++ test/validation/synchronizers

[lng-odp] [API-NEXT PATCH 06/13] api: atomic: added relaxed exchange operation

2016-01-08 Thread Petri Savolainen
Added 32 and 64 bit atomic exchange operations in relaxed memory ordering. These can be used e.g. to initialize a counter while counting. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/include/odp/api

[lng-odp] [API-NEXT PATCH 04/13] api: atomic: add non-relaxed 64bit operations

2016-01-08 Thread Petri Savolainen
Added 64 bit versions of the same set of non-relaxed atomic operations that are already defined for 32 bit. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 99 1 file changed, 99 insertions(+) diff --git a/include/odp/api/atomic.h

[lng-odp] [API-NEXT PATCH 07/13] linux-generic: atomic: implemented exchange

2016-01-08 Thread Petri Savolainen
Implemented 32 and 64 bit atomic exchange operations. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 16 1 file changed, 16 insertions(+) diff --git a/platform/linux-generic/include/odp/atomic.h b/platform/linux-generic/include/odp/atomic.h

[lng-odp] [API-NEXT PATCH 02/13] api: atomic: added 32bit cas_rel and cas_acq_rel

2016-01-08 Thread Petri Savolainen
Added RELEASE and ACQUIRE-and-RELEASE versions of 32 bit CAS. These are commonly needed operations in lock-free algorithms. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h | 86 +--- 1 file changed, 67 insertions(+), 19 deletions(-) diff

[lng-odp] [API-NEXT PATCH 05/13] linux-generic: atomic: non-relaxed 64bit operations

2016-01-08 Thread Petri Savolainen
Implemented 64 bit non-relaxed atomic operations. Additional ordering is not needed in case of using ATOMIC_OP since it includes both acquire and release ordering. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 83 + 1 file changed

[lng-odp] [API-NEXT PATCH 03/13] linux-generic: atomic: 32bit cas_rel and cas_acq_rel

2016-01-08 Thread Petri Savolainen
Implemented 32bit cas_rel and cas_acq_rel calls. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp/atomic.h | 37 ++--- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/include/odp/atomic.h b/platform/linux

[lng-odp] [API-NEXT PATCH 01/13] api: atomic: rename release ordering

2016-01-08 Thread Petri Savolainen
Rename release ordering from _rls_ to _rel_ since it matches better with _acq_rel_, which is going to be used for C11 memory_order_acq_rel order. Signed-off-by: Petri Savolainen --- include/odp/api/atomic.h| 8 platform/linux-generic/include/odp/atomic.h | 6

[lng-odp] [API-NEXT PATCH 00/13] atomi api completion

2016-01-08 Thread Petri Savolainen
the API). Additional operations can be added later if needed. Only commonly needed combinations of non-relaxed operations will be supported (added based on use case as any other ODP API). This set should already enable major part of lock-free algorithms. Petri Savolainen (13): api: atomic

[lng-odp] [API-NEXT PATCH 2/2] api: init: align enum type naming

2016-01-07 Thread Petri Savolainen
All ODP API enums are typedef'd and type name has a '_t' post-fix. Signed-off-by: Petri Savolainen --- include/odp/api/init.h| 8 platform/linux-generic/odp_weak.c | 2 +- test/validation/init/init.c | 4 ++-- 3 files changed, 7 insertions(+), 7 del

[lng-odp] [API-NEXT PATCH 2/5] api: cpu: added pause call

2016-01-05 Thread Petri Savolainen
Pause is used in tight loops to reduce stress to the system. Signed-off-by: Petri Savolainen --- include/odp/api/cpu.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h index 8a804d4..4cbaf58 100644 --- a/include/odp/api/cpu.h +++ b

[lng-odp] [API-NEXT PATCH 3/5] linux-generic: cpu: implemented pause

2016-01-05 Thread Petri Savolainen
Implemented pause as an inline function in a cpu arch dependent header file. Signed-off-by: Petri Savolainen --- helper/Makefile.am| 2 ++ platform/linux-generic/Makefile.am| 4 +++- platform/linux-generic/Makefile.inc | 1

[lng-odp] [API-NEXT PATCH 1/5] linux-generic: arch: renamed cpu arch files

2016-01-05 Thread Petri Savolainen
These arch depedent files are not limited to cpu_cycle calls implementation only. Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 8 ++-- platform/linux-generic/arch/linux/odp_cpu_arch.c | 48 ++ platform/linux-generic/arch/linux

[lng-odp] [API-NEXT PATCH 5/5] linux-generic: removed spin_internal

2016-01-05 Thread Petri Savolainen
Removed odp_spin() and replaced usage with odp_cpu_pause(). Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 1 - platform/linux-generic/include/odp_spin_internal.h | 58 -- platform/linux-generic/odp_barrier.c | 4

[lng-odp] [API-NEXT PATCH 4/5] helper: deleted odph_pause

2016-01-05 Thread Petri Savolainen
Deleted odph_pause() and replaced usage with odp_cpu_pause() calls. Signed-off-by: Petri Savolainen --- helper/Makefile.am | 1 - helper/odph_pause.h | 54 helper/ring.c| 10 +++-- helper/test/Makefile.am | 2

[lng-odp] [API-NEXT PATCH 2/2] api: thrmask: documented string format

2016-01-04 Thread Petri Savolainen
Documented string format for odp_thrmask_from_str() and _to_str(). Format is permissive in input, but fixed on output. Signed-off-by: Petri Savolainen --- include/odp/api/thrmask.h | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/include/odp

[lng-odp] [API-NEXT PATCH 1/2] api: cpumask: documented string format

2016-01-04 Thread Petri Savolainen
Documented string format for odp_cpumask_from_str() and _to_str(). Format is permissive in input, but fixed on output. Signed-off-by: Petri Savolainen --- include/odp/api/cpumask.h | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/include/odp/api

[lng-odp] [API-NEXT RFC 4/5] api: queue: added QUEUE_TYPE_SINK

2015-12-29 Thread Petri Savolainen
Application cannot dequeue from sink queues, it can only enqueue. This queue type can be used for packet output, but also for other ODP features that will consume all enqueued events. Signed-off-by: Petri Savolainen --- include/odp/api/queue.h | 9

[lng-odp] [API-NEXT RFC 3/5] api: pktio: rename pktin and pktout modes

2015-12-29 Thread Petri Savolainen
V/_SEND) are renamed to _DIRECT, which is future proof to support additional direct calls (in addition to _recv() and _send()) for packet input/output. Signed-off-by: Petri Savolainen --- example/classifier/odp_classifier.c| 2 +- example/generator/odp_generator.c

[lng-odp] [API-NEXT RFC 2/5] api: queue: rename QUEUE_TYPE_POLL to _DIRECT

2015-12-29 Thread Petri Savolainen
using the scheduler). Signed-off-by: Petri Savolainen --- example/generator/odp_generator.c | 6 +++--- example/ipsec/odp_ipsec.c | 6 +++--- include/odp/api/queue.h| 2 +- platform/linux-generic/

[lng-odp] [API-NEXT RFC 5/5] api: pktio: added PKTOUT_MODE_SINK_QUEUE

2015-12-29 Thread Petri Savolainen
it's the one sending packets out). Signed-off-by: Petri Savolainen --- include/odp/api/packet_io.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 55d5d81..169edba 100644 --- a/include/odp/api/packet_io.h +++ b/include/od

<    2   3   4   5   6   7   8   9   10   11   >