Re: [lng-odp] [PATCH] linux-generic: test: ring: .gitignore ring_main

2016-05-25 Thread Christophe Milard
Maxim, maybe you can find a better title when merging :-) Christophe. On 26 May 2016 at 07:21, Yi He wrote: > Signed-off-by: Yi He > Reviewed-by: Christophe Milard --- > platform/linux-generic/test/ring/.gitignore | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/pl

Re: [lng-odp] [PATCHv3] helper: linux: odp thread cpu affinity APIs

2016-05-25 Thread Christophe Milard
On 26 May 2016 at 07:39, Yi He wrote: > Provide helper APIs to set and get cpu affinity in ODP threads, > and set cpu affinity to the 1st available control cpu for all odp > test/validation programs in odp_cunit_common library. > > Signed-off-by: Yi He > --- > helper/include/odp/helper/linux.h

[lng-odp] [PATCHv3] helper: linux: odp thread cpu affinity APIs

2016-05-25 Thread Yi He
Provide helper APIs to set and get cpu affinity in ODP threads, and set cpu affinity to the 1st available control cpu for all odp test/validation programs in odp_cunit_common library. Signed-off-by: Yi He --- helper/include/odp/helper/linux.h | 23 - helper/linux.c

[lng-odp] [PATCH] linux-generic: test: ring: .gitignore ring_main

2016-05-25 Thread Yi He
Signed-off-by: Yi He --- platform/linux-generic/test/ring/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/test/ring/.gitignore b/platform/linux-generic/test/ring/.gitignore index 4767f5e..7341a34 100644 --- a/platform/linux-generic/test/ring/

Re: [lng-odp] [PATCH 2/2] configure: add check for gcc version

2016-05-25 Thread Maxim Uvarov
On 05/25/16 23:37, Bill Fischofer wrote: GCC support for cmpxchng16 is buggy for older versions of GCC, so add a check for GCC version and don't enable this unless the GCC major version is 5 or higher. Note: The use of the AX_COMPILER_VERSION macro creates a dependency on the autoconf-archive pa

[lng-odp] [PATCH 08/10] linux-generic: tm: check for proper init of tm_system_thread

2016-05-25 Thread Bill Fischofer
Add an RC check for odp_init_local() to ensure that tm_system_thread() is launched properly. Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_traffic_mngr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/lin

[lng-odp] [PATCH 06/10] validation: tm: avoid potential null pointer dereference

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- test/validation/traffic_mngr/traffic_mngr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/validation/traffic_mngr/traffic_mngr.c b/test/validation/traffic_mngr/traffic_mngr.c index 6b845b7..10ca2fe 100644 --- a/test/validation/traffic_

[lng-odp] [PATCH 01/10] example: tm: remove unused code

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- example/traffic_mgmt/odp_traffic_mgmt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/example/traffic_mgmt/odp_traffic_mgmt.c b/example/traffic_mgmt/odp_traffic_mgmt.c index 1a1c652..9edf92e 100644 --- a/example/traffic_mgmt/odp_traffic_mgmt.c +++ b/examp

[lng-odp] [PATCH 05/10] validation: tm: avoid resource leakage on tm queue create failure

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- test/validation/traffic_mngr/traffic_mngr.c | 4 1 file changed, 4 insertions(+) diff --git a/test/validation/traffic_mngr/traffic_mngr.c b/test/validation/traffic_mngr/traffic_mngr.c index e099083..6b845b7 100644 --- a/test/validation/traffic_mngr/traffic

[lng-odp] [PATCH 07/10] linux-generic: tm: avoid underflow on log2 of 0

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_timer_wheel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_timer_wheel.c b/platform/linux-generic/odp_timer_wheel.c index a8717b7..c6d2026 100644 --- a/platform/linux-generic/odp_timer_

[lng-odp] [PATCH 10/10] linux-generic: tm: avoid potential null pointer dereference

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_traffic_mngr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index f8995b4..51cfe67 100644 --- a/platform/linux-generic/odp_t

[lng-odp] [PATCH 03/10] validation: tm: add debug check to avoid unreachable code

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- test/validation/traffic_mngr/traffic_mngr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/validation/traffic_mngr/traffic_mngr.c b/test/validation/traffic_mngr/traffic_mngr.c index e459d66..2bbcc1d 100644 --- a/test/validation/tra

