[lng-odp] [API-NEXT PATCH v4 21/23] validation: pktio: honour pool capability limits

2016-11-21 Thread Petri Savolainen
Check pool capability limits for packet length and segment length, and do not exceed those. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/validation/api/pktio/pktio.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff

[lng-odp] [API-NEXT PATCH v4 00/23] pool optimization

2016-11-21 Thread Petri Savolainen
Brooks <brian.bro...@linaro.org> Petri Savolainen (23): linux-gen: ipc: disable build of ipc pktio linux-gen: pktio: do not free zero packets linux-gen: ring: created common ring implementation linux-gen: align: added round up power of two linux-gen: pool: reimplement pool with ring lin

[lng-odp] [API-NEXT PATCH v4 11/23] test: validation: buf: test alignment

2016-11-21 Thread Petri Savolainen
Added checks for correct alignment. Also updated tests to call odp_pool_param_init() for parameter initialization. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/validation/api/buffer/buffer.c | 113 +--- 1 file changed, 63 insertions(

[lng-odp] [API-NEXT PATCH v4 22/23] linux-gen: pool: check pool parameters

2016-11-21 Thread Petri Savolainen
Check pool parameters against maximum capabilities. Also defined a limit for maximum buffer and user area sizes. Chose 10 MB as a limit since it's small enough to be available in all Linux systems and it should be more than enough for normal pool usage. Signed-off-by: Petri Savolainen

[lng-odp] [API-NEXT PATCH v4 06/23] linux-gen: ring: added multi enq and deq

2016-11-21 Thread Petri Savolainen
Added multi-data versions of ring enqueue and dequeue operations. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_ring_internal.h | 65 ++ 1 file changed, 65 insertions(+) diff --git a/platform/linux-generic/i

[lng-odp] [API-NEXT PATCH v4 07/23] linux-gen: pool: use ring multi enq and deq operations

2016-11-21 Thread Petri Savolainen
Use multi enq and deq operations to optimize global pool access performance. Temporary uint32_t arrays are needed since handles are pointer size variables. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_pool.c | 32 -

[lng-odp] [API-NEXT PATCH v4 18/23] linux-gen: packet: remove zero len support from alloc

2016-11-21 Thread Petri Savolainen
Remove support for zero length allocations which were never required by the API specification or tested by the validation suite. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_packet.c | 28 1 file changed, 28 del

[lng-odp] [API-NEXT PATCH v4 20/23] validation: crypto: honour pool capability limits

2016-11-21 Thread Petri Savolainen
Reduced oversized packet length and segment length requirements from 32 kB to 1 kB (tens of bytes are actually used). Also check that lengths are not larger than pool capabilities for those. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/validation/api/

[lng-odp] [API-NEXT PATCH v4 23/23] linux-gen: packet: enable multi-segment packets

2016-11-21 Thread Petri Savolainen
Enable segmentation support with CONFIG_PACKET_MAX_SEGS configuration option. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_config_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-g

[lng-odp] [API-NEXT PATCH v4 04/23] linux-gen: align: added round up power of two

2016-11-21 Thread Petri Savolainen
Added a macro to round up a value to the next power of two, if it's not already a power of two. Also removed duplicated code from the same file. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_align_internal.h | 34 +-

[lng-odp] [API-NEXT PATCH v4 19/23] linux-gen: socket: use trunc instead of pull tail

2016-11-21 Thread Petri Savolainen
This is a bug correction for multi-segment packet handling. Packet pull tail cannot decrement packet length more than there are data in the last segment. Trunc tail must be used instead. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/pktio/socket.

[lng-odp] [API-NEXT PATCH v4 14/23] test: validation: packet: fix bugs in tailroom and concat tests

2016-11-21 Thread Petri Savolainen
to concatenate two copies of the same packet. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/validation/api/packet/packet.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/common_plat/validation/api/packet/packe

[lng-odp] [API-NEXT PATCH v4 02/23] linux-gen: pktio: do not free zero packets

2016-11-21 Thread Petri Savolainen
In some error cases, netmap and dpdk pktios were calling odp_packet_free_multi with zero packets. Moved existing error check to avoid a free call with zero packets. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/pktio/dpdk.c | 10 ++ pl

[lng-odp] [API-NEXT PATCH v4 01/23] linux-gen: ipc: disable build of ipc pktio

2016-11-21 Thread Petri Savolainen
IPC pktio implementation depends heavily on pool internals. It's build is disabled due to pool re-implementation. IPC should be re-implemented with a cleaner internal interface towards pool and shm. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic

[lng-odp] [API-NEXT DRAFT] api: ipsec: added IPSEC API

2016-11-15 Thread Petri Savolainen
Added definitions for a look-a-side IPSEC offload API. In addition to IPSEC packet transformations, it also supports: * inbound SA look up * outbound IP fragmentation Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- include/odp/api/spec/event.h

[lng-odp] [API-NEXT PATCH v3 05/19] linux-gen: pool: reimplement pool with ring

2016-11-10 Thread Petri Savolainen
) to limit the number of modification in the commit. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../include/odp/api/plat/pool_types.h |6 - .../linux-generic/include/odp_buffer_inlines.h | 160 +-- .../linux-generic/include/odp_buffer_internal.h

