Re: [lng-odp] [PATCH v2 2/2] travis: enable samples and tests when make distcheck

2017-06-20 Thread Yi He
Thanks Maxim and Dmitry

Yes, these patches actually fix problems in installcheck, I'll add a
.travis installcheck target as Maxim suggested, run local tests and then
update the PR.

2) Would it make sense to run make installcheck with all possible
options enabled?

[]: Found that --with-dpdk-path=`pwd`/dpdk/${TARGET}
--with-netmap-path=`pwd`/netmap introduces further failures in
installcheck, if needed I'll add the patches in this PR.

Best Regards, Yi


On 21 June 2017 at 05:44, Dmitry Eremin-Solenikov <
dmitry.ereminsoleni...@linaro.org> wrote:

> On 20.06.2017 22:53, Maxim Uvarov wrote:
> > Yi, how about something like:
> >
> > diff --git a/.travis.yml b/.travis.yml
> > index 50b3b9c2..3d641209 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -139,6 +139,13 @@ jobs:
> >- ./configure
> >- sudo
> > LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
> >  - stage: test
> > +  env: TEST=install-check
> > +  compiler: gcc
> > +  script:
> > +  - ./bootstrap
> > +  - ./configure
> > +  - sudo
> > LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make install-check
>
> 1) There is no install-check target, only installcheck (at least with
> Automake 1.15)
>
> 2) Would it make sense to run make installcheck with all possible
> options enabled?
>
> > +- stage: test
> >env: TEST=doxygen
> >compiler: gcc
> >script:
> >
> >
> > On 06/19/17 11:00, Github ODP bot wrote:
> >> From: Yi He 
> >>
> >> enable samples and tests when make distcheck to
> >> confirm samples and test programs installation and
> >> distribution builds.
> >>
> >> Signed-off-by: Yi He 
> >> ---
> >> /** Email created from pull request 35 (heyi-linaro:install-check)
> >>  ** https://github.com/Linaro/odp/pull/35
> >>  ** Patch: https://github.com/Linaro/odp/pull/35.patch
> >>  ** Base sha: 4bda102286cf55b0bc93fdf8f8f276d5528fdf14
> >>  ** Merge commit sha: 44aa7de8407d751055353d99ed665dc7733f8dbb
> >>  **/
> >>  .travis.yml | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/.travis.yml b/.travis.yml
> >> index 50b3b9c2..8407906e 100644
> >> --- a/.travis.yml
> >> +++ b/.travis.yml
> >> @@ -136,7 +136,7 @@ jobs:
> >>compiler: gcc
> >>script:
> >>- ./bootstrap
> >> -  - ./configure
> >> +  - ./configure --prefix=$HOME/odp-install
> --enable-test-cpp --enable-test-vald --enable-test-helper
> --enable-test-perf --enable-test-perf-proc --enable-test-example
> --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap
> >>- sudo 
> >> LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
> make distcheck
> >>  - stage: test
> >>env: TEST=doxygen
> >>
> >
>
>
> --
> With best wishes
> Dmitry
>


Re: [lng-odp] [API-NEXT PATCH v9 0/6] A scalable software scheduler

2017-06-20 Thread Bill Fischofer
Now that master has been merged back into api-next I can confirm that
make distcheck fails for 64-bit systems as well, so I need to withdraw
my earlier reviewed-and-tested-by until that is fixed.

On Mon, Jun 19, 2017 at 6:13 PM, Bill Fischofer
 wrote:
> Looks like I posted a wee bit too soon. On a 32-bit system:
>
> bill@Ub16-32:~/linaro/armschedv9$ make distcheck
> make  dist-gzip am__post_remove_distdir='@:'
> make[1]: Entering directory '/home/bill/linaro/armschedv9'
> if test -d "opendataplane-1.14.0.0"; then find
> "opendataplane-1.14.0.0" -type d ! -perm -200 -exec chmod u+w {} ';'
> && rm -rf "opendataplane-1.14.0.0" || { sleep 5 && rm -rf
> "opendataplane-1.14.0.0"; }; else :; fi
> test -d "opendataplane-1.14.0.0" || mkdir "opendataplane-1.14.0.0"
>  (cd platform/linux-generic && make
> top_distdir=../../opendataplane-1.14.0.0
> distdir=../../opendataplane-1.14.0.0/platform/linux-generic \
>  am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> make[2]: Entering directory
> '/home/bill/linaro/armschedv9/platform/linux-generic'
> make[2]: *** No rule to make target 'arch/x86/odp_atomic.h', needed by
> 'distdir'.  Stop.
> make[2]: Leaving directory 
> '/home/bill/linaro/armschedv9/platform/linux-generic'
> Makefile:603: recipe for target 'distdir' failed
> make[1]: *** [distdir] Error 1
> make[1]: Leaving directory '/home/bill/linaro/armschedv9'
> Makefile:702: recipe for target 'dist' failed
> make: *** [dist] Error 2
>
> On Mon, Jun 19, 2017 at 6:11 PM, Bill Fischofer
>  wrote:
>> For the v9 series:
>>
>> Reviewed-and-tested-by: Bill Fischofer 
>>
>> I also verified that there are no conflicts between this series and
>> Petri's queue cleanup patch, so this can apply and run just fine on
>> top of it. Maxim should be able to merge both tomorrow.
>>
>> On Mon, Jun 19, 2017 at 2:12 PM, Brian Brooks  wrote:
>>> This work derives from Ola Liljedahl's prototype [1] which introduced a
>>> scalable scheduler design based on primarily lock-free algorithms and
>>> data structures designed to decrease contention. A thread searches
>>> through a data structure containing only queues that are both non-empty
>>> and allowed to be scheduled to that thread. Strict priority scheduling is
>>> respected, and (W)RR scheduling may be used within queues of the same 
>>> priority.
>>> Lastly, pre-scheduling or stashing is not employed since it is optional
>>> functionality that can be implemented in the application.
>>>
>>> In addition to scalable ring buffers, the algorithm also uses unbounded
>>> concurrent queues. LL/SC and CAS variants exist in cases where absense of
>>> ABA problem cannot be proved, and also in cases where the compiler's atomic
>>> built-ins may not be lowered to the desired instruction(s). Finally, a 
>>> version
>>> of the algorithm that uses locks is also provided.
>>>
>>> Use --enable-schedule-scalable to conditionally compile this scheduler
>>> into the library.
>>>
>>> [1] https://lists.linaro.org/pipermail/lng-odp/2016-September/025682.html
>>>
>>> On checkpatch.pl:
>>>  - [2/6] and [5/6] have checkpatch.pl issues that are superfluous
>>>
>>> v9:
>>>  - Include patch to enable scalable scheduler in Travis CI
>>>  - Fix 'make distcheck'
>>>
>>> v8:
>>>  - Reword commit messages
>>>
>>> v7:
>>>  - Rebase against new modular queue interface
>>>  - Duplicate arch files under mips64 and powerpc
>>>  - Fix sched->order_lock()
>>>  - Loop until all deferred events have been enqueued
>>>  - Implement ord_enq_multi()
>>>  - Fix ordered_lock/unlock
>>>  - Revert stylistic changes
>>>  - Add default xfactor
>>>  - Remove changes to odp_sched_latency
>>>  - Remove ULL suffix to alleviate Clang build
>>>
>>> v6:
>>>  - Move conversions into scalable scheduler to alleviate #ifdefs
>>>  - Remove unnecessary prefetch
>>>  - Fix ARMv8 build
>>>
>>> v5:
>>>  - Allocate cache aligned memory using shm pool APIs
>>>  - Move more code to scalable scheduler specific files
>>>  - Remove CONFIG_SPLIT_READWRITE
>>>  - Fix 'make distcheck' issue
>>>
>>> v4:
>>>  - Fix a couple more checkpatch.pl issues
>>>
>>> v3:
>>>  - Only conditionally compile scalable scheduler and queue
>>>  - Move some code to arch/ dir
>>>  - Use a single shm block for queues instead of block-per-queue
>>>  - De-interleave odp_llqueue.h
>>>  - Use compiler macros to determine ATOM_BITSET_SIZE
>>>  - Incorporated queue size changes
>>>  - Dropped 'ODP_' prefix on config and moved to other files
>>>  - Dropped a few patches that were send independently to the list
>>>
>>> v2:
>>>  - Move ARMv8 issues and other fixes into separate patches
>>>  - Abstract away some #ifdefs
>>>  - Fix some checkpatch.pl warnings
>>>
>>> Brian Brooks (5):
>>>   test: odp_pktio_ordered: add queue size
>>>   linux-gen: sched scalable: add arch files
>>>   linux-gen: sched scalable: add a bitset
>>>   linux-gen: sched scalable: add a concurrent queue
>>>   linux-gen: sched scalable: add scalable scheduler
>>>
>>> Honnappa Nagarahalli (1):
>>>

Re: [lng-odp] [PATCH v2 2/2] travis: enable samples and tests when make distcheck

2017-06-20 Thread Dmitry Eremin-Solenikov
On 20.06.2017 22:53, Maxim Uvarov wrote:
> Yi, how about something like:
> 
> diff --git a/.travis.yml b/.travis.yml
> index 50b3b9c2..3d641209 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -139,6 +139,13 @@ jobs:
>- ./configure
>- sudo
> LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
>  - stage: test
> +  env: TEST=install-check
> +  compiler: gcc
> +  script:
> +  - ./bootstrap
> +  - ./configure
> +  - sudo
> LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make install-check

1) There is no install-check target, only installcheck (at least with
Automake 1.15)

2) Would it make sense to run make installcheck with all possible
options enabled?