[lng-odp] [PATCH 04/10] validation: tm: handle pktio open/config failures properly

2016-05-25 Thread Bill Fischofer
Add proper sequencing of checks for pktio open / configure failures. Signed-off-by: Bill Fischofer --- test/validation/traffic_mngr/traffic_mngr.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/validation/traffic_mngr/traffic_mngr.c b/test/validation/traff

[lng-odp] [PATCH 09/10] linux-generic: tm: discard rc values properly when not needed

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_traffic_mngr.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 72f9493..f8995b4 100644 --- a/platform/linux-ge

[lng-odp] [PATCH 02/10] example: tm: check rc from odp init calls

2016-05-25 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- example/traffic_mgmt/odp_traffic_mgmt.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/example/traffic_mgmt/odp_traffic_mgmt.c b/example/traffic_mgmt/odp_traffic_mgmt.c index 9edf92e..ff03542 100644 --- a/example/traffic_mgmt/

[lng-odp] [PATCH 00/10] Traffic Manager Coverity Cleanup

2016-05-25 Thread Bill Fischofer
Correct numerous coverity-flagged issues with the ODP traffic manager implementation, validation test, and example. Barry: Please review these for correctness. Most are straightforward, however the resource leakage fix (Part 5) needs you to verify that I did this correctly. Bill Fischofer (10):

Re: [lng-odp] [PATCHv2] test: packet: remove unused values

2016-05-25 Thread Bill Fischofer
ping for merge. Needed for RC3 to fix coverity issue. On Thu, May 19, 2016 at 9:09 AM, Mike Holmes wrote: > > > On 19 May 2016 at 09:53, Bill Fischofer wrote: > >> Resolve bug https://bugs.linaro.org/show_bug.cgi?id=2220 by removing >> unused values. >> >> Signed-off-by: Bill Fischofer >> > >

[lng-odp] [PATCH 2/2] configure: add check for gcc version

2016-05-25 Thread Bill Fischofer
GCC support for cmpxchng16 is buggy for older versions of GCC, so add a check for GCC version and don't enable this unless the GCC major version is 5 or higher. Note: The use of the AX_COMPILER_VERSION macro creates a dependency on the autoconf-archive package. Signed-off-by: Bill Fischofer ---

[lng-odp] [PATCH 1/2] configure: whitespace cleanup

2016-05-25 Thread Bill Fischofer
Clean up whitespace to conform to checkpatch rules Signed-off-by: Bill Fischofer --- configure.ac | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 55d2e6e..5857893 100644 --- a/configure.ac +++ b/configure.ac @@ -89,7

Re: [lng-odp] [PATCH] doc: platform: don't install src files we don't use

2016-05-25 Thread Mike Holmes
On 25 May 2016 at 14:10, Bill Fischofer wrote: > > > On Wed, May 25, 2016 at 1:03 PM, Mike Holmes wrote: >> >> Signed-off-by: Mike Holmes >> --- >> doc/platform-api-guide/Makefile.am | 8 +--- >> 1 file changed, 1 insertion(+), 7 deletions(-) >> >> diff --git a/doc/platform-api-guide/Makefi

Re: [lng-odp] [PATCHv2] linux-generic: test: fix ring resource leaks

2016-05-25 Thread Maxim Uvarov
On 05/25/16 19:25, Bill Fischofer wrote: This version looks good too, so my previous review stands. ok, thanks. This patch will go together with configure.ac fix for -mcx16. Because in my case it fixes clang hang bug, but reproduces hang on old gcc. So I will merge both patches at the same t

Re: [lng-odp] [PATCH] doc: platform: don't install src files we don't use

2016-05-25 Thread Bill Fischofer
On Wed, May 25, 2016 at 1:03 PM, Mike Holmes wrote: > Signed-off-by: Mike Holmes > --- > doc/platform-api-guide/Makefile.am | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/doc/platform-api-guide/Makefile.am > b/doc/platform-api-guide/Makefile.am > index 6109e82..

[lng-odp] [PATCH] doc: platform: don't install src files we don't use

2016-05-25 Thread Mike Holmes
Signed-off-by: Mike Holmes --- doc/platform-api-guide/Makefile.am | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/platform-api-guide/Makefile.am b/doc/platform-api-guide/Makefile.am index 6109e82..6680cb3 100644 --- a/doc/platform-api-guide/Makefile.am +++ b/doc/pl