[lng-odp] [API-NEXT PATCH v3 15/19] linux-gen: packet: added support for segmented packets

2016-11-10 Thread Petri Savolainen
Added support for multi-segmented packets. The first segments is the packet descriptor, which contains all metadata and pointers to other segments. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../include/odp/api/plat/packet_types.h| 6 +- .../linux-g

[lng-odp] [API-NEXT PATCH v3 09/19] linux-gen: pool: clean up pool inlines functions

2016-11-10 Thread Petri Savolainen
. Renamed odp_buffer_pool_headroom() and _tailroom() to simply pool_headroom() and _tailroom(), since those are internal functions (not API as previous names hint). Also moved those into pool.c, since inlining is not needed for functions that are called only in (netmap) init phase. Signed-off-by: Petri

[lng-odp] [API-NEXT PATCH v3 03/19] linux-gen: ring: created common ring implementation

2016-11-10 Thread Petri Savolainen
Moved scheduler ring code into a new header file, so that it can be used also in other parts of the implementation. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp_ring_inte

[lng-odp] [API-NEXT PATCH v3 08/19] linux-gen: pool: optimize buffer alloc

2016-11-10 Thread Petri Savolainen
Round up global pool allocations to a burst size. Cache any extra buffers for future use. Prefetch buffers header which very newly allocated from global pool and will be returned to the caller. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/i

[lng-odp] [API-NEXT PATCH v3 11/19] test: validation: buf: test alignment

