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

2016-10-19 Thread Brian Brooks
Reviewed-by: Brian Brooks On 10/19 15:09:16, Petri Savolainen wrote: > Pool performance is optimized by using a ring as the global buffer storage. > IPC build is disabled, since it needs large modifications due to dependency > to > pool internals. Old pool

Re: [lng-odp] [PATCH 1/2] configure: the version cannot use a script

2016-10-19 Thread Brian Brooks
On 10/18 11:24:13, Mike Holmes wrote: > Use of a script in the autotools breaks github CI > Define the API version in configure and reuse it in the code > > Benefits: > removes dependence on scripts to build > removes scripts and the make file from odp/scripts > removes generated .scmversion file

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

2016-10-19 Thread Bill Fischofer
On Wed, Oct 19, 2016 at 8:00 AM, Maxim Uvarov wrote: > On 10/19/16 15:09, Petri Savolainen wrote: > >> 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. >> >>

Re: [lng-odp] [PATCH 2/2] add travis.yml for gitub automation

2016-10-19 Thread Brian Brooks
On 10/18 11:24:14, Mike Holmes wrote: > allows pushes to a github clone of ODP to automatically trigger CI builds > > Signed-off-by: Mike Holmes Reviewed-by: Brian Brooks > --- > .travis.yml | 35 +++ > 1 file

Re: [lng-odp] [API-NEXT PATCH 0/5] name argument definitions in *_create() functions

2016-10-19 Thread Bill Fischofer
For this series: Reviewed-and-tested-by: Bill Fischofer On Fri, Oct 14, 2016 at 3:49 AM, Matias Elo wrote: > This patch set improves name argument definitions in *_create() functions > to > clearly state when NULL is a valid value and when the

Re: [lng-odp] api-next drvshmem_main validation test failing

2016-10-19 Thread Elo, Matias (Nokia - FI/Espoo)
> >> There are Many interresting things in your log: > >> First, I think we are exceeding the (currentely 500Mb) limit of shmem > >> allocated with singleVA flag set here. In the test 1/3 of the CPU > >> allocates 64M, 1/3 allocate 8M and 1/3 8K. > >> > >> I don't have you settings, but if you

Re: [lng-odp] api-next drvshmem_main validation test failing

2016-10-19 Thread Christophe Milard
On 19 October 2016 at 10:00, Elo, Matias (Nokia - FI/Espoo) wrote: > > Hi Christophe, > >> There are Many interresting things in your log: >> First, I think we are exceeding the (currentely 500Mb) limit of shmem >> allocated with singleVA flag set here. In the test

Re: [lng-odp] api-next drvshmem_main validation test failing

2016-10-19 Thread Elo, Matias (Nokia - FI/Espoo)
Hi Christophe, > There are Many interresting things in your log: > First, I think we are exceeding the (currentely 500Mb) limit of shmem > allocated with singleVA flag set here. In the test 1/3 of the CPU > allocates 64M, 1/3 allocate 8M and 1/3 8K. > > I don't have you settings, but if you