Re: [lng-odp] [PATCH v2 00/12] Modular scheduler

2016-05-25 Thread Bill Fischofer
Maxim: This series should be good for merge for RC3. For this series: Reviewed-and-tested-by: Bill Fischofer On Wed, May 25, 2016 at 7:19 AM, Petri Savolainen < petri.savolai...@nokia.com> wrote: > This is the first patch set to create a clean internal interface between > scheduler and the res

Re: [lng-odp] [PATCH v2] helper: linux: odp thread cpu affinity APIs

2016-05-25 Thread Christophe Milard
On 25 May 2016 at 09:55, Yi He wrote: > Provide APIs to set and get cpu affinity in ODP threads, > and set affinity to the 1st available control cpu for all > odp test/validation programs in odp_cunit_common library. > > Signed-off-by: Yi He > --- > helper/include/odp/helper/linux.h |

Re: [lng-odp] [PATCHv2] linux-generic: test: fix ring resource leaks

2016-05-25 Thread Bill Fischofer
This version looks good too, so my previous review stands. On Wed, May 25, 2016 at 10:30 AM, Maxim Uvarov wrote: > Make test a little bit simple. Add memory free and > take care about overflow using cast to int: > (int32_t)odp_atomic_load_u32(consume_count) > Where number of consumer threads can

Re: [lng-odp] [PATCHv2] doc: users-guide: add packet drop and error CoS documentation

2016-05-25 Thread Maxim Uvarov
Merged, Maxim. On 05/24/16 20:01, Bill Fischofer wrote: On Mon, May 23, 2016 at 2:24 AM, Balasubramanian Manoharan < bala.manoha...@linaro.org> wrote: Adds documentation for packet drop policy and Error Class of service Signed-off-by: Balasubramanian Manoharan Reviewed-by: Bill Fischofer

Re: [lng-odp] [PATCH] doc: generate a pure application-api-guide

2016-05-25 Thread Maxim Uvarov
Merged, Maxim. On 05/25/16 16:48, Mike Holmes wrote: ping to apply On 18 May 2016 at 16:47, Bill Fischofer wrote: On Wed, May 18, 2016 at 3:45 PM, Mike Holmes wrote: It should be possible to generate the pure API specification guide, this patch achieves that Copy the application guide to

Re: [lng-odp] [PATCH] doc: generate a pure application-api-guide

2016-05-25 Thread Maxim Uvarov
Merged, Maxim. On 05/25/16 16:48, Mike Holmes wrote: ping to apply On 18 May 2016 at 16:47, Bill Fischofer wrote: On Wed, May 18, 2016 at 3:45 PM, Mike Holmes wrote: It should be possible to generate the pure API specification guide, this patch achieves that Copy the application guide to

[lng-odp] [PATCHv2] linux-generic: test: fix ring resource leaks

2016-05-25 Thread Maxim Uvarov
Make test a little bit simple. Add memory free and take care about overflow using cast to int: (int32_t)odp_atomic_load_u32(consume_count) Where number of consumer threads can dequeue from ring and decrease atomic u32. Signed-off-by: Maxim Uvarov Reviewed-and-tested-by: Bill Fischofer --- v2: s

Re: [lng-odp] [PATCH] linux-generic: test: fix ring resource leaks

2016-05-25 Thread Bill Fischofer
On Wed, May 25, 2016 at 10:18 AM, Maxim Uvarov wrote: > issue is that -mcx16 and -O3 generates buggy code on gcc4.8 and gcc4.9, > but works fine with gcc5.3 or on old gcc without optimization. I.e. with > -O0. > So 2 options: > 1) change configure.ac to not add -mcx16 flags; > 2) fix ring code to

Re: [lng-odp] [PATCH] linux-generic: test: fix ring resource leaks

2016-05-25 Thread Maxim Uvarov
issue is that -mcx16 and -O3 generates buggy code on gcc4.8 and gcc4.9, but works fine with gcc5.3 or on old gcc without optimization. I.e. with -O0. So 2 options: 1) change configure.ac to not add -mcx16 flags; 2) fix ring code to support -mcx16 on old compilers; I think we should go first pat

[lng-odp] [RFC PATCH] linux-dpdk: Enable inlines if dynamic library is not used

