Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Savolainen, Petri (NSN - FI/Espoo)
> -Original Message- > From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- > boun...@lists.linaro.org] On Behalf Of ext Ola Liljedahl > Sent: Thursday, January 29, 2015 7:02 PM > To: Taras Kondratiuk > Cc: lng-odp@lists.linaro.org > Subject: Re: [lng-odp] Handling xxx_INVALID handles

Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Savolainen, Petri (NSN - FI/Espoo)
> -Original Message- > From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- > boun...@lists.linaro.org] On Behalf Of ext Taras Kondratiuk > Sent: Thursday, January 29, 2015 6:47 PM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] Handling xxx_INVALID handles > > Hi > > We had a di

[lng-odp] [PATCH v1] api: classification: pmr statistics counter API moved out of ODP 1.0

2015-01-29 Thread bala . manoharan
From: Balasubramanian Manoharan odp_pmr_match_count() API related to statistics count of PMR has been moved out of ODP 1.0 version and the same will be incorporated once an ODP level common statistics counter design has been achieved. Signed-off-by: Balasubramanian Manoharan --- include/odp/

[lng-odp] [patch 6/9] linux-generic: packet: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp/plat/packet_types.h | 12 ++-- platform/linux-generic/odp_packet.c| 8 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/packet_types.h

[lng-odp] [patch 5/9] linux-generic: pktio: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- example/generator/odp_generator.c | 11 +++ example/ipsec/odp_ipsec.c | 10 ++ example/l2fwd/odp_l2fwd.c | 11 +++ example/packet/odp_pktio.c | 22 +

[lng-odp] [patch 4/9] linux-generic: events: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp/plat/event_types.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/event_types.h b/platform/linux-generic/include/odp/plat/event_types.h index aa73c51..c01cc5c

[lng-odp] [patch 2/9] linux-generic: buffers: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp/plat/buffer_types.h | 9 + platform/linux-generic/include/odp_buffer_inlines.h| 12 ++-- platform/linux-generic/odp_packet.c| 13 +++-- 3 files changed, 18 insertions(+), 16 delet

[lng-odp] [patch 9/9] linux-generic: shm: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp/plat/shared_memory_types.h | 7 +-- platform/linux-generic/odp_shared_memory.c| 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/shared_memory

[lng-odp] [patch 3/9] linux-generic: classification: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- include/odp/api/classification.h | 5 --- .../include/odp/plat/classification_types.h| 16 --- platform/linux-generic/odp_classification.c| 51 +- .../classification/odp_classification_basic.c | 2 +

[lng-odp] [patch 8/9] linux-generic: queue: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- example/generator/odp_generator.c | 5 +++-- example/ipsec/odp_ipsec.c | 12 +++- example/packet/odp_pktio.c| 8 include/odp/api/queue.h |

[lng-odp] [patch 1/9] api: add base macros for strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/odp/plat/strong_types.h | 37 ++ 2 files changed, 38 insertions(+) create mode 100644 platform/linux-generic/include/odp/plat/strong_types.h diff --git a/p

[lng-odp] [patch 7/9] linux-generic: pool: add strong typing support

2015-01-29 Thread Bill Fischofer
Signed-off-by: Bill Fischofer --- include/odp/api/pool.h| 13 + platform/linux-generic/include/odp/plat/pool_types.h | 13 +++-- platform/linux-generic/include/odp_buffer_inlines.h | 4 +++- platform/linux-generic/include/odp_buf

[lng-odp] [patch 0/9] Add Strong Typing for ODP Abstract Types

2015-01-29 Thread Bill Fischofer
This patch series adds strong typing support for ODP abstract types. This prevents incorrect types from being used with ODP APIs. Misuse of types will now result in a compile-time error. To allow handles to be printed for diagnostic purposes the following new APIs are added that have the signature

[lng-odp] [PATCH 10/10] linux-generic: buffer pool: add term_local

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_buffer_pool.c | 6 ++ platform/linux-generic/odp_init.c | 5 + 3 files changed, 12 insertions(+) diff --git a/pl