2016-11-10 Thread Petri Savolainen
Added checks for correct alignment. Also updated tests to call odp_pool_param_init() for parameter initialization. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/validation/api/buffer/buffer.c | 113 +--- 1 file changed, 63 insertions(

[lng-odp] [API-NEXT PATCH v3 10/19] linux-gen: pool: ptr instead of hdl in buffer_alloc_multi

2016-11-10 Thread Petri Savolainen
Improve performance by changing the first parameter of buffer_alloc_multi() to pool pointer (from handle), to avoid double lookup of the pool pointer. Pointer is available for packet alloc calls already. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-g

[lng-odp] [API-NEXT PATCH v3 07/19] linux-gen: pool: use ring multi enq and deq operations

2016-11-10 Thread Petri Savolainen
Use multi enq and deq operations to optimize global pool access performance. Temporary uint32_t arrays are needed since handles are pointer size variables. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_pool.c | 32 -

[lng-odp] [API-NEXT PATCH v3 00/19] pool optimization

2016-11-10 Thread Petri Savolainen
in align macro v1 reviews: Reviewed-by: Brian Brooks <brian.bro...@linaro.org> Petri Savolainen (19): linux-gen: ipc: disable build of ipc pktio linux-gen: pktio: do not free zero packets linux-gen: ring: created common ring implementation linux-gen: align: added round up power

[lng-odp] [API-NEXT PATCH v3 13/19] test: correctly initialize pool parameters

2016-11-10 Thread Petri Savolainen
Use odp_pool_param_init() to initialize pool parameters. Also pktio test must use capability to determine maximum packet segment length. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- example/generator/odp_generator.c | 2 +- test/common_plat/validati

[lng-odp] [API-NEXT PATCH v3 12/19] test: performance: crypto: use capability to select max packet

2016-11-10 Thread Petri Savolainen
Applications must use pool capabilibty to check maximum values for parameters. Used maximum segment length since application seems to support only single segment packets. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/performance/odp_crypto.

[lng-odp] [API-NEXT PATCH v3 18/19] linux-gen: packet: remove zero len support from alloc

2016-11-10 Thread Petri Savolainen
Remove support for zero length allocations which were never required by the API specification or tested by the validation suite. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_packet.c | 28 1 file changed, 28 del

[lng-odp] [API-NEXT PATCH v3 17/19] api: packet: added limits for packet len on alloc

2016-11-10 Thread Petri Savolainen
the maximum packet length to be allocated from the pool. Implementations may use this information to optimize e.g. memory usage, etc. Application must not exceed the max_len parameter value on alloc calls. Pool capabilities define already max_len. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.

[lng-odp] [API-NEXT PATCH v3 16/19] test: validation: packet: improved multi-segment alloc test

2016-11-10 Thread Petri Savolainen
Added test cases to allocate and free multiple multi-segment packets. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/validation/api/packet/packet.c | 73 +++-- 1 file changed, 68 insertions(+), 5 deletions(-) diff --git a/test/commo

[lng-odp] [API-NEXT PATCH v3 14/19] test: validation: packet: fix bugs in tailroom and concat tests

2016-11-10 Thread Petri Savolainen
to concatenate two copies of the same packet. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/validation/api/packet/packet.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/common_plat/validation/api/packet/packe

[lng-odp] [API-NEXT PATCH v3 06/19] linux-gen: ring: added multi enq and deq

2016-11-10 Thread Petri Savolainen
Added multi-data versions of ring enqueue and dequeue operations. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_ring_internal.h | 65 ++ 1 file changed, 65 insertions(+) diff --git a/platform/linux-generic/i

[lng-odp] [API-NEXT PATCH v3 04/19] linux-gen: align: added round up power of two

2016-11-10 Thread Petri Savolainen
Added a macro to round up a value to the next power of two, if it's not already a power of two. Also removed duplicated code from the same file. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_align_internal.h | 34 +-

[lng-odp] [API-NEXT PATCH v3 02/19] linux-gen: pktio: do not free zero packets

2016-11-10 Thread Petri Savolainen
In some error cases, netmap and dpdk pktios were calling odp_packet_free_multi with zero packets. Moved existing error check to avoid a free call with zero packets. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/pktio/dpdk.c | 10 ++ pl

[lng-odp] [API-NEXT PATCH v3 19/19] linux-gen: packet: enable multi-segment packets

2016-11-10 Thread Petri Savolainen
Enable segmentation support with CONFIG_PACKET_MAX_SEGS configuration option. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_config_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-g

[lng-odp] [API-NEXT PATCH v3 01/19] linux-gen: ipc: disable build of ipc pktio

2016-11-10 Thread Petri Savolainen
IPC pktio implementation depends heavily on pool internals. It's build is disabled due to pool re-implementation. IPC should be re-implemented with a cleaner internal interface towards pool and shm. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic

[lng-odp] [API-NEXT PATCH v2 05/10] linux-gen: pool: reimplement pool with ring

2016-10-21 Thread Petri Savolainen
) to limit the number of modification in the commit. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../include/odp/api/plat/pool_types.h |6 - .../linux-generic/include/odp_buffer_inlines.h | 160 +-- .../linux-generic/include/odp_buffer_internal.h

[lng-odp] [API-NEXT PATCH v2 09/10] linux-gen: pool: clean up pool inlines functions

2016-10-21 Thread Petri Savolainen
. Renamed odp_buffer_pool_headroom() and _tailroom() to simply pool_headroom() and _tailroom(), since those are internal functions (not API as previous names hint). Also moved those into pool.c, since inlining is not needed for functions that are called only in (netmap) init phase. Signed-off-by: Petri

