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

2015-02-05 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 ola.liljed...@linaro.org --- (This document/code contribution attached is provided under the terms of

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

2015-02-05 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 ola.liljed...@linaro.org --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309)

[lng-odp] [PATCHv5 4/6] validation: odp_timer.c: cunit cleanup Replace printf with LOG_DBG.

2015-02-05 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. Signed-off-by: Ola Liljedahl ola.liljed...@linaro.org --- (This document/code contribution attached is provided under the terms of

[lng-odp] [PATCHv5 6/6] validation: odp_timer.c: run at least one thread

2015-02-05 Thread Ola Liljedahl
Ensure we run at least one worker thread. Signed-off-by: Ola Liljedahl ola.liljed...@linaro.org --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_timer.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-)

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

2015-02-05 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 ola.liljed...@linaro.org --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309)

[lng-odp] [PATCHv5 0/6] validation: timer: misc cleanup

2015-02-05 Thread Ola Liljedahl
Changes since version 4: Moved change of printf to LOG_DBG from patch #1 to patch #4. Changes since version 3: Split out patch #6 from patch #4. Miscellaneous cleanup of test/validation/odp_timer.c. Patch #1: Don't report late timeouts using CU_FAIL as this interferes with the cunit test

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

2015-02-05 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 ola.liljed...@linaro.org --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309)

Re: [lng-odp] [PATCH] api: odp_schedule.h: use int to match return type

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
Reviewed-by: Petri Savolainen petri.savolai...@linaro.org -Original Message- From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- boun...@lists.linaro.org] On Behalf Of ext Ola Liljedahl Sent: Thursday, February 05, 2015 6:20 PM To: lng-odp@lists.linaro.org Subject: [lng-odp]

Re: [lng-odp] [PATCHv2] api: pool: move buffer allocation to buffer.h

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
Reviewed-by: Petri Savolainen petri.savolai...@linaro.org -Original Message- From: ext Taras Kondratiuk [mailto:taras.kondrat...@linaro.org] Sent: Thursday, February 05, 2015 7:37 PM To: lng-odp@lists.linaro.org Cc: Savolainen, Petri (NSN - FI/Espoo); Taras Kondratiuk Subject:

Re: [lng-odp] [PATCHv6 0/9] Cleanup of parameters and return values

2015-02-05 Thread Maxim Uvarov
On 02/05/2015 03:48 PM, Savolainen, Petri (NSN - FI/Espoo) wrote: In summary, patch set is OK to merge after these updates: - patch 3/9: api: odp_buffer.h: undefined behavior description * leave out the patch all together - patch 6/9: api: odp_shared_memory.h: updated return descriptions *

Re: [lng-odp] [PATCHv6 5/9] api: odp_packet_io.h: updated return descriptions

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
*/ int odp_pktio_send(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len); Same here: int/int vs. int/unsigned Those changes are in another patch (the last one I think). Found it. That's OK for me. -Petri ___ lng-odp mailing list

[lng-odp] [PATCHv7] api: odp_shared_memory.h: updated return descriptions

2015-02-05 Thread Ola Liljedahl
Also corrected return description of odp_shm_reserve(), it returns ODP_SHM_INVALID (not NULL) on failure. Signed-off-by: Ola Liljedahl ola.liljed...@linaro.org --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/shared_memory.h |

Re: [lng-odp] [PATCHv7] api: odp_shared_memory.h: updated return descriptions

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
Reviewed-by: Petri Savolainen petri.savolai...@linaro.org -Petri -Original Message- From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- boun...@lists.linaro.org] On Behalf Of ext Ola Liljedahl Sent: Thursday, February 05, 2015 3:41 PM To: lng-odp@lists.linaro.org Subject:

Re: [lng-odp] [PATCHv4] api: fix odp_version_api_str()

2015-02-05 Thread Maxim Uvarov
That patch needs to go to release because it fixes version output. Anders said that it will be good to split it on 2, but I have not idea what are the logical pieces should be there. Maxim. On 02/04/2015 06:22 PM, Maxim Uvarov wrote: Remove odp_impl.c and version_types.h, represent

Re: [lng-odp] [PATCH] api: pool: move buffer allocation to buffer.h

2015-02-05 Thread Bill Fischofer
This change was proposed as part of 0.5 and was removed as Petri preferred it the way it is. Historically we couldn't move these routines with the rest of the buffer routines because of typedef dependencies, but now that they are factored out it really doesn't matter from a technical standpoint.

Re: [lng-odp] [PATCH odp-ovs 0/5] odp-ovs fixes ODP v0.8

2015-02-05 Thread Ciprian Barbu
On Tue, Feb 3, 2015 at 10:03 PM, Mike Holmes mike.hol...@linaro.org wrote: On 3 February 2015 at 14:18, Zoltan Kiss zoltan.k...@linaro.org wrote: Acked and merged: Zoltan Kiss zoltan.k...@linaro.org On 22/01/15 16:11, Ciprian Barbu wrote: This patch series contains some fixes and

[lng-odp] [PATCH v3 4/4] api: thread: Added odp_thread_count