[lng-odp] [PATCH 07/10] linux-generic: thread: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Songming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 + platform/linux-generic/odp_thread.c | 13 + 3 files changed, 19 insertions(+) diff

[lng-odp] [PATCH 06/10] linux-generic: buffer_pool: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Songming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_buffer_pool.c | 31 ++- platform/linux-generic/odp_init.c | 5 + 3 files changed, 36 inser

[lng-odp] [PATCH 08/10] linux-generic: shm: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Songming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 + platform/linux-generic/odp_shared_memory.c| 8 3 files changed, 14 insertions(+) diff --git a

[lng-odp] [PATCH 09/10] linux-generic: schedule: add term_local

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 + platform/linux-generic/odp_schedule.c | 6 ++ 3 files changed, 12 insertions(+) diff --git a/pl

[lng-odp] [PATCH 03/10] linux-generic: packet_io: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Songming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 + platform/linux-generic/odp_packet_io.c| 20 3 files changed, 26 insertions(+

[lng-odp] [PATCH 05/10] linux-generic: queue: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Songming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 + platform/linux-generic/odp_queue.c| 25 + 3 files changed, 31 inserti

[lng-odp] [PATCH 04/10] linux-generic: schedule: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 + platform/linux-generic/odp_schedule.c | 25 + 3 files changed, 31 insertio

[lng-odp] [PATCH 01/10] linux-generic: classification: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_classification.c | 25 + platform/linux-generic/odp_init.c | 6 +- 3 files changed, 31 inserti

[lng-odp] [PATCH 00/10] Impliment termination functions

2015-01-29 Thread Mike Holmes
Rebase and split Yans patch serise 4 Yan Sonming (10): linux-generic: classification: add term_global linux-generic: odp_crypto: add term_global linux-generic: packet_io: add term_global linux-generic: schedule: add term_global linux-generic: queue: add term_global linux-generic: buff

[lng-odp] [PATCH 02/10] linux-generic: odp_crypto: add term_global

2015-01-29 Thread Mike Holmes
From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_crypto.c | 13 + platform/linux-generic/odp_init.c | 5 + 3 files changed, 19 insertions(+) diff

[lng-odp] [PATCH] validation: Makefile: install script pktio_run

2015-01-29 Thread Anders Roxell
The pktio unit test need a wrapper script run, install that script alongside the executable. Signed-off-by: Anders Roxell --- test/validation/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 2942b85..703d9b6 100644

[lng-odp] [PATCH 5/5] validation: odp_init: add test for replace abort

2015-01-29 Thread Mike Holmes
Signed-off-by: Mike Holmes --- test/validation/odp_init.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/test/validation/odp_init.c b/test/validation/odp_init.c index c8e5a11..cbb04b0 100644 --- a/test/validation/odp_init.c +++ b/test/validation/odp_init.c @@ -14,6 +

[lng-odp] [PATCH 3/5] api: abort: use globaly stored abort function

2015-01-29 Thread Mike Holmes
Use the abort function stored in the global data structure. Signed-off-by: Mike Holmes --- include/odp/api/init.h | 3 +++ platform/linux-generic/include/odp_debug_internal.h | 4 ++-- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/

[lng-odp] [PATCH 1/5] api: odp_hints: Add ODP_NORETURN

2015-01-29 Thread Mike Holmes
Add the ability to mark a function as never returning to the caller. Signed-off-by: Mike Holmes --- include/odp/api/hints.h | 4 1 file changed, 4 insertions(+) diff --git a/include/odp/api/hints.h b/include/odp/api/hints.h index 7f04886..a7aa90e 100644 --- a/include/odp/api/hints.h +++ b/

[lng-odp] [PATCH 2/5] api: abort: add weak replacement for abort

2015-01-29 Thread Mike Holmes
Introduce replaceable abort function using weak symbols. Signed-off-by: Mike Holmes --- include/odp/api/init.h | 16 platform/linux-generic/include/odp_debug_internal.h | 4 ++-- platform/linux-generic/odp_weak.c | 5 + 3 file

[lng-odp] [PATCH 4/5] api: init_global: allow abort fn to be overidden

2015-01-29 Thread Mike Holmes
Signed-off-by: Mike Holmes --- include/odp/api/init.h| 14 ++ platform/linux-generic/odp_init.c | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/odp/api/init.h b/include/odp/api/init.h index c5b4e9b..6af032d 100644 --- a/include/odp/api/init

Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Taras Kondratiuk
On 01/30/2015 12:05 AM, Ola Liljedahl wrote: > On 29 January 2015 at 22:55, Taras Kondratiuk > wrote: >> There are cases when access to a shared ODP resource is done >> indirectly (not via handle). For example, accessing shared memory block >> after obtaining its address via handle. If one thread

Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Ola Liljedahl
On 29 January 2015 at 22:55, Taras Kondratiuk wrote: > On 01/29/2015 07:01 PM, Ola Liljedahl wrote: >> On 29 January 2015 at 17:46, Taras Kondratiuk >> wrote: >>> Hi >>> >>> We had a discussion recently about wrong ODP handles passed to API >>> functions. As far as I remember we agreed that in th

Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Ola Liljedahl
On 29 January 2015 at 22:14, Bill Fischofer wrote: > Given that pool creation/deletion is a relatively involved procedure and not > expected to be called frequently, it makes sense to include full parameter > validation as part of the operation. The same should be true for other APIs > with simil

Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Taras Kondratiuk
On 01/29/2015 07:01 PM, Ola Liljedahl wrote: > On 29 January 2015 at 17:46, Taras Kondratiuk > wrote: >> Hi >> >> We had a discussion recently about wrong ODP handles passed to API >> functions. As far as I remember we agreed that in this case behavior is >> undefined. What about passing xxx_INVAL

Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Bill Fischofer
Given that pool creation/deletion is a relatively involved procedure and not expected to be called frequently, it makes sense to include full parameter validation as part of the operation. The same should be true for other APIs with similar expected call frequencies. We do allow explicit INVALID

Re: [lng-odp] [PULL REQUESTv2] reorganisation of API header files

2015-01-29 Thread Maxim Uvarov
Merged! By the merge wrote cool script to add new review-by to all rebasing commits. Maxim. On 01/29/2015 05:08 PM, Taras Kondratiuk wrote: On 01/29/2015 03:11 AM, Anders Roxell wrote: Hi, Updated after Taras suggestions. The following changes since commit 1641fe42647802a9191a50ab73035ada8

[lng-odp] [PATCHv4] linux-generic: Add odp_errno and adapt packet_io and timer implementations to use it

2015-01-29 Thread Mario Torrecillas Rodriguez
Added odp_errno.c and odp_errno.h Changed odp_packet_io and odp_timer to use it. Signed-off-by: Mario Torrecillas Rodriguez --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Changes from previous version: * Changed printf for ODP_PRINT platform/linux-generic/M

Re: [lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Ola Liljedahl
On 29 January 2015 at 17:46, Taras Kondratiuk wrote: > Hi > > We had a discussion recently about wrong ODP handles passed to API > functions. As far as I remember we agreed that in this case behavior is > undefined. What about passing xxx_INVALID values to API? > > Currently packet IO verification

[lng-odp] Handling xxx_INVALID handles

2015-01-29 Thread Taras Kondratiuk
Hi We had a discussion recently about wrong ODP handles passed to API functions. As far as I remember we agreed that in this case behavior is undefined. What about passing xxx_INVALID values to API? Currently packet IO verification tests pass ODP_PKTIO_INVALID explicitly to some API function

[lng-odp] [PATCHv4 4/5] validation: odp_timer.c: cunit cleanup

2015-01-29 Thread Ola Liljedahl
Use CU_ASSERT_FATAL instead of plain assert so to work better with the cunit test framework. Use LOG_DBG instead of printf. Remove some unnecessary printouts. Ensure we run at least one worker thread. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the

[lng-odp] [PATCHv4 1/5] validation: odp_timer.c: avoid cunit warnings for late timeouts

2015-01-29 Thread Ola Liljedahl
Don't report late timeouts using CU_FAIL as this interferes with the cunit test framework. Just count and report the number of late timeouts. Signed-off-by: Ola Liljedahl Suggested-by: Mike Holmes --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-2130

[lng-odp] [PATCHv4 2/5] validation: odp_timer.c: avoid dereferencing ptr after NULL check

2015-01-29 Thread Ola Liljedahl
Don't dereference pointer after successful check for NULL as this makes Coverity complain. (Coverity CID 85397, https://bugs.linaro.org/show_bug.cgi?id=1056) Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/v

[lng-odp] [PATCHv4 3/5] validation: odp_timer.c: use nanosleep instead of usleep

2015-01-29 Thread Ola Liljedahl
Use nanosleep instead of the deprecated usleep. Define POSIX version to be able to use rand_r. (https://bugs.linaro.org/show_bug.cgi?id=1048) Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_ti

[lng-odp] [PATCHv4 0/5] validation: odp_timer: general cleanup

2015-01-29 Thread Ola Liljedahl
(Included a separate patch in this patch series, they all concern the same file) Don't report late timeouts using CU_FAIL as this interferes with the cunit test framework. Just count and report (using LOG_DBG) the number of late timeouts. (Discussed with Mike Holmes) Don't dereference pointer after

[lng-odp] [PATCHv4 5/5] validation: odp_timer.c: remove usage of perror/abort

2015-01-29 Thread Ola Liljedahl
Replace usage of perror and abort with CU_FAIL_FATAL in order for fatal errors not to disturb the overall validation flow. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_timer.c | 7 +++

Re: [lng-odp] [PATCHv3 4/5] validation: odp_timer.c: cunit cleanup

2015-01-29 Thread Ola Liljedahl
On 29 January 2015 at 15:15, Anders Roxell wrote: > On 2015-01-29 12:01, Ola Liljedahl wrote: >> Use CU_ASSERT_FATAL instead of plain assert so to work better with the cunit >> test framework. >> Use LOG_DBG instead of printf. Remove some unnecessary printouts. >> Ensure we run at least one worker

Re: [lng-odp] [PATCHv3 2/5] validation: odp_timer.c: avoid dereferencing ptr after NULL check

2015-01-29 Thread Ola Liljedahl
On 29 January 2015 at 15:11, Anders Roxell wrote: > On 2015-01-29 12:01, Ola Liljedahl wrote: >> Don't dereference pointer after successful check for NULL as this makes >> Coverity >> complain. (Coverity CID 85397, https://bugs.linaro.org/show_bug.cgi?id=1056) >> >> Signed-off-by: Ola Liljedahl

Re: [lng-odp] API questions - sizes and numelems as inputs and outputs

2015-01-29 Thread Ola Liljedahl
On 29 January 2015 at 14:04, Savolainen, Petri (NSN - FI/Espoo) wrote: > > >> -Original Message- >> From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- >> boun...@lists.linaro.org] On Behalf Of ext Ola Liljedahl >> Sent: Wednesday, January 28, 2015 7:06 PM >> To: LNG ODP Mailman List >

[lng-odp] [Bug 1175] New: CID: 85427: odp_packet_io.c: Dereference null return value

2015-01-29 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=1175 Bug ID: 1175 Summary: CID: 85427: odp_packet_io.c: Dereference null return value Product: OpenDataPlane Version: 0.9 Hardware: Other OS: Linux Status:

Re: [lng-odp] [PATCHv4 0/5] api: crypto: ODP 1.0 API update

2015-01-29 Thread Maxim Uvarov
On 01/29/2015 05:33 PM, Savolainen, Petri (NSN - FI/Espoo) wrote: Did that already here: Re: [lng-odp] [PATCHv4 1/5] api: crypto: new completion event scheme .. with two things to be done after merge. It's OK to merge. -Petri Yep, sorry, was debugging ABA patches then switched to that. Maxim

Re: [lng-odp] [PATCHv4 0/5] api: crypto: ODP 1.0 API update

2015-01-29 Thread Savolainen, Petri (NSN - FI/Espoo)
Did that already here: Re: [lng-odp] [PATCHv4 1/5] api: crypto: new completion event scheme .. with two things to be done after merge. It's OK to merge. -Petri > -Original Message- > From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- > boun...@lists.linaro.org] On Behalf Of ext

Re: [lng-odp] [PATCHv3 1/5] validation: odp_timer.c: avoid cunit warnings for late timeouts

2015-01-29 Thread Anders Roxell
On 2015-01-29 12:01, Ola Liljedahl wrote: > Don't report late timeouts using CU_FAIL as this interferes with the cunit > test framework. Just count and report (using LOG_DBG) the number of late > timeouts. (Discussed with Mike Holmes) Drop "(Discussed with Mike Holmes)" and add: Suggested-by: Mik

Re: [lng-odp] [PATCHv4 0/5] api: crypto: ODP 1.0 API update

2015-01-29 Thread Maxim Uvarov
Petri, do you want to write your sign-off here? Maxim. On 01/28/2015 08:42 PM, Robbie King wrote: v1 - Move completion event allocation into implementation, allow synchronous implementation to return status immediately (i.e. no completion event involved). Fix two crypto relate

Re: [lng-odp] [PATCHv3 4/5] validation: odp_timer.c: cunit cleanup

2015-01-29 Thread Anders Roxell
On 2015-01-29 12:01, Ola Liljedahl wrote: > Use CU_ASSERT_FATAL instead of plain assert so to work better with the cunit > test framework. > Use LOG_DBG instead of printf. Remove some unnecessary printouts. > Ensure we run at least one worker thread. I don't think this is a cleanup its an improvem

Re: [lng-odp] [PATCHv3 2/5] validation: odp_timer.c: avoid dereferencing ptr after NULL check

2015-01-29 Thread Anders Roxell
On 2015-01-29 12:01, Ola Liljedahl wrote: > Don't dereference pointer after successful check for NULL as this makes > Coverity > complain. (Coverity CID 85397, https://bugs.linaro.org/show_bug.cgi?id=1056) > > Signed-off-by: Ola Liljedahl > --- > (This document/code contribution attached is prov

Re: [lng-odp] [PULL REQUESTv2] reorganisation of API header files

2015-01-29 Thread Taras Kondratiuk
On 01/29/2015 03:11 AM, Anders Roxell wrote: Hi, Updated after Taras suggestions. The following changes since commit 1641fe42647802a9191a50ab73035ada8f5d3349: api: cpumask: doxygen: add param to odp_cpumask_last (2015-01-28 15:49:23 +0300) are available in the git repository at: git:/

Re: [lng-odp] [PULL REQUESTv2] reorganisation of API header files

2015-01-29 Thread Balasubramanian Manoharan
Reviewed-by: Balasubramanian Manoharan On 29/01/15 6:41 am, Anders Roxell wrote: Hi, Updated after Taras suggestions. The following changes since commit 1641fe42647802a9191a50ab73035ada8f5d3349: api: cpumask: doxygen: add param to odp_cpumask_last (2015-01-28 15:49:23 +0300) are availab

Re: [lng-odp] [PATCH v7 3/3] linux-generic: Make buffer_pool allocators use _odp_atomic_tptr_t

2015-01-29 Thread Maxim Uvarov
On 01/28/2015 01:44 AM, Geoffrey Blake wrote: From: Geoffrey Blake Signed-off-by: Geoffrey Blake --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) .../include/odp_buffer_pool_internal.h | 100 ++--- platform/li

[lng-odp] [PATCH v4 2/2] linux-generic: implement of odp_term_local.

2015-01-29 Thread Yan Songming
From: Yan Sonming Free local resource of odp. Signed-off-by: Yan Songming --- platform/linux-generic/include/odp_internal.h | 2 ++ platform/linux-generic/odp_buffer_pool.c | 6 ++ platform/linux-generic/odp_init.c | 10 ++ platform/linux-generic/odp_schedule.c

[lng-odp] [PATCH v4 1/2] linux-generic: implement of odp_term_global.

2015-01-29 Thread Yan Songming
From: Yan Sonming Free global resource of odp which include share memory, queue and buffer pool. Signed-off-by: Yan Songming --- platform/linux-generic/include/odp_internal.h | 8 ++ platform/linux-generic/odp_buffer_pool.c | 31 - platform/linux-generic/odp_class

Re: [lng-odp] API questions - sizes and numelems as inputs and outputs

2015-01-29 Thread Savolainen, Petri (NSN - FI/Espoo)
> -Original Message- > From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- > boun...@lists.linaro.org] On Behalf Of ext Ola Liljedahl > Sent: Wednesday, January 28, 2015 7:06 PM > To: LNG ODP Mailman List > Subject: [lng-odp] API questions - sizes and numelems as inputs and > outputs