> +- stage: test
>env: TEST=doxygen
>compiler: gcc
>script:
> 
> 
> On 06/19/17 11:00, Github ODP bot wrote:
>> From: Yi He 
>>
>> enable samples and tests when make distcheck to
>> confirm samples and test programs installation and
>> distribution builds.
>>
>> Signed-off-by: Yi He 
>> ---
>> /** Email created from pull request 35 (heyi-linaro:install-check)
>>  ** https://github.com/Linaro/odp/pull/35
>>  ** Patch: https://github.com/Linaro/odp/pull/35.patch
>>  ** Base sha: 4bda102286cf55b0bc93fdf8f8f276d5528fdf14
>>  ** Merge commit sha: 44aa7de8407d751055353d99ed665dc7733f8dbb
>>  **/
>>  .travis.yml | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/.travis.yml b/.travis.yml
>> index 50b3b9c2..8407906e 100644
>> --- a/.travis.yml
>> +++ b/.travis.yml
>> @@ -136,7 +136,7 @@ jobs:
>>compiler: gcc
>>script:
>>- ./bootstrap
>> -  - ./configure
>> +  - ./configure --prefix=$HOME/odp-install 
>> --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf 
>> --enable-test-perf-proc --enable-test-example 
>> --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap
>>- sudo 
>> LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
>>  - stage: test
>>env: TEST=doxygen
>>
> 


-- 
With best wishes
Dmitry


Re: [lng-odp] [PATCH v2 2/2] travis: enable samples and tests when make distcheck

2017-06-20 Thread Maxim Uvarov
Yi, how about something like:

diff --git a/.travis.yml b/.travis.yml
index 50b3b9c2..3d641209 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -139,6 +139,13 @@ jobs:
   - ./configure
   - sudo
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
 - stage: test
+  env: TEST=install-check
+  compiler: gcc
+  script:
+  - ./bootstrap
+  - ./configure
+  - sudo
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make install-check
+- stage: test
   env: TEST=doxygen
   compiler: gcc
   script:


On 06/19/17 11:00, Github ODP bot wrote:
> From: Yi He 
> 
> enable samples and tests when make distcheck to
> confirm samples and test programs installation and
> distribution builds.
> 
> Signed-off-by: Yi He 
> ---
> /** Email created from pull request 35 (heyi-linaro:install-check)
>  ** https://github.com/Linaro/odp/pull/35
>  ** Patch: https://github.com/Linaro/odp/pull/35.patch
>  ** Base sha: 4bda102286cf55b0bc93fdf8f8f276d5528fdf14
>  ** Merge commit sha: 44aa7de8407d751055353d99ed665dc7733f8dbb
>  **/
>  .travis.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 50b3b9c2..8407906e 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -136,7 +136,7 @@ jobs:
>compiler: gcc
>script:
>- ./bootstrap
> -  - ./configure
> +  - ./configure --prefix=$HOME/odp-install 
> --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf 
> --enable-test-perf-proc --enable-test-example 
> --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap
>- sudo 
> LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
>  - stage: test
>env: TEST=doxygen
> 



Re: [lng-odp] [PATCH v2 2/2] travis: enable samples and tests when make distcheck

2017-06-20 Thread Maxim Uvarov
No, that patch is not correct. Take a look at top level Makefile.am:
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-test-cpp \
   --enable-test-perf \
   --enable-test-vald \
   --with-testdir

parameters to configure are skipped and only that one are used.

Maxim.


On 06/19/17 11:00, Github ODP bot wrote:
> From: Yi He 
> 
> enable samples and tests when make distcheck to
> confirm samples and test programs installation and
> distribution builds.
> 
> Signed-off-by: Yi He 
> ---
> /** Email created from pull request 35 (heyi-linaro:install-check)
>  ** https://github.com/Linaro/odp/pull/35
>  ** Patch: https://github.com/Linaro/odp/pull/35.patch
>  ** Base sha: 4bda102286cf55b0bc93fdf8f8f276d5528fdf14
>  ** Merge commit sha: 44aa7de8407d751055353d99ed665dc7733f8dbb
>  **/
>  .travis.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 50b3b9c2..8407906e 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -136,7 +136,7 @@ jobs:
>compiler: gcc
>script:
>- ./bootstrap
> -  - ./configure
> +  - ./configure --prefix=$HOME/odp-install 
> --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf 
> --enable-test-perf-proc --enable-test-example 
> --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap
>- sudo 
> LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
>  - stage: test
>env: TEST=doxygen
> 



Re: [lng-odp] [API-NEXT PATCH] linux-gen: queue: clean up after modular interface

2017-06-20 Thread Bill Fischofer
Reviewed-and-tested-by: Bill Fischofer 

On Tue, Jun 20, 2017 at 2:10 PM Maxim Uvarov 
wrote:

> Does anybody wants to add his review to this patch? According to call a
> lot of people needed this patch but no review provided.
>
> Maxim.
>
> On 06/19/17 15:54, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> >
> >> I think queue_t should be removed completely. We should just use
> >> odp_queue_t for internal interfaces as well. Looking at the code,
> >> using odp_queue_t would introduce 3 extra addition instructions and
> >> the impact to cache does not change. We can run l2fwd benchmark and
> >> compare the numbers. This would keep the code simple as well.
> >
> > First, this comment highlights why one direct function call provides
> better modularity than unnecessary exposition of an internal mid type. With
> handle_to_qentry() we can change, or even remove, the mid type without need
> to touch any of the call sites.
> >
> >  queue_entry_t *queue;
> >  odp_buffer_hdr_t *buf_hdr;
> >
> >  -   queue   = qentry_from_int(queue_from_ext(handle));
> >  +   queue   = handle_to_qentry(handle);
> >
> >
> > Secondly, the internal queue pointer (or table index - format does not
> matter) is needed to avoid doing the same conversion multiple times. We are
> inside implementation, and it improves performance when the number of
> odp_queue_t to pointer (qentry) conversions per packet is minimized.
> >
> > After this basic clean up is merged, I'll look into the queue interface
> definition and optimize it. This current version is just a dummy,
> copy-paste replacement of qentry->xxx with fn_queue->xxx(). Which is OK for
> the first stage, but certainly not optimal/final solution.
> >
> > -Petri
> >
> >
>
>


Re: [lng-odp] [PATCH] arch: arm: add CPU global time

2017-06-20 Thread Maxim Uvarov
Merged,
Maxim.

On 06/08/17 07:04, Bill Fischofer wrote:
> On Wed, Jun 7, 2017 at 10:46 PM, Brian Brooks  wrote:
>> Expose ARMv8 Generic Timer through internal CPU global time functions.
>>
>> Signed-off-by: Brian Brooks 
> 
> Reviewed-by: Bill Fischofer 
> 
>>
>> ---
>>
>> v2:
>>  - Add text to explain the usage of the ARM architected timer (Petri)
>>
>>
>>  platform/linux-generic/arch/arm/odp_cpu_arch.c | 38 
>> +-
>>  1 file changed, 37 insertions(+), 1 deletion(-)
>>
>> diff --git a/platform/linux-generic/arch/arm/odp_cpu_arch.c 
>> b/platform/linux-generic/arch/arm/odp_cpu_arch.c
>> index c31f9084..91d439d9 100644
>> --- a/platform/linux-generic/arch/arm/odp_cpu_arch.c
>> +++ b/platform/linux-generic/arch/arm/odp_cpu_arch.c
>> @@ -50,15 +50,51 @@ uint64_t odp_cpu_cycles_resolution(void)
>>
>>  int cpu_has_global_time(void)
>>  {
>> -   return 0;
>> +   uint64_t hz = cpu_global_time_freq();
>> +
>> +   /*
>> +* The system counter portion of the architected timer must
>> +* provide a uniform view of system time to all processing
>> +* elements in the system. This should hold true even for
>> +* heterogeneous SoCs.
>> +*
>> +* Determine whether the system has 'global time' by checking
>> +* whether a read of the architected timer frequency sys reg
>> +* returns a sane value. Sane is considered to be within
>> +* 1MHz and 6GHz (1us and .1667ns period).
>> +*/
>> +   return hz >= 100 && hz <= 60;
>>  }
>>
>>  uint64_t cpu_global_time(void)
>>  {
>> +#if __ARM_ARCH == 8
>> +   uint64_t cntvct;
>> +
>> +   /*
>> +* To be consistent with other architectures, do not issue a
>> +* serializing instruction, e.g. ISB, before reading this
>> +* sys reg.
>> +*/
>> +
>> +   /* Memory clobber to minimize optimization around load from sys reg. 
>> */
>> +   __asm__ volatile("mrs %0, cntvct_el0" : "=r"(cntvct) : : "memory");
>> +
>> +   return cntvct;
>> +#else
>> return 0;
>> +#endif
>>  }
>>
>>  uint64_t cpu_global_time_freq(void)
>>  {
>> +#if __ARM_ARCH == 8
>> +   uint64_t cntfrq;
>> +
>> +   __asm__ volatile("mrs %0, cntfrq_el0" : "=r"(cntfrq) : : );
>> +
>> +   return cntfrq;
>> +#else
>> return 0;
>> +#endif
>>  }
>> --
>> 2.13.0
>>



[lng-odp] [Linaro/odp] 0d24ad: arch: arm: add CPU global time

2017-06-20 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: 0d24adacfe17c8e0e1348f19cd8b75b64cb13ccf
  
https://github.com/Linaro/odp/commit/0d24adacfe17c8e0e1348f19cd8b75b64cb13ccf
  Author: Brian Brooks 
  Date:   2017-06-20 (Tue, 20 Jun 2017)

  Changed paths:
M platform/linux-generic/arch/arm/odp_cpu_arch.c

  Log Message:
  ---
  arch: arm: add CPU global time