[lng-odp] [API-NEXT PATCH v2 03/10] linux-gen: ring: created common ring implementation

2016-10-21 Thread Petri Savolainen
Moved scheduler ring code into a new header file, so that it can be used also in other parts of the implementation. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp_ring_inte

[lng-odp] [API-NEXT PATCH v2 10/10] linux-gen: pool: ptr instead of hdl in buffer_alloc_multi

2016-10-21 Thread Petri Savolainen
Improve performance by changing the first parameter of buffer_alloc_multi() to pool pointer (from handle), to avoid double lookup of the pool pointer. Pointer is available for packet alloc calls already. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-g

[lng-odp] [API-NEXT PATCH v2 00/10] pool optimization

2016-10-21 Thread Petri Savolainen
-by: Brian Brooks <brian.bro...@linaro.org> Petri Savolainen (10): linux-gen: ipc: disable build of ipc pktio linux-gen: pktio: do not free zero packets linux-gen: ring: created common ring implementation linux-gen: align: added round up power of two linux-gen: pool: reimplemen

[lng-odp] [API-NEXT PATCH v2 06/10] linux-gen: ring: added multi enq and deq

2016-10-21 Thread Petri Savolainen
Added multi-data versions of ring enqueue and dequeue operations. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_ring_internal.h | 65 ++ 1 file changed, 65 insertions(+) diff --git a/platform/linux-generic/i

[lng-odp] [API-NEXT PATCH v2 07/10] linux-gen: pool: use ring multi enq and deq operations

2016-10-21 Thread Petri Savolainen
Use multi enq and deq operations to optimize global pool access performance. Temporary uint32_t arrays are needed since handles are pointer size variables. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_pool.c | 32 -

[lng-odp] [API-NEXT PATCH v2 04/10] linux-gen: align: added round up power of two

2016-10-21 Thread Petri Savolainen
Added a macro to round up a value to the next power of two, if it's not already a power of two. Also removed duplicated code from the same file. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_align_internal.h | 34 +-

[lng-odp] [API-NEXT PATCH v2 02/10] linux-gen: pktio: do not free zero packets

2016-10-21 Thread Petri Savolainen
In some error cases, netmap and dpdk pktios were calling odp_packet_free_multi with zero packets. Moved existing error check to avoid a free call with zero packets. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/pktio/dpdk.c | 10 ++ pl

[lng-odp] [API-NEXT PATCH v2 01/10] linux-gen: ipc: disable build of ipc pktio

2016-10-21 Thread Petri Savolainen
IPC pktio implementation depends heavily on pool internals. It's build is disabled due to pool re-implementation. IPC should be re-implemented with a cleaner internal interface towards pool and shm. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-g

[lng-odp] [PATCH 05/10] linux-gen: pool: reimplement pool with ring

2016-10-19 Thread Petri Savolainen
) to limit the number of modification in the commit. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../include/odp/api/plat/pool_types.h |6 - .../linux-generic/include/odp_buffer_inlines.h | 160 +-- .../linux-generic/include/odp_buffer_internal.h

[lng-odp] [PATCH 09/10] linux-gen: pool: clean up pool inlines functions

2016-10-19 Thread Petri Savolainen
. Renamed odp_buffer_pool_headroom() and _tailroom() to simply pool_headroom() and _tailroom(), since those are internal functions (not API as previous names hint). Also moved those into pool.c, since inlining is not needed for functions that are called only in (netmap) init phase. Signed-off-by: Petri

[lng-odp] [PATCH 03/10] linux-gen: ring: created common ring implementation

2016-10-19 Thread Petri Savolainen
Moved scheduler ring code into a new header file, so that it can be used also in other parts of the implementation. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp_ring_inte

[lng-odp] [PATCH 08/10] linux-gen: pool: optimize buffer alloc

2016-10-19 Thread Petri Savolainen
Round up global pool allocations to a burst size. Cache any extra buffers for future use. Prefetch buffers header which very newly allocated from global pool and will be returned to the caller. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/i