Re: [lng-odp] [PATCHv4 1/5] api: crypto: new completion event scheme

2015-01-29 Thread Ola Liljedahl
On 29 January 2015 at 12:18, Savolainen, Petri (NSN - FI/Espoo) wrote: > Hi, > > Reviewed-by: Petri Savolainen > > API changes are OK and can be merged today. > > > Two things should be fixed then on top of that. > > 1) odp_hw_random_get() > > This could be renamed to e.g. odp_rand() and moved ou

Re: [lng-odp] [PATCHv4 1/5] api: crypto: new completion event scheme

2015-01-29 Thread Savolainen, Petri (NSN - FI/Espoo)
Hi, Reviewed-by: Petri Savolainen API changes are OK and can be merged today. Two things should be fixed then on top of that. 1) odp_hw_random_get() This could be renamed to e.g. odp_rand() and moved out from crypto header (odp_misc.h ?) size_t odp_rand(uint8_t *buf, size_t len, odp_bool_t

[lng-odp] [PATCHv3 2/5] validation: odp_timer.c: avoid dereferencing ptr after NULL check

2015-01-29 Thread Ola Liljedahl
Don't dereference pointer after successful check for NULL as this makes Coverity complain. (Coverity CID 85397, https://bugs.linaro.org/show_bug.cgi?id=1056) Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/v

[lng-odp] [PATCHv3 1/5] validation: odp_timer.c: avoid cunit warnings for late timeouts

2015-01-29 Thread Ola Liljedahl
Don't report late timeouts using CU_FAIL as this interferes with the cunit test framework. Just count and report (using LOG_DBG) the number of late timeouts. (Discussed with Mike Holmes) Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agre

[lng-odp] [PATCHv3 4/5] validation: odp_timer.c: cunit cleanup

2015-01-29 Thread Ola Liljedahl
Use CU_ASSERT_FATAL instead of plain assert so to work better with the cunit test framework. Use LOG_DBG instead of printf. Remove some unnecessary printouts. Ensure we run at least one worker thread. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the

[lng-odp] [PATCHv3 5/5] validation: odp_timer.c: remove usage of perror/abort

2015-01-29 Thread Ola Liljedahl
Replace usage of perror and abort with CU_FAIL_FATAL in order for fatal errors not to disturb the overall validation flow. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_timer.c | 7 +++

[lng-odp] [PATCHv3 0/5] validation: odp_timer: general cleanup

2015-01-29 Thread Ola Liljedahl
(Included a separate patch in this patch series, they all concern the same file) Don't report late timeouts using CU_FAIL as this interferes with the cunit test framework. Just count and report (using LOG_DBG) the number of late timeouts. (Discussed with Mike Holmes) Don't dereference pointer after

[lng-odp] [PATCHv3 3/5] validation: odp_timer.c: use nanosleep instead of usleep

2015-01-29 Thread Ola Liljedahl
Use nanosleep instead of the deprecated usleep. Define POSIX version to be able to use rand_r. (https://bugs.linaro.org/show_bug.cgi?id=1048) Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_ti

Re: [lng-odp] [PATCH 1/3] validation: buffer: check the return value of odp_packet_l?_offset_set

2015-01-29 Thread Maxim Uvarov
This patch merged. Maxim. On 01/18/2015 01:19 AM, Taras Kondratiuk wrote: On 01/17/2015 01:29 PM, Jerin Jacob wrote: Signed-off-by: Jerin Jacob --- test/validation/buffer/odp_packet_test.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) Reviewed-by: Taras Kondratiuk

[lng-odp] [PATCH 08/16] api: odp_packet.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_packet.h

[lng-odp] [PATCH 14/16] api: odp_thread.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_thread.h

[lng-odp] [PATCH 15/16] api: odp_timer.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Documented API calls which are guaranteed to handle invalid/stale handles. Removed unnecessary warnings of undefined behavior. Signed-off-by: Ola Liljedahl --- (This document/code c

[lng-odp] [PATCH 16/16] api: odp_queue.h: odp_queue_enq_multi() returns partial success

2015-01-29 Thread Ola Liljedahl
Changed the definition of odp_queue_enq_multi() to support partial success (e.g. enqueued some but not all of the events specified). Returns the number of events enqueued (equivalent to odp_queue_deq_multi()). This change is necessary to support ODP implementations that use fixed size queues (e.g.

[lng-odp] [PATCH 09/16] api: odp_packet_flags.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) .../linux-generic/include/api/odp_packet_flags.h

[lng-odp] [PATCH 11/16] api: odp_queue.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_queue.h |

[lng-odp] [PATCH 12/16] api: odp_schedule.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_schedule.

[lng-odp] [PATCH 05/16] api: odp_byteorder.h: updated comment

2015-01-29 Thread Ola Liljedahl
Rephrased a comment for better language. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_byteorder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat

[lng-odp] [PATCH 13/16] api: odp_shared_memory.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Documented API calls which are guaranteed to handle invalid/stale handles. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of

[lng-odp] [PATCH 07/16] api: odp_init.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_init.h |

[lng-odp] [PATCH 10/16] api: odp_packet_io.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_packet_io

[lng-odp] [PATCH 06/16] api: odp_classification.h: updated return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) .../linux-generic/include/api/odp_classification

[lng-odp] [PATCH 04/16] api: odp_buffer.h: undefined behavior description

2015-01-29 Thread Ola Liljedahl
Documented API calls which are guaranteed to handle invalid/stale handles. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_buffer.h | 4 +++- 1 file changed, 3 insertions(+)

[lng-odp] [PATCH 03/16] api: odp_crypto.h: return descriptions

2015-01-29 Thread Ola Liljedahl
Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) platform/linux-generic/include/api/odp_crypto.h