Expose ARMv8 Generic Timer through internal CPU global time functions.

Signed-off-by: Brian Brooks 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 




Re: [lng-odp] [API-NEXT PATCH] linux-gen: queue: clean up after modular interface

2017-06-20 Thread Maxim Uvarov
Does anybody wants to add his review to this patch? According to call a
lot of people needed this patch but no review provided.

Maxim.

On 06/19/17 15:54, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> 
>> I think queue_t should be removed completely. We should just use
>> odp_queue_t for internal interfaces as well. Looking at the code,
>> using odp_queue_t would introduce 3 extra addition instructions and
>> the impact to cache does not change. We can run l2fwd benchmark and
>> compare the numbers. This would keep the code simple as well.
> 
> First, this comment highlights why one direct function call provides better 
> modularity than unnecessary exposition of an internal mid type. With 
> handle_to_qentry() we can change, or even remove, the mid type without need 
> to touch any of the call sites.
> 
>  queue_entry_t *queue;
>  odp_buffer_hdr_t *buf_hdr;
> 
>  -   queue   = qentry_from_int(queue_from_ext(handle));
>  +   queue   = handle_to_qentry(handle);
> 
> 
> Secondly, the internal queue pointer (or table index - format does not 
> matter) is needed to avoid doing the same conversion multiple times. We are 
> inside implementation, and it improves performance when the number of 
> odp_queue_t to pointer (qentry) conversions per packet is minimized.
> 
> After this basic clean up is merged, I'll look into the queue interface 
> definition and optimize it. This current version is just a dummy, copy-paste 
> replacement of qentry->xxx with fn_queue->xxx(). Which is OK for the first 
> stage, but certainly not optimal/final solution.
> 
> -Petri
> 
> 



[lng-odp] [Linaro/odp] a48979: scripts: checkpatch: revert code modification

2017-06-20 Thread GitHub
  Branch: refs/heads/api-next
  Home:   https://github.com/Linaro/odp
  Commit: a48979af5b36c11fb5c7f8d2c6029c12bb191b51
  
https://github.com/Linaro/odp/commit/a48979af5b36c11fb5c7f8d2c6029c12bb191b51
  Author: Petri Savolainen 
  Date:   2017-06-01 (Thu, 01 Jun 2017)

  Changed paths:
M scripts/checkpatch.pl

  Log Message:
  ---
  scripts: checkpatch: revert code modification

Checkpatch code should not be modified directly. When the code
is updated to a next version, any local modifications would
be lost and needed to be done again.

Camelcase check is enabled again. Exceptions to camelcase are
allowed e.g. when calling an external library interface.

Signed-off-by: Petri Savolainen 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 15ea6562d284bd5f2bd20e9b79bd102db106555c
  
https://github.com/Linaro/odp/commit/15ea6562d284bd5f2bd20e9b79bd102db106555c
  Author: Petri Savolainen 
  Date:   2017-06-01 (Thu, 01 Jun 2017)

  Changed paths:
M .checkpatch.conf

  Log Message:
  ---
  scripts: checkpatch: ignore volatile and extern warnings

These warnings were disabled with code modification. Use
checkpatch config file to ignore those.

Signed-off-by: Petri Savolainen 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: e6be64e01589f1aa335ea178e8314bf35ad34847
  
https://github.com/Linaro/odp/commit/e6be64e01589f1aa335ea178e8314bf35ad34847
  Author: Petri Savolainen 
  Date:   2017-06-01 (Thu, 01 Jun 2017)

  Changed paths:
M scripts/spelling.txt

  Log Message:
  ---
  scripts: spelling: update to latest version

Updated Linux spelling file to it's latest version.

Signed-off-by: Petri Savolainen 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 8d19f94fd96eb5a411eafb75c487dc3f972297bd
  
https://github.com/Linaro/odp/commit/8d19f94fd96eb5a411eafb75c487dc3f972297bd
  Author: Brian Brooks 
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
M DEPENDENCIES
M configure.ac
M pkgconfig/libodp-linux.pc.in
M platform/linux-generic/Makefile.am
M platform/linux-generic/m4/configure.m4

  Log Message:
  ---
  build: GCC 7 fixes

The GCC 7 series introduces changes that expose ODP compilation
issues. These include case statement fall through warnings, and
stricter checks on potential string overflows and other semantic
analysis.

Fixes: https://bugs.linaro.org/show_bug.cgi?id=3027

Signed-off-by: Brian Brooks 
Reviewed-by: Ola Liljedahl 
Reviewed-by: Honnappa Nagarahalli 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 61a5edca59780fc2a4a0e656e09738145892a3a0
  
https://github.com/Linaro/odp/commit/61a5edca59780fc2a4a0e656e09738145892a3a0
  Author: Brian Brooks 
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
M test/common_plat/validation/api/pktio/pktio.c

  Log Message:
  ---
  pktio: GCC 7 fixes

The GCC 7 series introduces changes that expose ODP compilation
issues. These include case statement fall through warnings, and
stricter checks on potential string overflows and other semantic
analysis.

Fixes: https://bugs.linaro.org/show_bug.cgi?id=3027

Signed-off-by: Brian Brooks 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 7cf390d11e69f6b677e6fbfd6414944737406fc3
  
https://github.com/Linaro/odp/commit/7cf390d11e69f6b677e6fbfd6414944737406fc3
  Author: Maxim Uvarov 
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  travis: add dependency of autoconf-archive

autoconf-archive dependency was added with gcc 7 req.
This also need to be in .travis.

Signed-off-by: Maxim Uvarov 
Reviewed-by: Bill Fischofer 
Reviewed-by: Brian Brooks 


  Commit: 373f97f88d327ca0e211df33d6fcaad0b9188a1c
  
https://github.com/Linaro/odp/commit/373f97f88d327ca0e211df33d6fcaad0b9188a1c
  Author: Matias Elo 
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
M platform/linux-generic/include/odp_packet_socket.h
M platform/linux-generic/pktio/socket.c

  Log Message:
  ---
  linux-gen: socket: remove limits for maximum RX/TX burst size

Remove unnecessary limits for maximum RX/TX burst size.

Fixes: https://bugs.linaro.org/show_bug.cgi?id=3039

Signed-off-by: Matias Elo 
Reviewed-and-tested-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 248ebf35eaf51d962e9d14a4e2c541d3cbc96268
  
https://github.com/Linaro/odp/commit/248ebf35eaf51d962e9d14a4e2c541d3cbc96268
  Author: Matias Elo 
  Date:   2017-06-14 (Wed, 14 Jun 2017)

  Changed paths:
M platform/linux-generic/pktio/socket.c

  Log Message:
  ---
  linux-gen: socket: streamline sock_mmsg_recv() function

Use the same main code path when operating with or without classifier.

Signed-off-by: Matias Elo 
Reviewed-and-tested-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: aadd1d62084191bf2fb909a7dbedee628b197929
  
https://github.com/Linaro/odp/commit/a

Re: [lng-odp] [API-NEXT PATCH v3] api: pool: additional packet length configuration

2017-06-20 Thread Bill Fischofer
On Thu, Jun 15, 2017 at 9:21 AM, Petri Savolainen
 wrote:
