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 > -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: [PATCHv2] api: pool: move b

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 > -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] [PATCH] api: odp_schedule

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 example,

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 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 given a defined and

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

2015-02-05 Thread Taras Kondratiuk
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 given a defined and understood problem, > many potential solutions exist and th

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

2015-02-05 Thread Bill Fischofer
On Thursday, February 5, 2015, Taras Kondratiuk wrote: > Start header guards with ODP_API_ prefix to avoid confusion with other > files with the same name. > > Signed-off-by: Taras Kondratiuk > Reviewed-by: Bill Fischofer > --- > v2: updated missed ticketlock.h > > include/odp/api/align.h

[lng-odp] [PATCHv2] 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 --- v2: updated missed ticketlock.h include/odp/api/align.h | 4 ++-- include/odp/api/atomic.h | 4 ++-- include/odp/api/barrier.h| 4 ++-- i

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 http://lists.linaro.org/mailman/l

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

2015-02-05 Thread Bill Fischofer
This looks like a reasonable precaution. On Thu, Feb 5, 2015 at 11:37 AM, 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 > Reviewed-by: Bill Fischofer

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 > Reviewed-by: Bill Fischofer > --- > include/odp/api/buffer.h | 19 +++ > include/odp/api/pool.h| 20 ---

[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 --- include/odp/api/align.h | 4 ++-- include/odp/api/atomic.h | 4 ++-- include/odp/api/barrier.h| 4 ++-- include/odp/api/buffer.h |

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

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk --- 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 deletions(-) diff --git a/include/o

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 wrote: > Use (signed) int for parameter that should match return type of function. > > Signed-off-by: Ola Liljedahl > Reviewed-by: Bill Fischofer > --- > (This document/code contribution attached is provided under the terms of > agreement LES-LT

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

2015-02-05 Thread Ola Liljedahl
Use (signed) int for parameter that should match return type of function. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/schedule.h| 2 +- platform/linux-generic/odp_schedule.c | 2 +-

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 mailto:ola.liljed...@linaro.org>> wrote: Ping!?! On 2 February 2015 at 19:52, Ola Liljedahl mailto:ola.liljed...@linaro.org>> wrote: > Move the platform specific defi

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

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 wrote: > Ping!?! > > On 2 February 2015 at 19:52, Ola Liljedahl > 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 >

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 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 > --- > (This document/code contribution attached is provided under the t

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 wrote: > > > On 3 February 2015 at 14:18, Zoltan Kiss wrote: >> >> Acked and merged: Zoltan Kiss >> >> On 22/01/15 16:11, Ciprian Barbu wrote: >>> >>> This patch series contains some fixes and workarounds for some problems >>> found >>> while testing

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 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, Petri (NSN

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.

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

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk --- include/odp/api/buffer.h | 19 +++ include/odp/api/pool.h | 19 --- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h index 09bddf2..4bbac1e 100644 --- a/includ

[lng-odp] [PATCH] linux-generic: shm: remove wrong include files

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk --- platform/linux-generic/include/odp/shared_memory.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/platform/linux-generic/include/odp/shared_memory.h b/platform/linux-generic/include/odp/shared_memory.h index bdd7171..957be56 100644 --- a/platform/linux-g

[lng-odp] [PATCH] validation: init: include stdlib.h for abort()

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk --- test/validation/odp_init_abort.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/validation/odp_init_abort.c b/test/validation/odp_init_abort.c index c291146..ceb82b5 100644 --- a/test/validation/odp_init_abort.c +++ b/test/validation/odp_init_abort.c

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 odp_vers

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 > -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: [lng-odp] [PATCHv7] api: od

[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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/shared_memory.h | 18 +++--- 1

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 0/9] Cleanup of parameters and return values

2015-02-05 Thread Savolainen, Petri (NSN - FI/Espoo)
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" * do bug correction: retval ODP_SHM_INVALID instead of NULL Review

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

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) 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@lists.linaro

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 retur

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) 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@lists.linaro

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

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 --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Change

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

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk --- 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 @@ -6,6 +6,7 @@ AM_CFLAGS += \

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

2015-02-05 Thread Taras Kondratiuk
Signed-off-by: Taras Kondratiuk --- 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 index dec5c15..265d9be 1006

[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 --- example/generator/odp_generator.c| 2 +- example/ipsec/odp_ipsec.c| 2 +- example/l2fwd/odp_l2fwd.c| 2 +- example/packet/odp_pktio.c | 2 +- example/timer/odp_

[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 --- include/odp.h| 1 + include/odp/api/cpu.h| 54 platform/linux-gener

[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 --- include/odp/api/thread.h| 17 + platform/linux-generic/odp_thread.c | 4 2 files changed, 21 insertions(+) diff --git a/in

[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 --- 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 +- test/validation/odp_synchronizers.c

[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 --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Changes from previous version: * Fixed pktio test issue include/odp/api/version.h

[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 --- platform/linux-generic/include/odp_internal.h | 6 -- platform/linux-generic/odp_init.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/include/odp

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

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

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

[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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_ti

[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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_ti

[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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/v

[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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/validation/odp_timer.c | 7 +++

[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 --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) test/

[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 --- (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(-) diff --git a/test/validation