[lng-odp] [PATCH 10/10] linux-gen: pool: ptr instead of hdl in buffer_alloc_multi

2016-10-19 Thread Petri Savolainen
Improve performance by changing the first parameter of buffer_alloc_multi() to pool pointer (from handle), to avoid double lookup of the pool pointer. Pointer is available for packet alloc calls already. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-g

[lng-odp] [PATCH 06/10] linux-gen: ring: added multi enq and deq

2016-10-19 Thread Petri Savolainen
Added multi-data versions of ring enqueue and dequeue operations. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_ring_internal.h | 65 ++ 1 file changed, 65 insertions(+) diff --git a/platform/linux-generic/i

[lng-odp] [PATCH 00/10] pool optimization

2016-10-19 Thread Petri Savolainen
. Otherwise, all cases were improved. Especially, scheduler driven cases suffered on bad pool scalability. Petri Savolainen (10): linux-gen: ipc: disable build of ipc pktio linux-gen: pktio: do not free zero packets linux-gen: ring: created common ring implementation linux-gen: align: added round

[lng-odp] [PATCH 04/10] linux-gen: align: added round up power of two

2016-10-19 Thread Petri Savolainen
Added a macro to round up a value to the next power of two, if it's not already a power of two. Also removed duplicated code from the same file. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_align_internal.h | 34 +-

[lng-odp] [PATCH 07/10] linux-gen: pool: use ring multi enq and deq operations

2016-10-19 Thread Petri Savolainen
Use multi enq and deq operations to optimize global pool access performance. Temporary uint32_t arrays are needed since handles are pointer size variables. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_pool.c | 32 -

[lng-odp] [PATCH 02/10] linux-gen: pktio: do not free zero packets

2016-10-19 Thread Petri Savolainen
In some error cases, netmap and dpdk pktios were calling odp_packet_free_multi with zero packets. Moved existing error check to avoid a free call with zero packets. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/pktio/dpdk.c | 10 ++ pl

[lng-odp] [PATCH 01/10] linux-gen: ipc: disable build of ipc pktio

2016-10-19 Thread Petri Savolainen
IPC pktio implementation depends heavily on pool internals. It's build is disabled due to pool re-implementation. IPC should be re-implemented with a cleaner internal interface towards pool and shm. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-g

[lng-odp] [PATCH v2] linux-gen: build: de-couple abi compatibility from shared lib

2016-09-29 Thread Petri Savolainen
performance difference when e.g. odp_atomic_xxx calls are not inlined. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- configure.ac | 26 - platform/linux-generic/.gitignore | 2 +- platform/linux-g

[lng-odp] [PATCH 3/6] linux-gen: ticketlock: inline ticketlock implementation

2016-09-15 Thread Petri Savolainen
Moved ticketlock implementation into ticketlock_inlines.h header file, which enables inlined version to be used inside implementation and through API. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/Makefile.am | 1 + .../include/o

[lng-odp] [PATCH 2/6] linux-gen: queue: burst enq and deq

2016-09-15 Thread Petri Savolainen
Added support for a buffer header to carry a burst of buffer pointers. The buffer itself is the last one a burst. Burst are built with a enq_multi call, so single enq operations do not benefit from it. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/i

[lng-odp] [PATCH 1/6] linux-gen: queue: reuse enq_ and deq_multi

2016-09-15 Thread Petri Savolainen
is fixed to 1). Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_schedule_if.h | 3 - platform/linux-generic/odp_queue.c | 134 +++ platform/linux-generic/odp_schedule.c| 1 - platform/linux-g

[lng-odp] [PATCH 4/6] linux-gen: queue: use inlined ticketlock

2016-09-15 Thread Petri Savolainen
Use inlined ticketlock calls instead of API calls. Inlining improves performance and makes it easier to profile functions which use ticketlocks. Cycle consumption of caller functions are more interesting than combined cycle consumption of all ticketlocks. Signed-off-by: Petri Savolainen

[lng-odp] [PATCH 6/6] linux-gen: config: increase burst sizes