> Added packet pool parameters for more fine grained pool
> configuration. The basic usage of the parameters is not changed,
> except that implementation may now round up 'num' by default.
> Application can limit the round up with new 'max_num' parameter.
> Another new parameter (opt) allows application give hints and
> requirements about e.g. memory to be used for a pool (or parts
> of the pool).
>
> Additionally, pool configuration may be extended with a table of
> num/len/opt values. This gives application more flexibility to
> specify requirements for various packet sizes.
>
> For example, the new specification allows to create this kind of
> pool:
>
> ^
> |
> max_num | - - - - - - - -
> |
> |   *
> NUM |   * *
> |   * * *
> | o * * * *
> | o * * * * *
> +--->
>   LEN
>
> o == small number of short packets into fast memory
> * == all other packets into DDR
>
> Signed-off-by: Petri Savolainen 
> ---
>  include/odp/api/spec/pool.h | 132 
> +++-
>  1 file changed, 118 insertions(+), 14 deletions(-)
>
> diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h
> index 6fc5b6b4..6b4e7495 100644
> --- a/include/odp/api/spec/pool.h
> +++ b/include/odp/api/spec/pool.h
> @@ -41,6 +41,9 @@ extern "C" {
>   * Maximum pool name length in chars including null char
>   */
>
> +/** Maximum number of packet pool subparameters */
> +#define ODP_POOL_PKT_SUB_MAX  7

Should this be defined in the spec or left to the implementation?
Other various MAX things are left to implementations and exposed via
odp_pool_capability(). That would seem to be more flexible.

> +
>  /**
>   * Pool capabilities
>   */
> @@ -156,6 +159,30 @@ typedef struct odp_pool_capability_t {
>  int odp_pool_capability(odp_pool_capability_t *capa);
>
>  /**
> + * Pool memory type
> + */
> +typedef enum odp_pool_mem_type_t {
> +   /** Default memory type */
> +   ODP_POOL_MEM_DEFAULT = 0,
> +
> +   /** Fast memory. Some implementations may have a restricted amount of
> +*  (e.g. chip internal) pool memory that is faster access than the
> +*  default memory type. */
> +   ODP_POOL_MEM_FAST

Can we find a better name than "FAST" here? Why wouldn't every
application want to be fast? The idea here is that there is a memory
hierarchy that may be multi-level and present various tradeoffs in
terms of capacity and access speed. To the extent that such a
hierarchy is present on a given platform and visible to ODP
applications it may be desirable to allow the application to express
preferences in this regard. But the question is how can this be done
in a reasonably system-independent manner? Especially when we consider
operating in an NFV environment where there are hypervisors and/or
containers added into the mix.

So before we can say what needs to be input to odp_pool_param_t, don't
we need to say what is output from odp_pool_capability() to allow the
application to make informed decisions in this area? Information like:
Number of memory levels available, relative speeds and/or capacities,
etc.

Also, I continue to believe it may be premature to try to optimize in
this direction without addressing the long-deferred overall NUMA
questions and perhaps how this may also relate to header splitting. It
seems to me that lumping packets together simply by size is a very
coarse tradeoff, as if there are truly limited resources doing this on
a flow basis may make a lot more sense (e.g., high priority alerts
should get best service, etc.). Alternately, for general traffic,
being able to say that I want fast access to packet headers and are
less concerned with payload represents a large use case that's not
addressed here.

This whole area really falls into the QoS topic and so questions of
how this ties into RED and other QoS controls also comes into play. So
it may be best to omit mem_type at this stage and just focus on the
subpools. We can add mem_type info back later as part of a more
comprehensive set of strategies for advanced QoS management.

> +
> +} odp_pool_mem_type_t;
> +
> +/**
> + * Additional options for packet pool creation
> + */
> +typedef struct odp_pool_pkt_opt_t {
> +   /** Pool memory type. Hint which memory type should be used for the
> +*  pool or a subset of the pool. */
> +   odp_pool_mem_type_t mem_type;
> +
> +} odp_pool_pkt_opt_t;

odp_pool_pkt_opt_t might be a good place to add info about header
splits, etc. Again it may be best to defer these sort of tuning
controls from this stage of the enhancement.

> +
> +/**
>   * Pool parameters
>   * Used to communicate pool creation options.
>   * @note A single thread may not be able to allocate all 'num' elements
> @@ -185,35 +212,96 @@ typedef struct odp_pool_param_t {
>
> /** Parameters for packet pools */
> struct {
>

[lng-odp] [Bug 3039] Socket pktio recv fails on large number of packet

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3039

Bill Fischofer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |IN_PROGRESS
 CC||bill.fischo...@linaro.org
 Ever confirmed|0   |1

--- Comment #5 from Bill Fischofer  ---
Fix merged and part of ODP v1.15. Patch for Monarch LTS posted.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[lng-odp] [Bug 3003] AES-GCM returns 'valid' tag when checking invalid tag

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3003

Bill Fischofer  changed:

   What|Removed |Added

 CC||bill.fischo...@linaro.org
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #6 from Bill Fischofer  ---
Fix merged and part of ODP v1.15

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[lng-odp] [Bug 3002] Packet order lost when enqueuing to pktout queue

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3002

Bill Fischofer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
 CC||bill.fischo...@linaro.org

--- Comment #3 from Bill Fischofer  ---
Fix merged and part of ODP v1.15

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[lng-odp] [Bug 2974] odp_rwlock_read_trylock() fails if lock is already held for read access

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2974

Bill Fischofer  changed:

   What|Removed |Added

 Status|IN_PROGRESS |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Bill Fischofer  ---
Fix merged and part of ODP v1.15

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[lng-odp] [Bug 3013] Various failures if CONFIG_PACKET_MAX_SEGS is set to 1

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3013

Bill Fischofer  changed:

   What|Removed |Added

 Status|IN_PROGRESS |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Bill Fischofer  ---
Fix merged and part of ODP v1.15

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[lng-odp] [Bug 3027] Compilation failures using GCC 7 series

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3027

Bill Fischofer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Bill Fischofer  ---
Fix merged and part of ODP v1.15

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[lng-odp] [Bug 3052] api-next out of tree build broken

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3052

Bill Fischofer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||bill.fischo...@linaro.org
 Resolution|--- |FIXED

--- Comment #4 from Bill Fischofer  ---
Fix is now merged

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [lng-odp] [API-NEXT PATCH v9 5/6] linux-gen: sched scalable: add scalable scheduler

2017-06-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> --- a/platform/linux-generic/include/odp_config_internal.h
> +++ b/platform/linux-generic/include/odp_config_internal.h
> @@ -7,9 +7,7 @@
>  #ifndef ODP_CONFIG_INTERNAL_H_
>  #define ODP_CONFIG_INTERNAL_H_
> 
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> +#include 

Why these configs need global visibility? This file should contain general 
configuration options. 

> 
>  /*
>   * Maximum number of pools
> @@ -22,6 +20,13 @@ extern "C" {
>  #define ODP_CONFIG_QUEUES 1024
> 
>  /*
> + * Maximum queue depth. Maximum number of elements that can be stored in
> a
> + * queue. This value is used only when the size is not explicitly
> provided
> + * during queue creation.
> + */
> +#define CONFIG_QUEUE_SIZE 4096
> +
> +/*
>   * Maximum number of ordered locks per queue
>   */
>  #define CONFIG_QUEUE_MAX_ORD_LOCKS 4
> @@ -120,7 +125,7 @@ extern "C" {
>   *
>   * This the the number of separate SHM areas that can be reserved
> concurrently
>   */
> -#define ODPDRV_CONFIG_SHM_BLOCKS 48
> +#define ODPDRV_CONFIG_SHM_BLOCKS ODP_CONFIG_SHM_BLOCKS


Is this change necessary? Increases driver memory usage for no reason?


> +
> +#endif  /* ODP_SCHEDULE_SCALABLE_H */
> diff --git a/platform/linux-generic/include/odp_schedule_scalable_config.h
> b/platform/linux-generic/include/odp_schedule_scalable_config.h
> new file mode 100644
> index ..febf379b
> --- /dev/null
> +++ b/platform/linux-generic/include/odp_schedule_scalable_config.h
> @@ -0,0 +1,55 @@
> +/* Copyright (c) 2017, ARM Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#ifndef ODP_SCHEDULE_SCALABLE_CONFIG_H_
> +#define ODP_SCHEDULE_SCALABLE_CONFIG_H_
> +
> +/*
> + * Default scaling factor for the scheduler group
> + *
> + * This scaling factor is used when the application creates a scheduler
> + * group with no worker threads.
> + */
> +#define CONFIG_DEFAULT_XFACTOR 4
> +
> +/*
> + * Default weight (in events) for WRR in scalable scheduler
> + *
> + * This controls the per-queue weight for WRR between queues of the same
> + * priority in the scalable scheduler
> + * A higher value improves throughput while a lower value increases
> fairness
> + * and thus likely decreases latency
> + *
> + * If WRR is undesired, set the value to ~0 which will use the largest
> possible
> + * weight
> + *
> + * Note: an API for specifying this on a per-queue basis would be useful
> but is
> + * not yet available
> + */
> +#define CONFIG_WRR_WEIGHT 64
> +
> +/*
> + * Split queue producer/consumer metadata into separate cache lines.
> + * This is beneficial on e.g. Cortex-A57 but not so much on A53.
> + */
> +#define CONFIG_SPLIT_PRODCONS
> +
> +/*
> + * Use locks to protect queue (ring buffer) and scheduler state updates
> + * On x86, this decreases overhead noticeably.
> + */
> +#ifndef __ARM_ARCH
> +#define CONFIG_QSCHST_LOCK
> +/* Keep all ring buffer/qschst data together when using locks */
> +#undef CONFIG_SPLIT_PRODCONS
> +#endif
> +
> +/*
> + * Maximum number of ordered locks per queue.
> + */
> +#define CONFIG_MAX_ORDERED_LOCKS_PER_QUEUE 2


There's already CONFIG_QUEUE_MAX_ORD_LOCKS 4, in the general config file. 
Should not add the same define twice (with different value).



> +
> +#endif  /* ODP_SCHEDULE_SCALABLE_CONFIG_H_ */
> diff --git a/platform/linux-
> generic/include/odp_schedule_scalable_ordered.h b/platform/linux-
> generic/include/odp_schedule_scalable_ordered.h
> new file mode 100644
> index ..9f3acf7a
> --- /dev/null
> +++ b/platform/linux-generic/include/odp_schedule_scalable_ordered.h
> @@ -0,0 +1,132 @@
> +/* Copyright (c) 2017, ARM Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#ifndef ODP_SCHEDULE_SCALABLE_ORDERED_H
> +#define ODP_SCHEDULE_SCALABLE_ORDERED_H
> +
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include <_ishmpool_internal.h>

> +
> +/* Number of reorder contects in the reorder window.
> + * Should be at least one per CPU.
> + */
> +#define RWIN_SIZE 32
> +ODP_STATIC_ASSERT(CHECK_IS_POWER2(RWIN_SIZE), "RWIN_SIZE is not a power
> of 2");
> +
> +#define NUM_OLOCKS 2

Is this the same as CONFIG_MAX_ORDERED_LOCKS_PER_QUEUE or something different 
with similar name ?


> diff --git a/platform/linux-generic/odp_queue_if.c b/platform/linux-
> generic/odp_queue_if.c
> index c91f00eb..d7471dfc 100644
> --- a/platform/linux-generic/odp_queue_if.c
> +++ b/platform/linux-generic/odp_queue_if.c
> @@ -6,11 +6,19 @@
> 
>  #include 
> 
> +extern const queue_api_t queue_scalable_api;
> +extern const queue_fn_t queue_scalable_fn;
> +
>  extern const queue_api_t queue_default_api;
>  extern const queue_fn_t queue_default_fn;
> 
> +#ifdef ODP_SCHEDULE_SCALABLE
> +const queue_api_t *queue_api = &queue_scalable_api;
> +const queue_fn_t *queue_fn = &queue_scalable_fn;
> +#else
>  const queue_api_t *queue_api = &queue_default_api;
>  const queue_fn_t *queue_fn = &queue_default_fn;
> +#endif
> 
>  odp_queue_t odp_queue_cre

Re: [lng-odp] [API-NEXT PATCH v9 4/6] linux-gen: sched scalable: add a concurrent queue

2017-06-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
> +++ b/platform/linux-generic/include/odp_llqueue.h
> @@ -0,0 +1,309 @@
> +/* Copyright (c) 2017, ARM Limited.
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:BSD-3-Clause
> + */
> +
> +#ifndef ODP_LLQUEUE_H_
> +#define ODP_LLQUEUE_H_
> +
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +
> +/
> **
> + * Linked list queues
> +
> **
> ***/
> +
> +struct llqueue;
> +struct llnode;
> +
> +static struct llnode *llq_head(struct llqueue *llq);
> +static void llqueue_init(struct llqueue *llq);
> +static void llq_enqueue(struct llqueue *llq, struct llnode *node);
> +static struct llnode *llq_dequeue(struct llqueue *llq);
> +static odp_bool_t llq_dequeue_cond(struct llqueue *llq, struct llnode
> *exp);
> +static odp_bool_t llq_cond_rotate(struct llqueue *llq, struct llnode
> *node);
> +static odp_bool_t llq_on_queue(struct llnode *node);
> +
> +/
> **
> + * The implementation(s)
> +
> **
> ***/
> +
> +#define SENTINEL ((void *)~(uintptr_t)0)
> +
> +#ifdef CONFIG_LLDSCD
> +/* Implement queue operations using double-word LL/SC */

> +
> +#else
> +/* Implement queue operations protected by a spin lock */
> +

There's a lot of ifdef'ed code in this file, basically two full parallel 
implementations. The first is built only for ARM and the second for the rest. 
Would there be a way to build both always ?

-Petri



Re: [lng-odp] [API-NEXT PATCH v9 3/6] linux-gen: sched scalable: add a bitset

2017-06-20 Thread Savolainen, Petri (Nokia - FI/Espoo)


> +++ b/platform/linux-generic/include/odp_bitset.h
> @@ -0,0 +1,210 @@
> +/* Copyright (c) 2017, ARM Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#ifndef _ODP_BITSET_H_
> +#define _ODP_BITSET_H_
> +
> +#include 
> +
> +#include 
> +
> +/
> **
> + * bitset abstract data type
> +
> **
> ***/
> +/* This could be a struct of scalars to support larger bit sets */
> +
> +/*
> + * Size of atomic bit set. This limits the max number of threads,
> + * scheduler groups and reorder windows. On ARMv8/64-bit and x86-64, the
> + * (lock-free) max is 128
> + */
> +
> +/* Find a suitable data type that supports lock-free atomic operations */
> +#if defined(__ARM_ARCH) &&  __ARM_ARCH == 8 &&  __ARM_64BIT_STATE == 1 &&

Why ifdef ARM? Why this code is not in arch directory ?

-Petri


> \
> + defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16
> +#define LOCKFREE16
> +typedef __int128 bitset_t;
> +#define ATOM_BITSET_SIZE (CHAR_BIT * __SIZEOF_INT128__)
> +
> +#elif __GCC_ATOMIC_LLONG_LOCK_FREE == 2 && \
> + __SIZEOF_LONG_LONG__ != __SIZEOF_LONG__
> +typedef unsigned long long bitset_t;
> +#define ATOM_BITSET_SIZE (CHAR_BIT * __SIZEOF_LONG_LONG__)
> +
> +#elif __GCC_ATOMIC_LONG_LOCK_FREE == 2 && __SIZEOF_LONG__ !=
> __SIZEOF_INT__
> +typedef unsigned long bitset_t;
> +#define ATOM_BITSET_SIZE (CHAR_BIT * __SIZEOF_LONG__)
> +
> +#elif __GCC_ATOMIC_INT_LOCK_FREE == 2
> +typedef unsigned int bitset_t;
> +#define ATOM_BITSET_SIZE (CHAR_BIT * __SIZEOF_INT__)
> +
> +#else
> +/* Target does not support lock-free atomic operations */
> +typedef unsigned int bitset_t;
> +#define ATOM_BITSET_SIZE (CHAR_BIT * __SIZEOF_INT__)
> +#endif
> +
> +#if ATOM_BITSET_SIZE <= 32




Re: [lng-odp] [API-NEXT PATCH v9 2/6] linux-gen: sched scalable: add arch files

2017-06-20 Thread Savolainen, Petri (Nokia - FI/Espoo)

> +#endif  /* PLATFORM_LINUXGENERIC_ARCH_ARM_CPU_IDLING_H */
> diff --git a/platform/linux-generic/arch/arm/odp_llsc.h b/platform/linux-
> generic/arch/arm/odp_llsc.h
> new file mode 100644
> index ..3ab5c909
> --- /dev/null
> +++ b/platform/linux-generic/arch/arm/odp_llsc.h
> @@ -0,0 +1,249 @@
> +/* Copyright (c) 2017, ARM Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:  BSD-3-Clause
> + */
> +
> +#ifndef PLATFORM_LINUXGENERIC_ARCH_ARM_LLSC_H
> +#define PLATFORM_LINUXGENERIC_ARCH_ARM_LLSC_H
> +
> +#ifndef PLATFORM_LINUXGENERIC_ARCH_ARM_ODP_CPU_H
> +#error This file should not be included directly, please include
> odp_cpu.h
> +#endif
> +
> +#if __ARM_ARCH == 7 || (__ARM_ARCH == 8 && __ARM_64BIT_STATE == 0)
> +


> +
> +#if __ARM_ARCH == 8 && __ARM_64BIT_STATE == 1
> +

Build broken for ARMv6? There are so many #ifdefs that it's hard to tell which 
code path is built. Maybe it would make sense to explicitly document/report an 
error when building for a non-supported ARM target. E.g. the original raspberry 
pi is ARMv6, it's possible that someone is building odp-linux for that...

-Petri




[lng-odp] [API-NEXT, PATCH v4 1/1] comp: compression API

2017-06-20 Thread Shally Verma
API patch to enable compression/decompression support in ODP

Changes from RFC v3:
Added separate function for compression and decompression.
Added separate event ODP_EVENT_COMP_COMPL/ODP_EVENT_DECOMP_COMPL for
compression and decompression completion status in async mode of operation.

Signed-off-by: Shally Verma 
Signed-off-by: Mahipal Challa 
---
 include/odp/api/spec/comp.h| 810 +
 include/odp/api/spec/event.h   |   3 +-
 include/odp/arch/arm32-linux/odp/api/abi/comp.h|   7 +
 include/odp/arch/arm64-linux/odp/api/abi/comp.h|   7 +
 include/odp/arch/default/api/abi/comp.h|  36 +
 include/odp/arch/mips64-linux/odp/api/abi/comp.h   |   7 +
 include/odp/arch/power64-linux/odp/api/abi/comp.h  |   7 +
 include/odp/arch/x86_32-linux/odp/api/abi/comp.h   |   7 +
 include/odp/arch/x86_64-linux/odp/api/abi/comp.h   |   7 +
 platform/linux-generic/include/odp/api/comp.h  |  41 ++
 .../include/odp/api/plat/comp_types.h  |  44 ++
 .../include/odp/api/plat/event_types.h |   5 +-
 platform/linux-generic/include/odp_comp_internal.h |  62 ++
 .../linux-generic/include/odp_packet_internal.h|   5 +-
 14 files changed, 1043 insertions(+), 5 deletions(-)

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
new file mode 100644
index 000..ef11802
--- /dev/null
+++ b/include/odp/api/spec/comp.h
@@ -0,0 +1,810 @@
+/*
+ */
+
+/**
+ * @file
+ *
+ * ODP Compression
+ */
+
+#ifndef ODP_API_COMP_H_
+#define ODP_API_COMP_H_
+
+#include 
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @defgroup odp_compression ODP COMP
+ *  ODP Compression defines API set to compress/decompress along with hash
+ *  operations on data. Hash is calculated on plaintext.
+ *
+ *  if opcode = ODP_COMP_COMPRESS, then it will Compress and apply hash,
+ *  if opcode = ODP_COMP_DECOMPRESS, then it will Decompress and apply
+ *  hash.
+ *  Independent hash-only operations are not supported. Implementation should
+ *  perform hash along with valid compression algo.
+ *  Macros, enums, types and operations to utilize compression.
+ *  @{
+ */
+
+/**
+ * @def ODP_COMP_SESSION_INVALID
+ * Invalid session handle
+ */
+
+/**
+ * @typedef odp_comp_session_t
+ * Compression/Decompression session handle
+ */
+
+/**
+ * @typedef odp_comp_compl_t
+* Compression/Decompression completion event handle
+*/
+
+/**
+ * Compression API operation mode
+ */
+typedef enum {
+   /** Synchronous, return results immediately */
+   ODP_COMP_SYNC,
+   /** Asynchronous, return results via event queue */
+   ODP_COMP_ASYNC
+} odp_comp_op_mode_t;
+
+/**
+ * Comp API operation type.
+ *
+ */
+typedef enum {
+   /** Compress  */
+   ODP_COMP_OP_COMPRESS,
+   /** Decompress */
+   ODP_COMP_OP_DECOMPRESS
+} odp_comp_op_t;
+
+/**
+ * Comp API hash algorithm
+ *
+ */
+typedef enum {
+   /** ODP_COMP_HASH_ALG_NONE*/
+   ODP_COMP_HASH_ALG_NONE,
+   /** ODP_COMP_HASH_ALG_SHA1*/
+   ODP_COMP_HASH_ALG_SHA1,
+   /**  ODP_COMP_HASH_ALG_SHA256*/
+   ODP_COMP_HASH_ALG_SHA256
+} odp_comp_hash_alg_t;
+
+/**
+ * Comp API compression algorithm
+ *
+ */
+typedef enum {
+   /** No algorithm specified.
+   * Means no compression, output == input.
+   * if provided, no operation (compression/decompression or hash)
+   * applied on input. Added for testing purpose.
+   */
+   ODP_COMP_ALG_NULL,
+   /** DEFLATE - RFC1951 */
+   ODP_COMP_ALG_DEFLATE,
+   /** ZLIB - RFC1950 */
+   ODP_COMP_ALG_ZLIB,
+   /** LZS */
+   ODP_COMP_ALG_LZS
+} odp_comp_alg_t;
+
+/**
+ * Comp API session creation return code
+ *
+ */
+typedef enum {
+   /** Session created */
+   ODP_COMP_SES_CREATE_ERR_NONE,
+   /** Creation failed, no resources */
+   ODP_COMP_SES_CREATE_ERR_ENOMEM,
+   /** Creation failed, bad compression params */
+   ODP_COMP_SES_CREATE_ERR_INV_COMP,
+   /** Creation failed, bad hash params */
+   ODP_COMP_SES_CREATE_ERR_INV_HASH,
+   /** Creation failed,requested configuration not supported*/
+   ODP_COMP_SES_CREATE_ERR_NOT_SUPPORTED
+} odp_comp_ses_create_err_t;
+
+/**
+ * Comp API operation return codes
+ *
+ */
+typedef enum {
+   /** Operation completed successfully*/
+   ODP_COMP_ERR_NONE,
+   /** Invalid user data pointers*/
+   ODP_COMP_ERR_DATA_PTR,
+   /** Invalid input data size*/
+   ODP_COMP_ERR_DATA_SIZE,
+   /**  Compression and/or hash Algo failure*/
+   ODP_COMP_ERR_ALGO_FAIL,
+   /** Operation paused due to insufficient output buffer.
+   *
+   * This is not an error condition. On seeing this situation,
+   * Implementation should maintain context of in-progress operation and
+   * application should call packet processing API again with valid
+   * output buffer but no other alteration to operation params
+   * (odp_comp_op_param_t).
+ 

[lng-odp] [API-NEXT, PATCH v4 0/1] comp: compression API

2017-06-20 Thread Shally Verma
Shally Verma (1):
  comp: compression API

  Changes from RFC v3:
Add separate function for compresion/decompression
Add separate events ODP_EVENT_COMP_COMPL for compression and 
ODP_EVENT_DECOMP_COMPL decompression completion notification.

 include/odp/api/spec/comp.h| 810 +
 include/odp/api/spec/event.h   |   3 +-
 include/odp/arch/arm32-linux/odp/api/abi/comp.h|   7 +
 include/odp/arch/arm64-linux/odp/api/abi/comp.h|   7 +
 include/odp/arch/default/api/abi/comp.h|  36 +
 include/odp/arch/mips64-linux/odp/api/abi/comp.h   |   7 +
 include/odp/arch/power64-linux/odp/api/abi/comp.h  |   7 +
 include/odp/arch/x86_32-linux/odp/api/abi/comp.h   |   7 +
 include/odp/arch/x86_64-linux/odp/api/abi/comp.h   |   7 +
 platform/linux-generic/include/odp/api/comp.h  |  41 ++
 .../include/odp/api/plat/comp_types.h  |  44 ++
 .../include/odp/api/plat/event_types.h |   5 +-
 platform/linux-generic/include/odp_comp_internal.h |  62 ++
 .../linux-generic/include/odp_packet_internal.h|   5 +-
 14 files changed, 1043 insertions(+), 5 deletions(-)
 create mode 100644 include/odp/api/spec/comp.h
 create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/comp.h
 create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/comp.h
 create mode 100644 include/odp/arch/default/api/abi/comp.h
 create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/comp.h
 create mode 100644 include/odp/arch/power64-linux/odp/api/abi/comp.h
 create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/comp.h
 create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/comp.h
 create mode 100644 platform/linux-generic/include/odp/api/comp.h
 create mode 100644 platform/linux-generic/include/odp/api/plat/comp_types.h
 create mode 100644 platform/linux-generic/include/odp_comp_internal.h

-- 
1.9.1



Re: [lng-odp] [API-NEXT PATCH v3 1/3] api: event: add subtype to expand event type

2017-06-20 Thread shally verma
On Tue, Jun 20, 2017 at 3:12 PM, Savolainen, Petri (Nokia - FI/Espoo)
 wrote:
>
>
>> -Original Message-
>> From: shally verma [mailto:shallyvermacav...@gmail.com]
>> Sent: Tuesday, June 20, 2017 8:55 AM
>> To: Bill Fischofer 
>> Cc: Savolainen, Petri (Nokia - FI/Espoo) ;
>> lng-odp-forward 
>> Subject: Re: [lng-odp] [API-NEXT PATCH v3 1/3] api: event: add subtype to
>> expand event type
>>
>> On Fri, Jun 16, 2017 at 7:15 PM, Bill Fischofer
>>  wrote:
>> > On Fri, Jun 16, 2017 at 8:33 AM, shally verma
>> >  wrote:
>> >> On Fri, Jun 16, 2017 at 6:42 PM, Bill Fischofer
>> >>  wrote:
>> >>> On Fri, Jun 16, 2017 at 8:04 AM, Savolainen, Petri (Nokia - FI/Espoo)
>> >>>  wrote:
>> > > diff --git a/include/odp/api/spec/event.h
>> b/include/odp/api/spec/event.h
>> > > index f22efce5..2ad3ce84 100644
>> > > --- a/include/odp/api/spec/event.h
>> > > +++ b/include/odp/api/spec/event.h
>> > > @@ -37,21 +37,91 @@ extern "C" {
>> > >
>> > >  /**
>> > >   * @typedef odp_event_type_t
>> > > - * ODP event types:
>> > > - * ODP_EVENT_BUFFER, ODP_EVENT_PACKET, ODP_EVENT_TIMEOUT,
>> > > - * ODP_EVENT_CRYPTO_COMPL, ODP_EVENT_IPSEC_RESULT,
>> > ODP_EVENT_IPSEC_STATUS
>> > > + * Event type
>> > > + *
>> > > + * Event type specifies purpose and general format of an event.
>> It can
>> > be
>> > > + * checked with odp_event_type() or odp_event_types(). Each event
>> type
>> > has
>> > > + * functions (e.g. odp_buffer_from_event()) to convert between
>> the
>> > generic event
>> > > + * handle (odp_event_t) and the type specific handle (e.g.
>> > odp_buffer_t).
>> > > + * Results are undefined, if conversion function of a wrong event
>> type
>> > is used.
>> > > + * Application cannot change event type by chaining conversion
>> > functions.
>> > > + *
>> > > + * List of event types:
>> > > + * - ODP_EVENT_BUFFER
>> > > + * - Buffer event (odp_buffer_t) for simple data storage and
>> > message passing
>> > > + * - ODP_EVENT_PACKET
>> > > + * - Packet event (odp_packet_t) containing packet data and
>> plenty
>> > of
>> >
>> > Why "plenty of"? "containing packet data and associated metadata"
>> > seems sufficient.
>> 
>>  It highlights that packets should be used only for packets, not as
>> random buffer space (buffers are simple vs. packets are complex).
>> >>>
>> >>> Ok, it just looked a bit odd. Not a biggie.
>> >>>
>> 
>>  BTW. It would have been nice to get all review comments in one go. I
>> did sent v3 as there were no more comments. I cannot do v4 before our lab
>> is back online from a maintenance break... Hopefully v4 is not necessary.
>> >>>
>> >>> Still working on it. This series needs Bala and Nikhil's reviews as a
>> >>> check against their HW. But so far this looks very reasonable.
>> >>>
>> 
>>  -Petri
>> >>
>> >> So, how does this affect event notification mechanism now?
>> >> Currently we had ODP_EVENT_COMP_COMPL set on a packet to mark
>> >> compression/decompression complete status on requested input. So that
>> >> still remain valid Or we need to introduce it like:
>> >>
>> >> event ODP_EVENT_PACKET
>> >> subtype ODP_EVENT_PACKET_COMP_COMPL?
>> >
>> > For consistency with the subtype pattern defined here I'd guess
>> > ODP_EVENT_PACKET_COMP would be the name to use.
>> >
>> >>
>> Ok. but it still leave question open for me. Should existing
>> Compression/Crypto completion event is going to be there or do we need
>> to change as per current proposal? Or current proposal is for newer
>> event notifications. When an compression/encryption event should be
>> considered as sub-event to packet? What event should be if user send a
>> buffer for compression/decompression than packet? May be I am missing
>> broader perspective to this proposal.
>
> If/when this patch is merged, new work (like comp) should be done against it. 
> So, comp packet would be another subtype. Also, crypto completion APIs will 
> be changed to this (with deprecation).
>
Ok.

> By buffer, do you mean odp_buffer_t event, or void *ptr ? Maybe ptr/len is 
> more relevant addition than odp_buffer_t.
Though not fully decide yet on it but most likely it will ptr/len struct.

> Sync version of that (ptr/len) is easy, async version would need another 
> event type.

if so, then I probably retain ODP_EVENT_COMP_COMPL for event
notification on buffer data.

>>
>> Also, I have bit of confusion with event type enums placement.
>> ODO_EVENT_PACKET/ODP_EVENT_CRYPTO_COMPL .. are these standard event
>> types and public? Because I see their definition inside
>> platform/linux-generic/include/odp/api/plat/event_types.h instead of
>> standard spec file at include/odp/api/spec/event.h giving me an
>> impression they are platform specific enum defines.
>
> API spec defines the enum names, but not the values. Application must not 
> rely on the values. Depending on implementation, value

Re: [lng-odp] [API-NEXT PATCH v3 1/3] api: event: add subtype to expand event type

2017-06-20 Thread Savolainen, Petri (Nokia - FI/Espoo)


> -Original Message-
> From: shally verma [mailto:shallyvermacav...@gmail.com]
> Sent: Tuesday, June 20, 2017 8:55 AM
> To: Bill Fischofer 
> Cc: Savolainen, Petri (Nokia - FI/Espoo) ;
> lng-odp-forward 
> Subject: Re: [lng-odp] [API-NEXT PATCH v3 1/3] api: event: add subtype to
> expand event type
> 
> On Fri, Jun 16, 2017 at 7:15 PM, Bill Fischofer
>  wrote:
> > On Fri, Jun 16, 2017 at 8:33 AM, shally verma
> >  wrote:
> >> On Fri, Jun 16, 2017 at 6:42 PM, Bill Fischofer
> >>  wrote:
> >>> On Fri, Jun 16, 2017 at 8:04 AM, Savolainen, Petri (Nokia - FI/Espoo)
> >>>  wrote:
> > > diff --git a/include/odp/api/spec/event.h
> b/include/odp/api/spec/event.h
> > > index f22efce5..2ad3ce84 100644
> > > --- a/include/odp/api/spec/event.h
> > > +++ b/include/odp/api/spec/event.h
> > > @@ -37,21 +37,91 @@ extern "C" {
> > >
> > >  /**
> > >   * @typedef odp_event_type_t
> > > - * ODP event types:
> > > - * ODP_EVENT_BUFFER, ODP_EVENT_PACKET, ODP_EVENT_TIMEOUT,
> > > - * ODP_EVENT_CRYPTO_COMPL, ODP_EVENT_IPSEC_RESULT,
> > ODP_EVENT_IPSEC_STATUS
> > > + * Event type
> > > + *
> > > + * Event type specifies purpose and general format of an event.
> It can
> > be
> > > + * checked with odp_event_type() or odp_event_types(). Each event
> type
> > has
> > > + * functions (e.g. odp_buffer_from_event()) to convert between
> the
> > generic event
> > > + * handle (odp_event_t) and the type specific handle (e.g.
> > odp_buffer_t).
> > > + * Results are undefined, if conversion function of a wrong event
> type
> > is used.
> > > + * Application cannot change event type by chaining conversion
> > functions.
> > > + *
> > > + * List of event types:
> > > + * - ODP_EVENT_BUFFER
> > > + * - Buffer event (odp_buffer_t) for simple data storage and
> > message passing
> > > + * - ODP_EVENT_PACKET
> > > + * - Packet event (odp_packet_t) containing packet data and
> plenty
> > of
> >
> > Why "plenty of"? "containing packet data and associated metadata"
> > seems sufficient.
> 
>  It highlights that packets should be used only for packets, not as
> random buffer space (buffers are simple vs. packets are complex).
> >>>
> >>> Ok, it just looked a bit odd. Not a biggie.
> >>>
> 
>  BTW. It would have been nice to get all review comments in one go. I
> did sent v3 as there were no more comments. I cannot do v4 before our lab
> is back online from a maintenance break... Hopefully v4 is not necessary.
> >>>
> >>> Still working on it. This series needs Bala and Nikhil's reviews as a
> >>> check against their HW. But so far this looks very reasonable.
> >>>
> 
>  -Petri
> >>
> >> So, how does this affect event notification mechanism now?
> >> Currently we had ODP_EVENT_COMP_COMPL set on a packet to mark
> >> compression/decompression complete status on requested input. So that
> >> still remain valid Or we need to introduce it like:
> >>
> >> event ODP_EVENT_PACKET
> >> subtype ODP_EVENT_PACKET_COMP_COMPL?
> >
> > For consistency with the subtype pattern defined here I'd guess
> > ODP_EVENT_PACKET_COMP would be the name to use.
> >
> >>
> Ok. but it still leave question open for me. Should existing
> Compression/Crypto completion event is going to be there or do we need
> to change as per current proposal? Or current proposal is for newer
> event notifications. When an compression/encryption event should be
> considered as sub-event to packet? What event should be if user send a
> buffer for compression/decompression than packet? May be I am missing
> broader perspective to this proposal.

If/when this patch is merged, new work (like comp) should be done against it. 
So, comp packet would be another subtype. Also, crypto completion APIs will be 
changed to this (with deprecation).

By buffer, do you mean odp_buffer_t event, or void *ptr ? Maybe ptr/len is more 
relevant addition than odp_buffer_t. Sync version of that (ptr/len) is easy, 
async version would need another event type.


> 
> Also, I have bit of confusion with event type enums placement.
> ODO_EVENT_PACKET/ODP_EVENT_CRYPTO_COMPL .. are these standard event
> types and public? Because I see their definition inside
> platform/linux-generic/include/odp/api/plat/event_types.h instead of
> standard spec file at include/odp/api/spec/event.h giving me an
> impression they are platform specific enum defines.

API spec defines the enum names, but not the values. Application must not rely 
on the values. Depending on implementation, values may be HW defined.

/**
 * @typedef odp_event_type_t
 * ODP event types:
 * ODP_EVENT_BUFFER, ODP_EVENT_PACKET,



> 
> So far I was under impression because they are platform specific so we
> are introducing conversion APIs like
> odp_xxx_event_from_event() so that user don't need to know specific
> event enumeration. As example (referring to crypto as base design) ,

Re: [lng-odp] [PATCH 0/6] dpdk pktio: enable hardware checksum support

2017-06-20 Thread Bogdan Pricope
Ping?

On 31 May 2017 at 17:40, Bogdan Pricope  wrote:
> Add HW checksum calculation/validation support for dpdk pktio.
> No UDP/TCP HW checksum calculation/validation support for:
>  - IPv4 fragments
>  - IPv6 packets with extension headers (including fragments)
>
> Bogdan Pricope (6):
>   Initialize pktio configuration structure
>   dpdk: retrieve offload capabilities
>   dpdk: enable per pktio RX IP/UDP/TCP checksum offload
>   dpdk: RX - process checksum validation offload flags
>   dpdk: TX - set checksum calculation offload flags
>   examples: generator: update odp_generator to use HW checksum
> capabilities
>
>  example/generator/odp_generator.c  | 107 ++---
>  platform/linux-generic/odp_packet_io.c |   2 +
>  platform/linux-generic/pktio/dpdk.c| 203 
> -
>  3 files changed, 293 insertions(+), 19 deletions(-)
>
> --
> 1.9.1
>


[lng-odp] [API-NEXT] api: ipsec: reorganize odp_ipsec_sa_param_t structure based on SA direction

2017-06-20 Thread Bogdan Pricope
Signed-off-by: Bogdan Pricope 
---
 include/odp/api/spec/ipsec.h | 114 ---
 1 file changed, 63 insertions(+), 51 deletions(-)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index e602e4b..08c820e 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -604,8 +604,8 @@ typedef enum odp_ipsec_ip_version_t {
  * IPSEC Security Association (SA) parameters
  */
 typedef struct odp_ipsec_sa_param_t {
-   /** IPSEC SA direction: inbound or outbound */
-   odp_ipsec_dir_t dir;
+   /** SPI value */
+   uint32_t spi;
 
/** IPSEC protocol: ESP or AH */
odp_ipsec_protocol_t proto;
@@ -616,51 +616,12 @@ typedef struct odp_ipsec_sa_param_t {
/** Parameters for crypto and authentication algorithms */
odp_ipsec_crypto_param_t crypto;
 
-   /** Parameters for tunnel mode */
-   odp_ipsec_tunnel_param_t tunnel;
-
-   /** Fragmentation mode */
-   odp_ipsec_frag_mode_t frag_mode;
-
-   /** Various SA option flags */
-   odp_ipsec_sa_opt_t opt;
-
/** SA lifetime parameters */
odp_ipsec_lifetime_t lifetime;
 
-   /** SA lookup mode */
-   odp_ipsec_lookup_mode_t lookup_mode;
-
-   /** Minimum anti-replay window size. Use 0 to disable anti-replay
- * service. */
-   uint32_t antireplay_ws;
-
/** Initial sequence number */
uint64_t seq;
 
-   /** SPI value */
-   uint32_t spi;
-
-   /** Additional inbound SA lookup parameters. Values are considered
-*  only in ODP_IPSEC_LOOKUP_DSTADDR_SPI lookup mode. */
-   struct {
-   /** Select IP version
-*/
-   odp_ipsec_ip_version_t ip_version;
-
-   /** IP destination address (NETWORK ENDIAN) */
-   void*dst_addr;
-
-   } lookup_param;
-
-   /** MTU for outbound IP fragmentation offload
-*
-*  This is the maximum length of IP packets that outbound IPSEC
-*  operations may produce. The value may be updated later with
-*  odp_ipsec_mtu_update().
-*/
-   uint32_t mtu;
-
/** Select pipelined destination for resulting events
 *
 *  Asynchronous and inline modes generate events. Select where
@@ -677,16 +638,67 @@ typedef struct odp_ipsec_sa_param_t {
 */
odp_queue_t dest_queue;
 
-   /** Classifier destination CoS for resulting packets
-*
-*  Successfully decapsulated packets are sent to classification
-*  through this CoS. Other resulting events are sent to 'dest_queue'.
-*  This field is considered only when 'pipeline' is
-*  ODP_IPSEC_PIPELINE_CLS. The CoS must not be shared between any pktio
-*  interface default CoS. The maximum number of different CoS supported
-*  is defined by IPSEC capability max_cls_cos.
-*/
-   odp_cos_t dest_cos;
+   /** IPSEC SA direction: inbound or outbound */
+   odp_ipsec_dir_t dir;
+
+   /** IPSEC SA direction dependent parameters */
+   union {
+   /** Inbound specific parameters */
+   struct {
+   /** SA lookup mode */
+   odp_ipsec_lookup_mode_t lookup_mode;
+
+   /** Additional inbound SA lookup parameters. Values are
+   *  considered only in ODP_IPSEC_LOOKUP_DSTADDR_SPI
+   *  lookup mode. */
+   struct {
+   /** Select IP version
+   */
+   odp_ipsec_ip_version_t ip_version;
+
+   /** IP destination address (NETWORK ENDIAN) */
+   void*dst_addr;
+
+   } lookup_param;
+
+   /** Minimum anti-replay window size. Use 0 to disable
+   *  anti-replay service. */
+   uint32_t antireplay_ws;
+
+   /** Classifier destination CoS for resulting packets
+   *
+   *  Successfully decapsulated packets are sent to
+   *  classification through this CoS. Other resulting
+   *  events are sent to 'dest_queue'.
+   *  This field is considered only when 'pipeline' is
+   *  ODP_IPSEC_PIPELINE_CLS. The CoS must not be shared
+   *  between any pktio interface default CoS. The maximum
+   *  number of different CoS supported is defined by
+   *  IPSEC capability max_cls_cos.
+   */
+   odp_cos_t dest_cos;
+   };
+
+   /** Outbound specific parameters */
+   struct {
+   /** Parameters for tunnel mode */
+   odp_ipsec_tu

[lng-odp] [API-NEXT] api: ipsec: reorganize odp_ipsec_sa_param_t structure

2017-06-20 Thread Bogdan Pricope
Reorganize odp_ipsec_sa_param_t structure to highlight inbound only and
outbound only members.
To be applied on top of Petri's v3 of 'IPSEC packet event'

Bogdan Pricope (1):
  api: ipsec: reorganize odp_ipsec_sa_param_t structure based on SA
direction

 include/odp/api/spec/ipsec.h | 114 ---
 1 file changed, 63 insertions(+), 51 deletions(-)

-- 
1.9.1



Re: [lng-odp] [API-NEXT PATCH v4] timer: allow timer processing to run on worker cores

2017-06-20 Thread Savolainen, Petri (Nokia - FI/Espoo)
Do you have some performance numbers? E.g. how much this slows down an 
application which does not use timers (e.g. l2fwd), or an application that uses 
only few, non-frequent timeouts?

Additionally, init.h/feature.h is not yet in api-next - so this would not build 
yet.


-Petri


> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Honnappa Nagarahalli
> Sent: Tuesday, June 20, 2017 7:07 AM
> To: Bill Fischofer 
> Cc: lng-odp-forward 
> Subject: Re: [lng-odp] [API-NEXT PATCH v4] timer: allow timer processing
> to run on worker cores
> 
> Are you saying we should be good to merge this now?
> 
> On 19 June 2017 at 17:42, Bill Fischofer 
> wrote:
> > On Mon, Jun 19, 2017 at 4:19 PM, Honnappa Nagarahalli
> >  wrote:
> >> Hi Bill/Maxim,
> >> I do not see any further comments, can we merge this to api-next?
> >>
> >> Thanks,
> >> Honnappa




[lng-odp] [Bug 3039] Socket pktio recv fails on large number of packet

2017-06-20 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3039

--- Comment #4 from Matias Elo  ---
I sent a rebased version of "linux-gen: socket: remove limits for maximum RX/TX
burst size" patch which applies on top of monarch_lts branch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[lng-odp] [MONARCH_LTS PATCH] linux-gen: socket: remove limits for maximum RX/TX burst size

2017-06-20 Thread Matias Elo
Remove unnecessary limits for maximum RX/TX burst size.

Fixes: https://bugs.linaro.org/show_bug.cgi?id=3039

Signed-off-by: Matias Elo 
---
 platform/linux-generic/include/odp_packet_socket.h |  7 -
 platform/linux-generic/pktio/socket.c  | 36 --
 2 files changed, 6 insertions(+), 37 deletions(-)

diff --git a/platform/linux-generic/include/odp_packet_socket.h 
b/platform/linux-generic/include/odp_packet_socket.h
index ccff69a..8c1012a 100644
--- a/platform/linux-generic/include/odp_packet_socket.h
+++ b/platform/linux-generic/include/odp_packet_socket.h
@@ -27,11 +27,6 @@
  * Packet socket config:
  */
 
-/** Max receive (Rx) burst size*/
-#define ODP_PACKET_SOCKET_MAX_BURST_RX 32
-/** Max transmit (Tx) burst size*/
-#define ODP_PACKET_SOCKET_MAX_BURST_TX 32
-
 /*
  * This makes sure that building for kernels older than 3.1 works
  * and a fanout requests fails (for invalid packet socket option)
@@ -46,8 +41,6 @@ typedef struct {
int sockfd; /**< socket descriptor */
odp_pool_t pool; /**< pool to alloc packets from */
unsigned char if_mac[ETH_ALEN]; /**< IF eth mac addr */
-   uint8_t *cache_ptr[ODP_PACKET_SOCKET_MAX_BURST_RX];
-   odp_shm_t shm;
 } pkt_sock_t;
 
 /** packet mmap ring */
diff --git a/platform/linux-generic/pktio/socket.c 
b/platform/linux-generic/pktio/socket.c
index 0309b0d..624104d 100644
--- a/platform/linux-generic/pktio/socket.c
+++ b/platform/linux-generic/pktio/socket.c
@@ -458,8 +458,6 @@ static int sock_close(pktio_entry_t *pktio_entry)
return -1;
}
 
-   odp_shm_free(pkt_sock->shm);
-
return 0;
 }
 
@@ -471,13 +469,11 @@ static int sock_setup_pkt(pktio_entry_t *pktio_entry, 
const char *netdev,
 {
int sockfd;
int err;
-   int i;
unsigned int if_idx;
struct ifreq ethreq;
struct sockaddr_ll sa_ll;
char shm_name[ODP_SHM_NAME_LEN];
pkt_sock_t *pkt_sock = &pktio_entry->s.pkt_sock;
-   uint8_t *addr;
odp_pktio_stats_t cur_stats;
 
/* Init pktio entry */
@@ -491,18 +487,6 @@ static int sock_setup_pkt(pktio_entry_t *pktio_entry, 
const char *netdev,
snprintf(shm_name, ODP_SHM_NAME_LEN, "%s-%s", "pktio", netdev);
shm_name[ODP_SHM_NAME_LEN - 1] = '\0';
 
-   pkt_sock->shm = odp_shm_reserve(shm_name, PACKET_JUMBO_LEN,
- PACKET_JUMBO_LEN *
- ODP_PACKET_SOCKET_MAX_BURST_RX, 0);
-   if (pkt_sock->shm == ODP_SHM_INVALID)
-   return -1;
-
-   addr = odp_shm_addr(pkt_sock->shm);
-   for (i = 0; i < ODP_PACKET_SOCKET_MAX_BURST_RX; i++) {
-   pkt_sock->cache_ptr[i] = addr;
-   addr += PACKET_JUMBO_LEN;
-   }
-
sockfd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
if (sockfd == -1) {
__odp_errno = errno;
@@ -616,15 +600,11 @@ static int sock_mmsg_recv(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
odp_time_t *ts = NULL;
const int sockfd = pkt_sock->sockfd;
int msgvec_len;
-   struct mmsghdr msgvec[ODP_PACKET_SOCKET_MAX_BURST_RX];
+   struct mmsghdr msgvec[len];
int nb_rx = 0;
int recv_msgs;
-   uint8_t **recv_cache;
int i;
 
-   if (odp_unlikely(len > ODP_PACKET_SOCKET_MAX_BURST_RX))
-   return -1;
-
odp_ticketlock_lock(&pktio_entry->s.rxl);
 
if (pktio_entry->s.config.pktin.bit.ts_all ||
@@ -632,10 +612,10 @@ static int sock_mmsg_recv(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
ts = &ts_val;
 
memset(msgvec, 0, sizeof(msgvec));
-   recv_cache = pkt_sock->cache_ptr;
 
if (pktio_cls_enabled(pktio_entry)) {
-   struct iovec iovecs[ODP_PACKET_SOCKET_MAX_BURST_RX];
+   struct iovec iovecs[len];
+   uint8_t recv_cache[len][PACKET_JUMBO_LEN];
 
for (i = 0; i < (int)len; i++) {
msgvec[i].msg_hdr.msg_iovlen = 1;
@@ -686,8 +666,7 @@ static int sock_mmsg_recv(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
pkt_table[nb_rx++] = pkt;
}
} else {
-   struct iovec iovecs[ODP_PACKET_SOCKET_MAX_BURST_RX]
-  [ODP_BUFFER_MAX_SEG];
+   struct iovec iovecs[len][ODP_BUFFER_MAX_SEG];
 
for (i = 0; i < (int)len; i++) {
pkt_table[i] = packet_alloc(pkt_sock->pool,
@@ -770,15 +749,12 @@ static int sock_mmsg_send(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
  const odp_packet_t pkt_table[], int len)
 {
pkt_sock_t *pkt_sock = &pktio_entry->s.pkt_sock;
-   struct mmsghdr msgvec[ODP_PACKET_SOCKET_MAX_BURST_TX];
-   struct iovec iovecs[ODP_PACKET_SOCKET_MAX_BURST_TX][ODP_BUFFER_MAX_SEG];
+   struct mmsghdr msgvec[len];
+   struct iovec iovecs[len][ODP_BUFFER