[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 ---

[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 --- platform/linux-generic/include/odp_ring_internal.h | 65 ++ 1 file changed, 65 insertions(+) diff --git

[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 --- platform/linux-generic/odp_pool.c | 32 1

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

2016-10-19 Thread Petri Savolainen
Pool performance is optimized by using a ring as the global buffer storage. IPC build is disabled, since it needs large modifications due to dependency to pool internals. Old pool implementation was based on locks and linked list of buffer headers. New implementation maintain a ring of buffer

[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 --- .../linux-generic/include/odp_align_internal.h | 34 +- 1 file

[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 --- platform/linux-generic/pktio/dpdk.c | 10 ++

[lng-odp] [PATCH] linux-generic: config: add missing doxygen documentation for abi macros

2016-10-19 Thread Bill Fischofer
Fix Bug https://bugs.linaro.org/show_bug.cgi?id=2553 by adding missing doxygen documentation for the internal macros ODP_ABI_COMPAT and _STATIC. Signed-off-by: Bill Fischofer --- .../linux-generic/include/odp/api/plat/static_inline.h.in | 11 +++ 1 file

[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 ---

[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 ---

Re: [lng-odp] [API-NEXT PATCHv3 00/16] using _ishm as north API mem allocator

2016-10-19 Thread Bill Fischofer
For this series: Reviewed-and-tested-by: Bill Fischofer On Wed, Oct 19, 2016 at 10:29 AM, Christophe Milard < christophe.mil...@linaro.org> wrote: > since v2: > -some minor changes on the doc (Bill) > -doc for the ODP_SHM_EXPORT flag (Christophe) > -reduction of

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

2016-10-19 Thread Yi He
On 19 October 2016 at 20:57, Maxim Uvarov wrote: > On 10/19/16 15:09, Petri Savolainen wrote: > >> 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

[lng-odp] [Bug 2510] ODP build system broken

2016-10-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2510 Bill Fischofer changed: What|Removed |Added Resolution|--- |FIXED

Re: [lng-odp] [PATCH] validation: packet: remove todos from packet tests

2016-10-19 Thread Bill Fischofer
Ping. This trivial patch still needs a review. On Thu, Oct 6, 2016 at 8:09 AM, Maxim Uvarov wrote: > ping, please review. > > Maxim. > > > On 09/12/16 23:48, Bill Fischofer wrote: > >> Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2405 by removing >> todos in

[lng-odp] [Bug 2426] CID 164653: (INTEGER_OVERFLOW) traffic_mngr.c

2016-10-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2426 --- Comment #6 from Bill Fischofer --- Marked in Coverity as a false positive. The code is scanning internally-generated strings that are "known good". -- You are receiving this mail because: You are on the CC list for the

[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 --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/odp_ring_internal.h |

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

2016-10-19 Thread Maxim Uvarov
On 10/19/16 15:09, Petri Savolainen wrote: 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 --- platform/linux-generic/Makefile.am | 1 +

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

2016-10-19 Thread Maxim Uvarov
On 10/19/16 15:09, Petri Savolainen wrote: 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

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

2016-10-19 Thread Petri Savolainen
Used the ring data structure to implement pool. Also buffer structure was simplified to enable future driver interface. Every buffer includes a packet header, so each buffer can be used as a packet head or segment. Segmentation was disabled and segment size was fixed to a large number (64kB) to

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

2016-10-19 Thread Maxim Uvarov
On 10/19/16 15:09, Petri Savolainen wrote: 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 ---

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

2016-10-19 Thread Maxim Uvarov
On 10/19/16 15:09, Petri Savolainen wrote: 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 ---

[lng-odp] [API-NEXT PATCH] test: drv: shm: decrease test memory requirement

2016-10-19 Thread Christophe Milard
The memory consumption is proporsional to the number of ODP threads available. The test failed on systems with large number of CPU, due to outage ot pre-allocaed address space. This patch shrinks the test requirement. Signed-off-by: Christophe Milard ---

Re: [lng-odp] [API-NEXT PATCHv2 00/16] using _ishm as north API mem allocator

2016-10-19 Thread Mike Holmes
After todays call with Petris patches posted that also break IPC we came up with a plan. 1. sync api-next / master and make a point release to clear the air 2. merge into api next Christophes and Petris patches that break IPC 3. Maxim will fix IPC 4. make a new point release On 18 October 2016

[lng-odp] [API-NEXT PATCHv3 06/16] linux-gen: shm: new ODP_SHM_SINGLE_VA flag implementation

2016-10-19 Thread Christophe Milard
This flag guarentess the unicity the the block address on all ODP threads. The patch just exposes the _ODP_ISHM_SINGLE_VA flag of the internal memory allocator, ishm. Signed-off-by: Christophe Milard --- platform/linux-generic/odp_shared_memory.c | 1 + 1 file

[lng-odp] [API-NEXT PATCHv3 09/16] test: api: shmem: new proper tests for shm API

2016-10-19 Thread Christophe Milard
The shmem "sunnydays" tests for the north interface API are replaced with proper tests, testing memory allocation at different time (before and after ODP thread creation, i.e. the tests make sure shmem behaves the same regardless of fork time). The tests also include stress testing trying to

[lng-odp] [API-NEXT PATCHv3 13/16] test: linux-gen: api: shmem: test sharing memory between ODP instances

2016-10-19 Thread Christophe Milard
The platform tests odp/test/linux-generic/validation/api/shmem are updated to both test ODP<->linux process memory sharing, but also test ODP to ODP (different instances) memory sharing. shmem_linux is the main test process, and shmem_linux.c contains (at file top) a chart flow of the test

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

2016-10-19 Thread Bill Fischofer
On Wed, Oct 19, 2016 at 7:09 AM, Petri Savolainen < petri.savolai...@nokia.com> wrote: > Removed odp_pool_to_entry(), which was a duplicate of > pool_entry_from_hdl(). Renamed odp_buf_to_hdr() to > buf_hdl_to_hdr(), which describes more accurately the internal > function. Inlined pool_entry(),

[lng-odp] [API-NEXT PATCHv3 07/16] api: shm: add flag to lock memory

2016-10-19 Thread Christophe Milard
The ODP_SHM_LOCK flag is created: when set (at odp_shm_reserve()), this flag locks the reserved memory (prevent swapping) Signed-off-by: Christophe Milard --- include/odp/api/spec/shared_memory.h | 1 + 1 file changed, 1 insertion(+) diff --git

[lng-odp] [API-NEXT PATCHv3 01/16] linux-gen: _ishm: create link for external memory sharing

2016-10-19 Thread Christophe Milard
A new flag called _ODP_ISHM_LINK is added to _ishm. When this flag is specified at reserve() time, a link ("/tmp/odp--shm-" where is the process ID of the main ODP instatiation process and is the block name given at reserve time) is created, linking to the underlying block file (either in /tmp

[lng-odp] [API-NEXT PATCHv3 16/16] doc: updating docs for the shm interface extension

2016-10-19 Thread Christophe Milard
Signed-off-by: Christophe Milard --- doc/users-guide/users-guide.adoc | 68 ++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index

[lng-odp] [API-NEXT PATCHv3 15/16] linux_gen: _ishm: decreasing the number of error messages when no huge pages

2016-10-19 Thread Christophe Milard
Signed-off-by: Christophe Milard --- platform/linux-generic/_ishm.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index 11bb316..0c08998 100644 ---

[lng-odp] [API-NEXT PATCHv3 03/16] linux-gen: use ishm as north API mem allocator

2016-10-19 Thread Christophe Milard
The odp shared_memory API is changed to use the ODP internal memory allocator: _ishm. _ishm supports memory sharing between processes, regardless of fork time. The test testing the ODP_SHM_PROC flag is also changed to cope with the new OS sharing interface used by _ishm (link in /tmp).

[lng-odp] [API-NEXT PATCHv3 05/16] api: shm: add flag to guarantee address unicity on all ODP threads

2016-10-19 Thread Christophe Milard
The ODP_SHM_SINGLE_VA flag is created: when set (at odp_shm_reserve()), this flag guarantees that all ODP threads sharing this memory block will see the block at the same address (regadless of ODP thread type -pthread vs process- or fork time) Signed-off-by: Christophe Milard

[lng-odp] [API-NEXT PATCHv3 04/16] linux-gen: Push internal flag definition

2016-10-19 Thread Christophe Milard
File platform/linux-generic/include/odp_shm_internal.h exposes shm internals used by IPC. The bits used by the internal flags are moved to make room for more "official" values. The platform/linux-generic/include/odp_shm_internal.h file should really be removed when _ishm is used, but as long as we

[lng-odp] [API-NEXT PATCHv3 10/16] api: shmem: add flag and function to share memory between ODP instances

2016-10-19 Thread Christophe Milard
The flag ODP_SHM_EXPORT is added: when passed at odp_shm_reserve() time the memory block becomes visible to other ODP instances. The function odp_shm_reserve_exported() is added: this function enables to reserve block of memories exported by other ODP instances (using the ODP_SHM_EXPORT flag).

[lng-odp] [API-NEXT PATCHv3 08/16] linux-gen: shm: new ODP_SHM_LOCK flag implementation

2016-10-19 Thread Christophe Milard
The flag locks the allocated memory (prevent swapping) The patch just exposes the _ODP_ISHM_LOCK flag of the internal memory allocator, ishm. Signed-off-by: Christophe Milard --- platform/linux-generic/odp_shared_memory.c | 1 + 1 file changed, 1 insertion(+) diff

[lng-odp] [API-NEXT PATCHv3 14/16] linux-gen: _ishm: cleaning remaining block at odp_term_global

2016-10-19 Thread Christophe Milard
Remaining (forgotten, not freed) blocks are gathered and related files cleaned when odp_term_global() is called. An error message is also issued so the application writters get to know about these blocks Signed-off-by: Christophe Milard ---

Re: [lng-odp] [PATCH] linux-generic: config: add missing doxygen documentation for abi macros

2016-10-19 Thread Mike Holmes
On 19 October 2016 at 08:09, Bill Fischofer wrote: > Fix Bug https://bugs.linaro.org/show_bug.cgi?id=2553 by adding missing > doxygen documentation for the internal macros ODP_ABI_COMPAT and _STATIC. > > Signed-off-by: Bill Fischofer

Re: [lng-odp] clarification of pktout checksum offload feature

2016-10-19 Thread Bill Fischofer
Hi Maciej, sorry for the delay in getting a response to you on this. See inline. On Thu, Oct 13, 2016 at 6:33 AM, Maciej Czekaj < maciej.cze...@caviumnetworks.com> wrote: > > Guys, > > I was going to implement checksum offload for OFP project based on Monarch > checksum offload capability and I

[lng-odp] [API-NEXT PATCHv3 00/16] using _ishm as north API mem allocator

2016-10-19 Thread Christophe Milard
since v2: -some minor changes on the doc (Bill) -doc for the ODP_SHM_EXPORT flag (Christophe) -reduction of memory reguirement for shm tests (Mattias) since v1: -flag _ODP_SHM_PROC_NOCREAT and _ODP_SHM_O_EXCL get new values (but remain useless: Should be removed when IPC is updated) (Maxim) -In

[lng-odp] [API-NEXT PATCHv3 02/16] linux-gen: _ishm: allow memory alloc/free at global init/term

2016-10-19 Thread Christophe Milard
_ishm.c assumed that both _ishm_init_global() and _ishm_init_local() had been run to work properly. This assumption turns out the be a problem if _ishm is to be used as main memory allocator, as many modules init_global functions assume the availability of the odp_reserve() function before any

[lng-odp] [API-NEXT PATCHv3 12/16] linux-gen: shm: add flag and function to share memory between ODP instances

2016-10-19 Thread Christophe Milard
Implemented by calling the related functions from _ishm. Signed-off-by: Christophe Milard --- platform/linux-generic/odp_shared_memory.c | 37 ++ 1 file changed, 33 insertions(+), 4 deletions(-) diff --git

[lng-odp] [API-NEXT PATCHv3 11/16] linux-gen: _ishm: adding function to map memory from other ODP

2016-10-19 Thread Christophe Milard
functionality to export and map memory between ODP instance is added: This includes: - a bit of simplification in _odp_ishm_reserve() for externaly provided file descriptors. - a new function, _odp_ishm_reserve_exported() to map memory from other ODP instances (On same OS) Signed-off-by:

[lng-odp] [Bug 2553] doxygen: static_inline.h:21

2016-10-19 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2553 Bill Fischofer changed: What|Removed |Added CC|

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

2016-10-19 Thread Petri Savolainen
Removed odp_pool_to_entry(), which was a duplicate of pool_entry_from_hdl(). Renamed odp_buf_to_hdr() to buf_hdl_to_hdr(), which describes more accurately the internal function. Inlined pool_entry(), pool_entry_from_hdl() and buf_hdl_to_hdr(), which are used often and also outside of pool.c.