2016-09-15 Thread Petri Savolainen
Added main burst size configuration option (CONFIG_BURST_SIZE), which helps to keep various burst sizes in sync. Increased common burst size from 8 to 16. This increases scheduled queue throughput about 30-40%. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform

[lng-odp] [PATCH 5/6] linux-gen: pool: use inlined ticketlock

2016-09-15 Thread Petri Savolainen
Use inlined ticketlock calls instead of API calls. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/include/odp_pool_internal.h | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/platform/linux-generic/i

[lng-odp] [PATCH 2/3] test: l2fwd: lockless output queues in sched mode

2016-09-15 Thread Petri Savolainen
which queues workers are using (only tx in sched mode). Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/performance/odp_l2fwd.c | 221 --- 1 file changed, 112 insertions(+), 109 deletions(-) diff --git a/test/common_plat/perfo

[lng-odp] [PATCH 1/3] test: l2fwd: lookup table for sched mode

2016-09-15 Thread Petri Savolainen
Replaced linear destination port search in scheduler mode with a lookup table. Table index is API provided pktio_index and data is application port index. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/performance/odp_l2fwd.

[lng-odp] [PATCH 3/3] test: l2fwd: add missing output event queue read

2016-09-15 Thread Petri Savolainen
Non-sched modes were missing update of output event queue handle in the case of multiple pktios per thread. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/performance/odp_l2fwd.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/test/commo

[lng-odp] [PATCH v2] linux-gen: build: de-couple abi compatibility from shared lib

2016-09-14 Thread Petri Savolainen
performance difference when e.g. odp_atomic_xxx calls are not inlined. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- v2: * ABI compat enabled by default * print static/shared/abi_compat selection in config results * added missing header file include guards config

[lng-odp] [PATCH] linux-gen: build: de-couple abi compatibility from shared lib

2016-09-08 Thread Petri Savolainen
performance difference when e.g. odp_atomic_xxx calls are not inlined. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- configure.ac | 20 - platform/linux-generic/.gitignore | 1 - platform/linux-generic/i

[lng-odp] [PATCH v2] test: l2fwd: remove wait time from sched mode

2016-09-05 Thread Petri Savolainen
Application requested 100ms timeout for no reason in the scheduler mode. For example on odp-linux, performance is improved about 10% when the timeout is removed (as time keeping creates system calls). Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/perfo

[lng-odp] [PATCH v2 1/6] linux-gen: sched: ring based priority queues

2016-09-05 Thread Petri Savolainen
. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_schedule_internal.h | 3 +- platform/linux-generic/odp_schedule.c | 259 + 2 files changed, 168 insertions(+), 94 deletions(-) diff --git a/platform/linux-g

[lng-odp] [PATCH v2 5/6] linux-gen: sched: increase max dequeue batch size

2016-09-05 Thread Petri Savolainen
Increased queue dequeue batch size to improve throughput. Low priority queues have smaller batch size than high/default, so that head of line blocking latency is limited. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_schedule_internal.h

[lng-odp] [PATCH v2 4/6] linux-gen: sched: pktio poll loop optimization

2016-09-05 Thread Petri Savolainen
Optimized pktio poll loop if-branches with likely/unlikely hints. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_schedule.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/platform/linux-g

[lng-odp] [PATCH v2 0/6] scheduler rings

2016-09-05 Thread Petri Savolainen
310s speed up1,181,331,472,85 Petri Savolainen (6): linux-gen: sched: ring based priority queues linux-gen: sched: ring based pktio command queues linux-gen: sched: increase number of pktin linux-gen: sched: pktio poll loop optimization linux-gen: sched: increase max

[lng-odp] [PATCH v2 6/6] linux-gen: sched: call schedule_release_atomic directly

2016-09-05 Thread Petri Savolainen
Use local schedule_release_atomic call instead of the API call. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_schedule.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/platform/linux-g

[lng-odp] [PATCH v2 3/6] linux-gen: sched: increase number of pktin

2016-09-05 Thread Petri Savolainen
Increased maximum number of pktin queues supported by the scheduler. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_schedule.c b/platform