2015-02-05 Thread Petri Savolainen
Improved thread id documentation and added odp_thread_count(), which returns number of active threads. Signed-off-by: Petri Savolainen petri.savolai...@linaro.org --- include/odp/api/thread.h| 17 + platform/linux-generic/odp_thread.c | 4 2 files changed, 21

[lng-odp] [PATCH v3 2/4] api: cpu: Renamed odp_thread_cpu to odp_cpu_id

2015-02-05 Thread Petri Savolainen
This returns system specific cpu id. Signed-off-by: Petri Savolainen petri.savolai...@linaro.org --- example/timer/odp_timer_test.c | 2 +- include/odp/api/thread.h| 8 platform/linux-generic/odp_thread.c | 3 ++- test/performance/odp_scheduling.c | 2 +-

[lng-odp] [PATCH] linus-generic: debug: Allow formatted ODP_ASSERT

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org --- platform/linux-generic/include/odp_debug_internal.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/include/odp_debug_internal.h b/platform/linux-generic/include/odp_debug_internal.h

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

2015-02-05 Thread Maxim Uvarov
Thanks, merged! Maxim. On 02/05/2015 12:39 PM, Mario Torrecillas Rodriguez wrote: Added odp_errno.c and errno.h Changed odp_packet_io and odp_timer to use it. Signed-off-by: Mario Torrecillas Rodriguez mario.torrecillasrodrig...@arm.com --- (This code contribution is provided under the terms

Re: [lng-odp] [PATCH] api: odp_timer.h: move definitions to plat/timer_types.h

2015-02-05 Thread Ola Liljedahl
Ping!?! On 2 February 2015 at 19:52, Ola Liljedahl ola.liljed...@linaro.org wrote: Move the platform specific definitions for timer pool, timer and timeout to the platform's include/odp/plat/timer_types.h file. Signed-off-by: Ola Liljedahl ola.liljed...@linaro.org --- (This document/code

Re: [lng-odp] [PATCH] api: odp_timer.h: move definitions to plat/timer_types.h

2015-02-05 Thread Maxim Uvarov
Merged, Maxim. On 02/05/2015 06:10 PM, Bill Fischofer wrote: On Thu, Feb 5, 2015 at 9:07 AM, Ola Liljedahl ola.liljed...@linaro.org mailto:ola.liljed...@linaro.org wrote: Ping!?! On 2 February 2015 at 19:52, Ola Liljedahl ola.liljed...@linaro.org

Re: [lng-odp] [PATCH] api: odp_timer.h: move definitions to plat/timer_types.h

2015-02-05 Thread Bill Fischofer
On Thu, Feb 5, 2015 at 9:07 AM, Ola Liljedahl ola.liljed...@linaro.org wrote: Ping!?! On 2 February 2015 at 19:52, Ola Liljedahl ola.liljed...@linaro.org wrote: Move the platform specific definitions for timer pool, timer and timeout to the platform's include/odp/plat/timer_types.h file.

[lng-odp] return type mismatch

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
Hi, This call has still int vs. unsigned int mismatch. * * @return Number of events outputed (0 ... num) */ int odp_schedule_multi(odp_queue_t *from, uint64_t wait, odp_event_t events[], unsigned int num); int num would be according to our new policy. Negative return

Re: [lng-odp] [PATCH] api: pool: move buffer allocation to buffer.h

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
This move is OK. Just remove also this: #include odp/buffer.h since there's not dependency anymore. -petri -Original Message- From: ext Taras Kondratiuk [mailto:taras.kondrat...@linaro.org] Sent: Thursday, February 05, 2015 4:19 PM To: lng-odp@lists.linaro.org Cc: Savolainen,

Re: [lng-odp] [PATCH v2 1/3] api: pool: Added packet pool parameters

2015-02-05 Thread Ola Liljedahl
On 5 February 2015 at 22:12, Taras Kondratiuk taras.kondrat...@linaro.org wrote: On 02/03/2015 11:04 PM, Ola Liljedahl wrote: My alternative approach that should achieve that same goals as Petri but give more freedom to implementations. You don't have to approve of it, I just want to show that

Re: [lng-odp] [PATCH v2 1/3] api: pool: Added packet pool parameters

2015-02-05 Thread Bill Fischofer
HW is free to organize whatever underlying facilities it has at its disposal to match ODP API semantics. That's the whole point of having ODP APIs specify only what's actually needed at the application level and giving the implementation freedom in how to provide the needed semantics. For

[lng-odp] [PATCHv2] api: pool: move buffer allocation to buffer.h

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org --- include/odp/api/buffer.h | 19 +++ include/odp/api/pool.h| 20 platform/linux-generic/include/odp/pool.h | 1 + 3 files changed, 20 insertions(+), 20

Re: [lng-odp] [PATCHv2] api: pool: move buffer allocation to buffer.h

2015-02-05 Thread Bill Fischofer
On Thu, Feb 5, 2015 at 11:36 AM, Taras Kondratiuk taras.kondrat...@linaro.org wrote: Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org Reviewed-by: Bill Fischofer bill.fischo...@linaro.org --- include/odp/api/buffer.h | 19 +++

[lng-odp] [PATCH] api: reflect file path in header guards

2015-02-05 Thread Taras Kondratiuk
Start header guards with ODP_API_ prefix to avoid confusion with other files with the same name. Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org --- include/odp/api/align.h | 4 ++-- include/odp/api/atomic.h | 4 ++-- include/odp/api/barrier.h| 4 ++--

Re: [lng-odp] [PATCH] api: odp_schedule.h: use int to match return type

2015-02-05 Thread Bill Fischofer
On Thu, Feb 5, 2015 at 10:20 AM, Ola Liljedahl ola.liljed...@linaro.org wrote: Use (signed) int for parameter that should match return type of function. Signed-off-by: Ola Liljedahl ola.liljed...@linaro.org Reviewed-by: Bill Fischofer bill.fischo...@linaro.org --- (This document/code

Re: [lng-odp] [PATCHv6 5/9] api: odp_packet_io.h: updated return descriptions

2015-02-05 Thread Ola Liljedahl
On 5 February 2015 at 13:17, Savolainen, Petri (NSN - FI/Espoo) petri.savolai...@nsn.com 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, February 04, 2015 11:07 PM To:

[lng-odp] [PATCH v3 1/4] api: cpu: Added cpu.h

2015-02-05 Thread Petri Savolainen
This file contains cpu related API calls. The calls are renames from odp_thread_cpu() and odp_sys_cpu_count(). Signed-off-by: Petri Savolainen petri.savolai...@linaro.org --- include/odp.h| 1 + include/odp/api/cpu.h| 54

[lng-odp] [PATCH v3 3/4] api: cpu: Renamed odp_sys_cpu_count to odp_cpu_count

2015-02-05 Thread Petri Savolainen
This returns number of cpus available to ODP. Signed-off-by: Petri Savolainen petri.savolai...@linaro.org --- example/generator/odp_generator.c| 2 +- example/ipsec/odp_ipsec.c| 2 +- example/l2fwd/odp_l2fwd.c| 2 +- example/packet/odp_pktio.c

[lng-odp] [PATCH] example/test: Makefile.inc: add linux-generic include path back

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org --- example/Makefile.inc | 1 + test/Makefile.inc| 1 + 2 files changed, 2 insertions(+) diff --git a/example/Makefile.inc b/example/Makefile.inc index 91f8f49..b3a9706 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@

Re: [lng-odp] [PATCHv6 3/9] api: odp_buffer.h: undefined behavior description

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
As discussed before, I think this function can crash on bad handles as any other buffer API call. So, let's leave out this patch. More documentation on sanity checking can be added with another patch. -Petri -Original Message- From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp-

[lng-odp] [PATCH] linux-generic: move compiler hints to a proper place

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org --- include/odp/api/hints.h | 12 platform/linux-generic/include/odp_debug_internal.h | 19 --- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git

Re: [lng-odp] [PATCHv6 6/9] api: odp_shared_memory.h: updated return descriptions

2015-02-05 Thread Ola Liljedahl
On 5 February 2015 at 13:23, Savolainen, Petri (NSN - FI/Espoo) petri.savolai...@nsn.com 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, February 04, 2015 11:07 PM To:

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

2015-02-05 Thread Mario Torrecillas Rodriguez
Added odp_errno.c and errno.h Changed odp_packet_io and odp_timer to use it. Signed-off-by: Mario Torrecillas Rodriguez mario.torrecillasrodrig...@arm.com --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Changes from previous version: * Fixed pktio test issue

Re: [lng-odp] [PATCHv6 5/9] api: odp_packet_io.h: updated return descriptions

2015-02-05 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, February 04, 2015 11:07 PM To: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv6 5/9] api: odp_packet_io.h: updated return

Re: [lng-odp] [PATCHv6 6/9] api: odp_shared_memory.h: updated return descriptions

2015-02-05 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, February 04, 2015 11:07 PM To: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv6 6/9] api: odp_shared_memory.h: updated return

[lng-odp] [PATCH] linux-generic: init: fix odp_global_data definition

2015-02-05 Thread Taras Kondratiuk
odp_global_data should be defined once in a C file. Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org --- platform/linux-generic/include/odp_internal.h | 6 -- platform/linux-generic/odp_init.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

Re: [lng-odp] [PATCH] api: reflect file path in header guards

2015-02-05 Thread Taras Kondratiuk
On 02/05/2015 07:40 PM, Bill Fischofer wrote: This looks like a reasonable precaution. Changes to ticketlock.h were not saved in editor, so it is missed. I'll post v2. ___ lng-odp mailing list lng-odp@lists.linaro.org

Re: [lng-odp] [PATCH] api: reflect file path in header guards

2015-02-05 Thread Bill Fischofer
On Thursday, February 5, 2015, Taras Kondratiuk taras.kondrat...@linaro.org wrote: Start header guards with ODP_API_ prefix to avoid confusion with other files with the same name. Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org javascript:; Reviewed-by: Bill Fischofer