[lng-odp] [PATCH v4 3/4] helper: move thread implementation under platform

2017-01-20 Thread Mike Holmes
Only the portable api is built by default, use --enable-helper-extn to enable non portable APIs for a helper platform Signed-off-by: Mike Holmes --- configure.ac | 17 +- example/Makefile.inc | 2 +-

[lng-odp] [PATCH v4 4/4] helper: remove dependence on test dir

2017-01-20 Thread Mike Holmes
There is no reason that the helpers need to depend on the test directory so remove the offending links Signed-off-by: Mike Holmes --- helper/test/Makefile.am | 25 --- helper/test/chksum.c| 18 helper/test/cuckootable.c

[lng-odp] [PATCH v4 2/4] helper: cleanup Linux rename to thread

2017-01-20 Thread Mike Holmes
Remove the OS specific Linux filename and use the name of the generic apis it contains which is for odp_threads Signed-off-by: Mike Holmes --- example/classifier/odp_classifier.c | 2 +- example/generator/odp_generator.c | 2 +-

[lng-odp] [PATCH v4 1/4] configure: use helper configure.m4

2017-01-20 Thread Mike Holmes
Don't keep helper data in the main configure, split it to an m4 just like the other sub dirs Signed-off-by: Mike Holmes --- configure.ac | 2 -- helper/m4/configure.m4 | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac

[lng-odp] [PATCH v4 0/4] remove Linux specifics and dependence on test

2017-01-20 Thread Mike Holmes
Starting with some clean up, rename the Linux specific files and then move them to a platform specific directory. A new configure option is introduced "with-helper-platform", this defaults to match the existing odp selector "with-platform" so that there is no operational change. With the move

Re: [lng-odp] [PATCH 1/2] helper: fix compilation with warnings