2016-05-25 Thread Zoltan Kiss
In order to have proper packaging and dynamic linking we need a fixed ABI. For that, each function has to be in the library file. But that hurts performance a bit, as small accessor functions couldn't be inlined, despite it's a viable option with static linking. This patch lets the platform automat

Re: [lng-odp] [PATCH] linux-generic: test: fix ring resource leaks

2016-05-25 Thread Maxim Uvarov
interesting that with clang it passes with gcc it hangs. Maxim. On 05/25/16 04:24, Yi He wrote: Hi, sorry about the memory leak issue and thanks Maxim for your patch. Best Regards, Yi On 25 May 2016 at 09:05, Bill Fischofer > wrote: On Tue, May 24, 2016

Re: [lng-odp] [PATCH] doc: generate a pure application-api-guide

2016-05-25 Thread Mike Holmes
ping to apply On 18 May 2016 at 16:47, Bill Fischofer wrote: > > > On Wed, May 18, 2016 at 3:45 PM, Mike Holmes wrote: >> >> It should be possible to generate the pure API specification guide, this >> patch achieves that >> >> Copy the application guide to form a platform specific guide. >> The

[lng-odp] [PATCH v2 08/12] linux-generic: schedule: move ordered queue code to a new file

2016-05-25 Thread Petri Savolainen
Moved ordered queue code from queue_internal.h and queue.c into a new file. Ordered queue type is a scheduler feature but the code contains lots of references to queue_entry_t. The code needs a clear interface towards queues, but is first contained into a separate file. Signed-off-by: Petri Savola

[lng-odp] [PATCH v2 07/12] linux-generic: schedule: start decouple from queue internals

2016-05-25 Thread Petri Savolainen
First steps in decoupling scheduler from queue internal definitions. Pass queue index instead of qentry pointer between queue and scheduler modules. Heavy users of qentry struct (enq, deq and ordered queue code) need more work and new interface functions to decouple. Signed-off-by: Petri Savolaine

[lng-odp] [PATCH v2 11/12] linux-generic: schedule: remove queue internal depencies

2016-05-25 Thread Petri Savolainen
Removed last dependcies to queue and buffer internals from schedule.c. Ordered queue implementation has still lots of dependencies on both, but is now contained into a separate source file to wait for clean up. Signed-off-by: Petri Savolainen --- .../linux-generic/include/odp_queue_internal.h

[lng-odp] [PATCH v2 12/12] linux-generic: config: remove duplicate defines

2016-05-25 Thread Petri Savolainen
Remove duplicate defines from odp_config_internal.h. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_config_internal.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_

[lng-odp] [PATCH v2 09/12] linux-generic: schedule: rename schedule interface header

2016-05-25 Thread Petri Savolainen
Renamed odp_schedule_internal.h to odp_schedule_if.h, since it defines the interface. A new, truly internal header is needed for the scheduler. Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 2 +- platform/linux-generic/include/odp_buffer

[lng-odp] [PATCH v2 10/12] linux-generic: schedule: move local struct into internal header

2016-05-25 Thread Petri Savolainen
Share struct definition between schedule.c and schedule_order.c, so that queue_entry_t references may be removed from schedule.c. Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/odp_schedule_internal.h | 43 +++ ..

[lng-odp] [PATCH v2 05/12] linux-generic: schedule: move schedule group mask into scheduler

2016-05-25 Thread Petri Savolainen
Break dependency between scheduler and thread id/mask code. Schedule group data and implementation belong inside scheduler. Signed-off-by: Petri Savolainen --- .../linux-generic/include/odp_schedule_internal.h | 4 ++ platform/linux-generic/odp_schedule.c | 75 +++-

[lng-odp] [PATCH v2 06/12] linux-generic: schedule: clean up dependency to config interface

2016-05-25 Thread Petri Savolainen
Changed global config #defines into function calls and a scheduler specific define (ORDERED_LOCKS_PER_QUEUE), which needs more work to get rid off. Signed-off-by: Petri Savolainen --- .../linux-generic/include/odp_buffer_internal.h| 3 +- .../linux-generic/include/odp_config_internal.h|

[lng-odp] [PATCH v2 03/12] linux-generic: pktio: use handle on api functions