[lng-odp] [PATCH 00/16] Cleanup return semantics and descriptions

2015-01-29 Thread Ola Liljedahl
Patches #1 and #2: odp_cpumask_to_str(), odp_pktio_mac_addr() follows and extends the model of odp_hw_random_get() where output buffer size is passed by reference and the variable is updated with the number of bytes written on success or the minimum required buffer size should it be too small. Upda

[lng-odp] [PATCH 01/16] api: odp_cpumask.h: odp_cpumask_to_str() return bufsz

2015-01-29 Thread Ola Liljedahl
odp_cpumask_to_str() definition modified to pass output buffer size by reference and the variable is updated with the number of bytes written on success or the minimum required buffer size should it be too small. odp_cpumask_to_str() returns 0 on success and <0 on failure. Updated the implementatio

[lng-odp] [PATCH 02/16] api: odp_pktio.h: odp_pktio_mac_addr() return bufsz

2015-01-29 Thread Ola Liljedahl
odp_pktio_mac_addr() definition modified to pass output buffer size by reference and the variable is updated with the number of bytes written on success or the minimum required buffer size should it be too small. odp_pktio_mac_addr() returns 0 on success and <0 on failure. Updated the implementatio

[lng-odp] [PATCHv2 2/2] example: add return statements in thread functions

2015-01-29 Thread Ciprian Barbu
Fix for https://bugs.linaro.org/show_bug.cgi?id=1161 Signed-off-by: Ciprian Barbu --- v2: the same fix for the packet example; all other examples and validation tests (odp_cunit_thread_create) return from the thread functions example/l2fwd/odp_l2fwd.c | 2 ++ example/packet/odp_pktio.c | 2 ++