[lng-odp] [PATCH] test: l2fwd: remove wait time from sched mode

2016-09-02 Thread Petri Savolainen
Application requested 100ms timeout for no reason in the scheduler mode. For example on odp-linux, performance is improved about 10% when the timeout is removed (as time keeping creates system calls). Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/common_plat/perfo

[lng-odp] [PATCH 2/6] linux-gen: sched: ring based pktio command queues

2016-09-01 Thread Petri Savolainen
Implement scheduler pktio poll command queues with a ring based data structure instead of odp_queue_t queues. Also scheduler initialization and termination is simplified as there is no more dependency to pool, buffer and queue APIs. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.

[lng-odp] [PATCH 1/6] linux-gen: sched: ring based priority queues

2016-09-01 Thread Petri Savolainen
. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_schedule_internal.h | 3 +- platform/linux-generic/odp_schedule.c | 259 + 2 files changed, 168 insertions(+), 94 deletions(-) diff --git a/platform/linux-g

[lng-odp] [PATCH 5/6] linux-gen: sched: increase max dequeue batch size

2016-09-01 Thread Petri Savolainen
Increased queue dequeue batch size to improve throughput. Low priority queues have smaller batch size than high/default, so that head of line blocking latency is limited. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_schedule_internal.h

[lng-odp] [PATCH 4/6] linux-gen: sched: pktio poll loop optimization

2016-09-01 Thread Petri Savolainen
Optimized pktio poll loop if-branches with likely/unlikely hints. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_schedule.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/platform/linux-g

[lng-odp] [PATCH 6/6] linux-gen: sched: call schedule_release_atomic directly

2016-09-01 Thread Petri Savolainen
Use local schedule_release_atomic call instead of the API call. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_schedule.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/platform/linux-g

[lng-odp] [PATCH 3/6] linux-gen: sched: increase number of pktin

2016-09-01 Thread Petri Savolainen
Increased maximum number of pktin queues supported by the scheduler. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_schedule.c b/platform

[lng-odp] [PATCH 0/6] scheduler rings

2016-09-01 Thread Petri Savolainen
of odp_scheduling: - cores 4 8 10 20 master 15,3s 62,5s 109s884,9s patch 13s 47s 74s 310s speed up1,181,331,472,85 Petri Savolainen (6): linux

[lng-odp] [PATCH] linux-gen: sched: keep scheduling over empty queues

2016-08-15 Thread Petri Savolainen
scheduler scheduling a priority queue until an event is found or the queue is empty (over empty or destroyed queues). This fixes bug https://bugs.linaro.org/show_bug.cgi?id=2457 Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_schedule.

[lng-odp] [PATCH] linux-gen: pool: optimize thread local buffer cache

2016-07-08 Thread Petri Savolainen
pool functions (get_buf(), ret_buf(), etc) were moved from pool header to c source file, since those were actual local to the c source file. Also some unused pool variables are removed also. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/i

[lng-odp] [PATCH] linux-gen: pool: optimize local cache

2016-07-08 Thread Petri Savolainen
Optimize local cache implementation. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- .../linux-generic/include/odp_buffer_inlines.h | 26 +- .../linux-generic/include/odp_buffer_internal.h| 5 +- platform/linux-generic/include/odp_internal.h | 2 - ...

[lng-odp] [PATCH v2 3/4] linux-gen: std_types: remove extra c headers

2016-07-04 Thread Petri Savolainen
are not part of the API (where as uint64_t, etc types). Application needs to include other C library headers directly. ODP API does not specify which headers are included by odp_api.h. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- example/classifier/odp_classi

[lng-odp] [PATCH v2 1/4] linux-gen: cpumask: remove dependency to sched.h

2016-07-04 Thread Petri Savolainen
, and with or without any (e.g. GNU) extensions. The odp_cpumask_t is defined with equal (or larger) size to Linux cpu_set_t and this is verified with build time asserts. Linux CPU_SET macros are used to access the mask as before. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform

[lng-odp] [PATCH v2 4/4] example: hello: add hello world example application