2016-05-25 Thread Petri Savolainen
Use pktio handle on application interface and entry index/pointer internally. Renamed variable names to be explicit on handle vs index. Signed-off-by: Petri Savolainen --- platform/linux-generic/odp_packet_io.c | 180 - 1 file changed, 88 insertions(+), 92 deletio

[lng-odp] [PATCH v2 04/12] linux-generic: schedule: clean interface towards pktio

2016-05-25 Thread Petri Savolainen
Break scheduler dependency on pktio internal definitions. Moved pktio_poll function prototype into scheduler interface definition in odp_schedule_internal.h. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_packet_io_internal.h | 2 -- platform/linux-generic/include/odp_sc

[lng-odp] [PATCH v2 01/12] linux-generic: schedule: remove static function prototype from header

2016-05-25 Thread Petri Savolainen
schedule_release_context() is internal to odp_schedule.c file. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_schedule_internal.h | 1 - platform/linux-generic/odp_schedule.c | 7 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plat

[lng-odp] [PATCH v2 02/12] linux-generic: schedule: introduce scheduler interfaces

2016-05-25 Thread Petri Savolainen
Start an effort to extract scheduler interfaces (towards and from the scheduler) into function pointer structures. When finished this will enable multiple scheduler implementations and build / init time selection of one. Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am

[lng-odp] [PATCH v2 00/12] Modular scheduler

2016-05-25 Thread Petri Savolainen
This is the first patch set to create a clean internal interface between scheduler and the rest of the implementation. The interface is defined in odp_schedule_if.h and bound in odp_schedule_if.c. Interface binding causes a check patch warning ("externs should be avoided in .c files"), but in th

[lng-odp] [PATCH] helper: cleaner interface to odph_odpthreads_create/join

2016-05-25 Thread Christophe Milard
The odph_odpthread_t (non opaque array of odpthread) is now replaced by a single type odph_odpthread_tbl_t abstracted as a void*. The table describing the odpthreads being created is now malloc'd and freed by the helper function themselves. Signed-off-by: Christophe Milard --- example/classifier

Re: [lng-odp] thread model and memory/address sharing

2016-05-25 Thread Ola Liljedahl
On 25 May 2016 at 13:11, Christophe Milard wrote: > > > On 25 May 2016 at 12:18, Ola Liljedahl wrote: > >> I have attempted to summarise and comment on the discussion. This is >> partly >> intended for an external audience so sorry if I seem to repeat things >> already "solved". Unfortunately I

Re: [lng-odp] thread model and memory/address sharing

2016-05-25 Thread Christophe Milard
On 25 May 2016 at 12:18, Ola Liljedahl wrote: > I have attempted to summarise and comment on the discussion. This is partly > intended for an external audience so sorry if I seem to repeat things > already "solved". Unfortunately I couldn't attend yesterdays public call > but I read the notes. >

Re: [lng-odp] thread model and memory/address sharing

2016-05-25 Thread Mike Holmes
Someone beat me to it :) On 25 May 2016 at 07:06, Mike Holmes wrote: > Thanks Ola, I added this to todays agenda for comment. > > On 25 May 2016 at 06:18, Ola Liljedahl wrote: >> I have attempted to summarise and comment on the discussion. This is partly >> intended for an external audience so s

Re: [lng-odp] thread model and memory/address sharing

2016-05-25 Thread Mike Holmes
Thanks Ola, I added this to todays agenda for comment. On 25 May 2016 at 06:18, Ola Liljedahl wrote: > I have attempted to summarise and comment on the discussion. This is partly > intended for an external audience so sorry if I seem to repeat things > already "solved". Unfortunately I couldn't a

[lng-odp] thread model and memory/address sharing

2016-05-25 Thread Ola Liljedahl
I have attempted to summarise and comment on the discussion. This is partly intended for an external audience so sorry if I seem to repeat things already "solved". Unfortunately I couldn't attend yesterdays public call but I read the notes. Does ODP define the threading model? The ODP documentatio

[lng-odp] [PATCH v2] helper: linux: odp thread cpu affinity APIs

2016-05-25 Thread Yi He
Provide APIs to set and get cpu affinity in ODP threads, and set affinity to the 1st available control cpu for all odp test/validation programs in odp_cunit_common library. Signed-off-by: Yi He --- helper/include/odp/helper/linux.h | 25 +++- helper/linux.c