2017-01-20 Thread Mike Holmes
I think this needs a rebase, latest master has brought new issues with the extra flags f2e960d :2016-12-29 - (HEAD -> master) configure.ac: helper: print debug config option * de503c9 :2016-12-29 - helper: fix compilation with warnings * 3875d6e :2017-01-13 - (tag: v1.13.0.0, origin/master,

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Brian Brooks
CAS is a universal primitive in the sense that you can construct those RMW ops by speculatively computing the updated value and the CAS to atomically update the value (in a retry loop). LL/SC also universal, but different behavior. Both are not the same as an atomic op performed deeper in the

Re: [lng-odp] [API-NEXT PATCH 1/4] api: timer: add odp_timer_capability() api

2017-01-20 Thread Mike Holmes
Hi Kevin How did you send these patches ? If you look in patchworks it can't identify them as a series and gives them odd names. http://patches.opendataplane.org/project/lng-odp/list/ Untitled series #10 Untitled series #11 Untitled series #12 Even though they claim to be (n) of 4 Perhaps you

Re: [lng-odp] [PATCH] linux-gen: _ishm: checking fstat return value.

2017-01-20 Thread Mike Holmes
On 20 January 2017 at 11:40, Christophe Milard wrote: > Hence fixing CID 174663 Adding: Fixes https://bugs.linaro.org/show_bug.cgi?id=2827 Makes it easy to track closing a bug > > Signed-off-by: Christophe Milard > --- >

Re: [lng-odp] [PATCH v2 1/2] linux-gen: netmap: fix interface flags initialization

2017-01-20 Thread Maxim Uvarov
On 01/09/17 13:56, Matias Elo wrote: > Previously netmap interface flags parsed by nm_open() were always > overwritten by netmap_start() function. In netmap v11.2 release this breaks > pipe interface initialization. Fix this by setting the netmap flags only > when needed. > > Signed-off-by:

Re: [lng-odp] [PATCH v2 1/2] linux-gen: align: round up power of two as macro

2017-01-20 Thread Bill Fischofer
On Fri, Jan 20, 2017 at 4:28 AM, Yi He wrote: > For this patch series, I've reviewed and tested good against master branch: > > Reviewed-and-tested-by: Yi He > > On api-next branch it encounters compilation error, what's our typical > solution for this kind of

Re: [lng-odp] [PATCH v2 1/2] linux-gen: align: round up power of two as macro

2017-01-20 Thread Bill Fischofer
For the v2 series: Reviewed-and-tested-by: Bill Fischofer On Fri, Jan 20, 2017 at 3:14 AM, Petri Savolainen wrote: > Implement round up to power of two as a macro. Macro > enables preprocessor to calculate the constant value and > avoid

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Bill Fischofer
On Fri, Jan 20, 2017 at 8:22 AM, Savolainen, Petri (Nokia - FI/Espoo) wrote: > > >> -Original Message- >> From: Bill Fischofer [mailto:bill.fischo...@linaro.org] >> Sent: Friday, January 20, 2017 4:13 PM >> To: Savolainen, Petri (Nokia - FI/Espoo)

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> -Original Message- > From: Bill Fischofer [mailto:bill.fischo...@linaro.org] > Sent: Friday, January 20, 2017 4:13 PM > To: Savolainen, Petri (Nokia - FI/Espoo) labs.com> > Cc: lng-odp-forward > Subject: Re: [lng-odp] [PATCH

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Bill Fischofer
On Fri, Jan 20, 2017 at 3:33 AM, Savolainen, Petri (Nokia - FI/Espoo) wrote: >> -Original Message- >> From: Bill Fischofer [mailto:bill.fischo...@linaro.org] >> Sent: Thursday, January 19, 2017 11:53 PM >> To: Savolainen, Petri (Nokia - FI/Espoo)

[lng-odp] [PATCH v2 3/8] abi: classifier: added initial definitions

2017-01-20 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Removed unused type definitions, documentation of those need to be still removed for API spec. Signed-off-by: Petri Savolainen

[lng-odp] [PATCH v2 1/8] abi: event: added the first ABI spec file

2017-01-20 Thread Petri Savolainen
Used event API as the first example of an ABI spec file. Used the same default architecture file initially for all architectures. Default ABI files avoid multiple copies of the same definition. Signed-off-by: Petri Savolainen --- configure.ac

[lng-odp] [PATCH v2 0/8] First ABI files

2017-01-20 Thread Petri Savolainen
Added initial version of couple of ABI specification files. These files define types/values that are implementation specific in the API spec. For ABI compatibility, application and implementation need to use these definitions (based on the target architecture). ABI is defined by CPU ISA

[lng-odp] [PATCH v2 6/8] abi: pool: added initial definitions

2017-01-20 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen --- example/timer/odp_timer_test.c | 2 +-

[lng-odp] [PATCH v2 4/8] abi: crypto: added initial definitions

2017-01-20 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen --- include/odp/arch/arm32-linux/odp/api/abi/crypto.h | 7 +

[lng-odp] [PATCH v2 5/8] abi: packet: added initial definitions

2017-01-20 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen --- include/odp/arch/arm32-linux/odp/api/abi/packet.h | 7

[lng-odp] [PATCH v2 8/8] abi: shm: added initial definitions

2017-01-20 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen --- .../arch/arm32-linux/odp/api/abi/shared_memory.h | 7 +

[lng-odp] [PATCH v2 2/8] abi: buffer: added initial definitions

2017-01-20 Thread Petri Savolainen
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen --- include/odp/arch/arm32-linux/odp/api/abi/buffer.h | 7

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> > I think we should stop right here of doing "significant changes" through > api-next. Last time that policy effectively stopped the work in master due > to dependencies over many files changed. Api-next should be reserved only > for API spec changing modifications, since only those are visible

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Bill Fischofer
On Fri, Jan 20, 2017 at 7:22 AM, Mike Holmes wrote: > Note, "driver" would stage though next for CI to look at it just as > api-next does. > > On 20 January 2017 at 08:08, Mike Holmes wrote: >> On 20 January 2017 at 04:33, Savolainen, Petri (Nokia

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Francois Ozog
well, yes. But that is the only atomic operation supported. No add, sub, inc, xadd, bit operations Le ven. 20 janv. 2017 à 14:31, Joe Savage a écrit : > > I wonder what processor supports 128 bits atomics. As far as I know Intel > > > does not support it. Lock prefix is

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Joe Savage
> I wonder what processor supports 128 bits atomics. As far as I know Intel > does not support it. Lock prefix is not allowed on SSE instructions. Actually, Intel does support them through a locked cmpxchg16b. And ARMv8 through load exclusive pair and store exclusive pair.

Re: [lng-odp] [PATCH v3 0/4] remove Linux specifics and dependence on test dir

2017-01-20 Thread Mike Holmes
Maxim had two small points, I will fix just those with a v4 and carry your review forward if that is ok On 20 January 2017 at 02:05, Christophe Milard wrote: > For the series: > > Reviewed-by: Christophe Milard > > > On 18 January 2017

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Mike Holmes
Note, "driver" would stage though next for CI to look at it just as api-next does. On 20 January 2017 at 08:08, Mike Holmes wrote: > On 20 January 2017 at 04:33, Savolainen, Petri (Nokia - FI/Espoo) > wrote: >>> -Original

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Francois Ozog
I wonder what processor supports 128 bits atomics. As far as I know Intel does not support it. Lock prefix is not allowed on SSE instructions. FF Le ven. 20 janv. 2017 à 13:59, Joe Savage a écrit : > > Unfortunately, ODP atomics API does not support 128 bit atomics - at >

Re: [lng-odp] memory allocation issues

2017-01-20 Thread Maxim Uvarov
On 01/19/17 19:18, Steve Capper wrote: > On 19 January 2017 at 13:04, Christophe Milard > wrote: >> Hi Steve, > > Hey Christophe, > >> >> Maybe you remember me as we have had contact before. Christophe. from >> the LNG ODP team (mikes Holmes team). >> >> I have

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Mike Holmes
On 20 January 2017 at 04:33, Savolainen, Petri (Nokia - FI/Espoo) wrote: >> -Original Message- >> From: Bill Fischofer [mailto:bill.fischo...@linaro.org] >> Sent: Thursday, January 19, 2017 11:53 PM >> To: Savolainen, Petri (Nokia - FI/Espoo)

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Joe Savage
> Unfortunately, ODP atomics API does not support 128 bit atomics - at least > currently. So, your example could not use those anyway. Not all 64 CPUs > have 128 bit atomic instructions. Yes, this is unfortunate. For the time being I am using GCC's __atomic operations such as

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> -Original Message- > From: Joe Savage [mailto:joe.sav...@arm.com] > Sent: Friday, January 20, 2017 1:51 PM > To: Savolainen, Petri (Nokia - FI/Espoo) labs.com>; Maxim Uvarov ; lng- > o...@lists.linaro.org; Bill Fischofer

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Joe Savage
> Agree with Maxim. I which way the application is not 32 bit compliant? It uses 128-bit atomics, and so is really designed for execution on 64-bit machines. It is possible to provide lockless 32-bit support in this case, though, and I have an implementation that does so. Since the pointer size

Re: [lng-odp] 32-bit support in examples

2017-01-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> -Original Message- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Maxim > Uvarov > Sent: Thursday, January 19, 2017 3:27 PM > To: lng-odp@lists.linaro.org > Subject: Re: [lng-odp] 32-bit support in examples > > On 01/19/17 16:23, Joe Savage wrote: > > Hey, > >

Re: [lng-odp] [PATCH v2 1/2] linux-gen: align: round up power of two as macro

2017-01-20 Thread Yi He
For this patch series, I've reviewed and tested good against master branch: Reviewed-and-tested-by: Yi He On api-next branch it encounters compilation error, what's our typical solution for this kind of problem? _ishmpool.c:209:3: error: implicit declaration of function ‘

Re: [lng-odp] Scheduling packets from control threads

2017-01-20 Thread Radosław Biernacki
Hi, I would propose to add more clear description about posibility of calling the ODP API for event and packet processing. For e.g it is unclear now if CONTROL threads can operate on queues or scheduler. 51 * Control threads do not participate the main packet flow through the 52

Re: [lng-odp] [PATCH 0/8] First ABI files

2017-01-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> -Original Message- > From: Bill Fischofer [mailto:bill.fischo...@linaro.org] > Sent: Thursday, January 19, 2017 11:53 PM > To: Savolainen, Petri (Nokia - FI/Espoo) labs.com> > Cc: lng-odp-forward > Subject: Re: [lng-odp] [PATCH

Re: [lng-odp] [PATCH] linux-gen: align: round up power of two as macro

2017-01-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> +#define ODP_ROUNDUP_POWER2_U32(x) \ > +       (((x) > 0x8000) ? 0 : (_POW2_U32_R5(x - 1) + 1)) > > it's better to not name internal macros with ODP_ > > > Agree, but that's the current convention over the odp_align_interal.h. All > are internal macros and are ODP_ prefixed. Another

Re: [lng-odp] [PATCH] linux-gen: align: round up power of two as macro

2017-01-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> > /** > > * @internal > > - * When 'x' is not already a power of two, round it up to the next > > - * power of two value. Zero is not supported as an input value. > > - */ > > -#define ODP_ROUNDUP_POWER_2(x)\ > > - (1 << (((int)(8 * sizeof(x))) - __builtin_clz((x) - 1))) > > + * Round

[lng-odp] [PATCH v2 2/2] linux-gen: align: clean up macros

2017-01-20 Thread Petri Savolainen
Removed unused macros from odp_align_internal.h. Renamed remaining macros without ODP_ prefix and with shorter names. Signed-off-by: Petri Savolainen --- .../linux-generic/include/odp_align_internal.h | 88 ++

[lng-odp] [PATCH v2 1/2] linux-gen: align: round up power of two as macro

2017-01-20 Thread Petri Savolainen
Implement round up to power of two as a macro. Macro enables preprocessor to calculate the constant value and avoid code generation. Also dependency to __builtin_clz() is not needed anymore. Signed-off-by: Petri Savolainen ---

Re: [lng-odp] Scheduling packets from control threads

2017-01-20 Thread Stanislaw Kardach
On 01/19/2017 06:06 PM, Bill Fischofer wrote: On Thu, Jan 19, 2017 at 10:03 AM, Stanislaw Kardach wrote: Best Regards, Stanislaw Kardach On 01/19/2017 04:57 PM, Bill Fischofer wrote: On Thu, Jan 19, 2017 at 7:17 AM, Stanislaw Kardach wrote: Hi

[lng-odp] [PATCH] linux-gen: _ishm: fix normal page fallback

2017-01-20 Thread Christophe Milard
Fixing failure due to lack of huge pages. Signed-off-by: Christophe Milard --- platform/linux-generic/_ishm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index