2016-07-04 Thread Petri Savolainen
This is a minimal application which demonstrates the startup and shutdown steps of an ODP application. It can be also used to debug API related build problems, etc. It does not use helpers to minimize dependency to anything else than the ODP API header file. Signed-off-by: Petri Savolainen

[lng-odp] [PATCH v2 0/4] C header clean up

2016-07-04 Thread Petri Savolainen
a minimal application and thus does not use any helpers. v2: * Corrected build problems in various pktio configuration combinations * Added comment about purpose of the hello world application in odp_hello.c Petri Savolainen (4): linux-gen: cpumask: remove dependency to sched.h linux-gen

[lng-odp] [PATCH v2 2/4] linux-gen: byteorder: remove dependency to linux headers

2016-07-04 Thread Petri Savolainen
Platform specific API files included endian.h and asm/byteorder.h. These are Linux headers and should not be visible to application through odp_api.h. Used __ORDER_LITTLE_ENDIAN__, etc instead which are supported by both gcc and clang. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.

[lng-odp] [PATCH 3/4] linux-gen: std_types: remove extra c headers

2016-07-01 Thread Petri Savolainen
are not part of the API (where as uint64_t, etc types). Application needs to include other C library headers directly. ODP API does not specify which headers are included by odp_api.h. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- example/classifier/odp_classi

[lng-odp] [PATCH 1/4] linux-gen: cpumask: remove dependency to sched.h

2016-07-01 Thread Petri Savolainen
, and with or without any (e.g. GNU) extensions. The odp_cpumask_t is defined with equal (or larger) size to Linux cpu_set_t and this is verified with build time asserts. Linux CPU_SET macros are used to access the mask as before. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform

[lng-odp] [PATCH 4/4] example: hello: add hello world example application

2016-07-01 Thread Petri Savolainen
This is a minimal application which demostrates the startup and shutdown steps of an ODP application. It can be also used to debug API related build problems, etc. It does not use helpers to minimize dependencies to anything else than the ODP API header file. Signed-off-by: Petri Savolainen

[lng-odp] [PATCH 0/4] C header clean up

2016-07-01 Thread Petri Savolainen
a minimal application and thus does not use any helpers. Petri Savolainen (4): linux-gen: cpumask: remove dependency to sched.h linux-gen: byteorder: remove dependency to linux headers linux-gen: std_types: remove extra c headers example: hello: add hello world example application example

[lng-odp] [PATCH 2/4] linux-gen: byteorder: remove dependency to linux headers

2016-07-01 Thread Petri Savolainen
Platform specific API files included endian.h and asm/byteorder.h. These are Linux headers and should not be visible to application through odp_api.h. Used __ORDER_LITTLE_ENDIAN__, etc instead which are supported by both gcc and clang. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.

[lng-odp] [PATCH] validation: queue: fix table overrun bug

2016-06-29 Thread Petri Savolainen
Set num_queues correctly also when the first queue create fails (i == 0). This fixes bug https://bugs.linaro.org/show_bug.cgi?id=2377 Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/validation/queue/queue.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[lng-odp] [PATCH 1/4] test: queue: add capability test

2016-06-22 Thread Petri Savolainen
Test queue capability API and create the maximum number of queues. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- platform/linux-generic/odp_queue.c | 5 ++- test/validation/queue/queue.c | 62 -- test/validation/queue/queue.h

[lng-odp] [PATCH 3/4] test: queue: cleanup variable naming

2016-06-22 Thread Petri Savolainen
Use single and short variable name for the queue. Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/validation/queue/queue.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/test/validation/queue/queue.c b/test/vali

[lng-odp] [PATCH 4/4] test: queue: do not dequeue from scheduled queue

2016-06-22 Thread Petri Savolainen
Correct queue validation test to dequeue from a plain queue. Dequeue from a scheduled queue is not permitted. Also cleaned up code by converting CU_ASSERT_EQUAL(foo, bar) to CU_ASSERT(foo == bar). This was the only validation test, which used CU_ASSERT_EQUAL. Signed-off-by: Petri Savolainen

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