[lng-odp] [PATCH CLOUD-DEV v1 3/3] linux-gen: cleanup internal schedule interface

2017-09-05 Thread Github ODP bot
From: Brian Brooks 

Signed-off-by: Brian Brooks 
Reviewed-by: Ola Liljedahl 
---
/** Email created from pull request 166 (brbrooks:cloud-dev)
 ** https://github.com/Linaro/odp/pull/166
 ** Patch: https://github.com/Linaro/odp/pull/166.patch
 ** Base sha: d3fe76f2af39af17a3661b866a442878abc31ddc
 ** Merge commit sha: 306bdb45117f6891f18ad9c540f94fa9aa54123c
 **/
 .../linux-dpdk/include/odp_packet_io_internal.h|  3 +
 .../linux-generic/include/odp_packet_io_internal.h |  3 +
 .../linux-generic/include/odp_queue_internal.h |  5 ++
 platform/linux-generic/include/odp_schedule_if.h   | 65 ++
 platform/linux-generic/odp_packet_io.c |  4 +-
 platform/linux-generic/odp_queue.c |  8 +--
 platform/linux-generic/schedule/generic.c  | 22 +++-
 platform/linux-generic/schedule/iquery.c   | 20 +++
 platform/linux-generic/schedule/scalable.c | 10 ++--
 platform/linux-generic/schedule/sp.c   | 18 +++---
 10 files changed, 67 insertions(+), 91 deletions(-)

diff --git a/platform/linux-dpdk/include/odp_packet_io_internal.h 
b/platform/linux-dpdk/include/odp_packet_io_internal.h
index 8e158dc9..14b6a8d3 100644
--- a/platform/linux-dpdk/include/odp_packet_io_internal.h
+++ b/platform/linux-dpdk/include/odp_packet_io_internal.h
@@ -207,6 +207,9 @@ extern const pktio_if_ops_t loopback_pktio_ops;
 extern const pktio_if_ops_t dpdk_pktio_ops;
 extern const pktio_if_ops_t * const pktio_if_ops[];
 
+int pktin_poll(int pktio_index, int num_queue, int index[]);
+void pktio_stop_finalize(int pktio_index);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/include/odp_packet_io_internal.h 
b/platform/linux-generic/include/odp_packet_io_internal.h
index 1a4e345f..dc049f46 100644
--- a/platform/linux-generic/include/odp_packet_io_internal.h
+++ b/platform/linux-generic/include/odp_packet_io_internal.h
@@ -271,6 +271,9 @@ int sock_stats_fd(pktio_entry_t *pktio_entry,
  int fd);
 int sock_stats_reset_fd(pktio_entry_t *pktio_entry, int fd);
 
+int pktin_poll(int pktio_index, int num_queue, int index[]);
+void pktio_stop_finalize(int pktio_index);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/include/odp_queue_internal.h 
b/platform/linux-generic/include/odp_queue_internal.h
index dd846d59..a1b2a73d 100644
--- a/platform/linux-generic/include/odp_queue_internal.h
+++ b/platform/linux-generic/include/odp_queue_internal.h
@@ -76,6 +76,11 @@ static inline queue_t qentry_to_int(queue_entry_t *qentry)
return (queue_t)(qentry);
 }
 
+odp_queue_t queue_handle(uint32_t queue_index);
+void queue_destroy_finalize(uint32_t queue_index);
+int queue_idx_deq_multi(uint32_t queue_index, odp_event_t ev[], int num);
+int queue_empty(uint32_t queue_index);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/include/odp_schedule_if.h 
b/platform/linux-generic/include/odp_schedule_if.h
index 2bcf23f2..8f39eec1 100644
--- a/platform/linux-generic/include/odp_schedule_if.h
+++ b/platform/linux-generic/include/odp_schedule_if.h
@@ -7,64 +7,31 @@
 #ifndef ODP_SCHEDULE_IF_H_
 #define ODP_SCHEDULE_IF_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include 
 #include 
 #include 
 
-typedef void (*schedule_pktio_start_fn_t)(int pktio_index, int num_in_queue,
- int in_queue_idx[]);
-typedef int (*schedule_thr_add_fn_t)(odp_schedule_group_t group, int thr);
-typedef int (*schedule_thr_rem_fn_t)(odp_schedule_group_t group, int thr);
-typedef int (*schedule_num_grps_fn_t)(void);
-typedef int (*schedule_init_queue_fn_t)(
-   uint32_t queue_index, const odp_schedule_param_t *sched_param);
-typedef void (*schedule_destroy_queue_fn_t)(uint32_t queue_index);
-typedef int (*schedule_sched_queue_fn_t)(uint32_t queue_index);
-typedef int (*schedule_unsched_queue_fn_t)(uint32_t queue_index);
-typedef int (*schedule_ord_enq_multi_fn_t)(queue_t q_int,
-  void *buf_hdr[], int num, int *ret);
-typedef void (*schedule_order_lock_fn_t)(void);
-typedef void (*schedule_order_unlock_fn_t)(void);
-typedef unsigned (*schedule_max_ordered_locks_fn_t)(void);
-typedef void (*schedule_save_context_fn_t)(uint32_t queue_index);
-
 typedef struct schedule_fn_t {
-   int status_sync;
-   schedule_pktio_start_fn_t   pktio_start;
-   schedule_thr_add_fn_t   thr_add;
-   schedule_thr_rem_fn_t   thr_rem;
-   schedule_num_grps_fn_t  num_grps;
-   schedule_init_queue_fn_tinit_queue;
-   schedule_destroy_queue_fn_t destroy_queue;
-   schedule_sched_queue_fn_t   sched_queue;
-   schedule_ord_enq_multi_fn_t ord_enq_multi;
-   schedule_order_lock_fn_torder_lock;
-   schedule_order_unlock_fn_t  order_unlock;
-   schedule_max_ordered_locks_fn_t max_ordered_locks;
+   int status_sync;
+

[lng-odp] [PATCH CLOUD-DEV v1 2/3] linux-gen: schedule: move schedulers into modules

2017-09-05 Thread Github ODP bot
From: Brian Brooks 

Signed-off-by: Brian Brooks 
Reviewed-by: Honnappa Nagarahalli 
Reviewed-by: Kevin Wang 
---
/** Email created from pull request 166 (brbrooks:cloud-dev)
 ** https://github.com/Linaro/odp/pull/166
 ** Patch: https://github.com/Linaro/odp/pull/166.patch
 ** Base sha: d3fe76f2af39af17a3661b866a442878abc31ddc
 ** Merge commit sha: 306bdb45117f6891f18ad9c540f94fa9aa54123c
 **/
 platform/linux-dpdk/Makefile.am|  18 +-
 platform/linux-dpdk/odp_init.c |   8 +-
 platform/linux-generic/Makefile.am |  21 +-
 platform/linux-generic/include/odp_internal.h  |   5 +
 platform/linux-generic/include/odp_schedule_if.h   |  39 +---
 platform/linux-generic/odp_init.c  |   8 +-
 platform/linux-generic/odp_schedule_if.c   | 121 +-
 .../{odp_schedule.c => schedule/generic.c} |  28 ++-
 .../{odp_schedule_iquery.c => schedule/iquery.c}   |  22 +-
 .../scalable.c}|  22 +-
 .../scalable_ordered.c}|   0
 .../{odp_schedule_sp.c => schedule/sp.c}   |  22 +-
 platform/linux-generic/schedule/subsystem.c| 253 +
 13 files changed, 374 insertions(+), 193 deletions(-)
 rename platform/linux-generic/{odp_schedule.c => schedule/generic.c} (98%)
 rename platform/linux-generic/{odp_schedule_iquery.c => schedule/iquery.c} 
(98%)
 rename platform/linux-generic/{odp_schedule_scalable.c => schedule/scalable.c} 
(99%)
 rename platform/linux-generic/{odp_schedule_scalable_ordered.c => 
schedule/scalable_ordered.c} (100%)
 rename platform/linux-generic/{odp_schedule_sp.c => schedule/sp.c} (97%)

diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index 8b94b7d2..eb5c7c38 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -252,9 +252,12 @@ __LIB__libodp_dpdk_la_SOURCES = \
   ../linux-generic/odp_rwlock.c \
   ../linux-generic/odp_rwlock_recursive.c \
   ../linux-generic/pool/subsystem.c \
-  ../linux-generic/odp_schedule.c \
   ../linux-generic/odp_schedule_if.c \
-  ../linux-generic/odp_schedule_iquery.c \
+  ../linux-generic/schedule/generic.c \
+  ../linux-generic/schedule/iquery.c \
+  ../linux-generic/schedule/scalable.c \
+  ../linux-generic/schedule/scalable_ordered.c \
+  ../linux-generic/schedule/sp.c \
   ../linux-generic/schedule/subsystem.c \
   ../linux-generic/odp_shared_memory.c \
   ../linux-generic/odp_sorted_list.c \
@@ -297,6 +300,17 @@ __LIB__libodp_dpdk_la_SOURCES += arch/x86/cpu_flags.c \
 endif
 
 pool/dpdk.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE
+if ODP_SCHEDULE_SCALABLE
+schedule/scalable.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE
+else
+schedule/generic.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE
+endif
+if ODP_SCHEDULE_SP
+schedule/sp.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE
+endif
+if ODP_SCHEDULE_IQUERY
+schedule/iquery.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE
+endif
 
 # Build modular framework into odp-linux library
 modularframeworkdir = $(top_srcdir)/frameworks/modular
diff --git a/platform/linux-dpdk/odp_init.c b/platform/linux-dpdk/odp_init.c
index 96c535ba..cd7abce6 100644
--- a/platform/linux-dpdk/odp_init.c
+++ b/platform/linux-dpdk/odp_init.c
@@ -358,7 +358,7 @@ int odp_init_global(odp_instance_t *instance,
}
stage = QUEUE_INIT;
 
-   if (sched_fn->init_global()) {
+   if (odp_schedule_init_global()) {
ODP_ERR("ODP schedule init failed.\n");
goto init_failed;
}
@@ -488,7 +488,7 @@ int _odp_term_global(enum init_stage stage)
/* Fall through */
 
case SCHED_INIT:
-   if (sched_fn->term_global()) {
+   if (odp_schedule_term_global()) {
ODP_ERR("ODP schedule term failed.\n");
rc = -1;
}
@@ -590,7 +590,7 @@ int odp_init_local(odp_instance_t instance, 
odp_thread_type_t thr_type)
}
stage = POOL_INIT;
 
-   if (sched_fn->init_local()) {
+   if (odp_schedule_init_local()) {
ODP_ERR("ODP schedule local init failed.\n");
goto init_fail;
}
@@ -617,7 +617,7 @@ int _odp_term_local(enum init_stage stage)
case ALL_INIT:
 
case SCHED_INIT:
-   if (sched_fn->term_local()) {
+   if (odp_schedule_term_local()) {
ODP_ERR("ODP schedule local term failed.\n");
rc = -1;
}
diff --git a/platform/linux-generic/Makefile.am 

[lng-odp] [PATCH CLOUD-DEV v1 1/3] linux-gen: schedule: add subsystem

2017-09-05 Thread Github ODP bot
From: Brian Brooks 

Signed-off-by: Brian Brooks 
Reviewed-by: Honnappa Nagarahalli 
Reviewed-by: Yi He 
---
/** Email created from pull request 166 (brbrooks:cloud-dev)
 ** https://github.com/Linaro/odp/pull/166
 ** Patch: https://github.com/Linaro/odp/pull/166.patch
 ** Base sha: d3fe76f2af39af17a3661b866a442878abc31ddc
 ** Merge commit sha: 306bdb45117f6891f18ad9c540f94fa9aa54123c
 **/
 platform/linux-dpdk/Makefile.am|  2 +
 platform/linux-generic/Makefile.am |  2 +
 .../linux-generic/include/odp_schedule_subsystem.h | 77 ++
 platform/linux-generic/schedule/subsystem.c| 19 ++
 4 files changed, 100 insertions(+)
 create mode 100644 platform/linux-generic/include/odp_schedule_subsystem.h
 create mode 100644 platform/linux-generic/schedule/subsystem.c

diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index 6e7f0b1d..8b94b7d2 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -203,6 +203,7 @@ noinst_HEADERS = \
  ${top_srcdir}/platform/linux-generic/include/odp_queue_if.h \
  
${top_srcdir}/platform/linux-generic/include/odp_ring_internal.h \
  
${top_srcdir}/platform/linux-generic/include/odp_schedule_if.h \
+ 
${top_srcdir}/platform/linux-generic/include/odp_schedule_subsystem.h \
  
${top_srcdir}/platform/linux-generic/include/odp_sorted_list_internal.h \
  
${top_srcdir}/platform/linux-generic/include/odp_shm_internal.h \
  
${top_srcdir}/platform/linux-generic/include/odp_time_internal.h \
@@ -254,6 +255,7 @@ __LIB__libodp_dpdk_la_SOURCES = \
   ../linux-generic/odp_schedule.c \
   ../linux-generic/odp_schedule_if.c \
   ../linux-generic/odp_schedule_iquery.c \
+  ../linux-generic/schedule/subsystem.c \
   ../linux-generic/odp_shared_memory.c \
   ../linux-generic/odp_sorted_list.c \
   ../linux-generic/odp_spinlock.c \
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index 3e3e0c22..78e95760 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -203,6 +203,7 @@ noinst_HEADERS = \
  ${srcdir}/include/odp_schedule_scalable.h \
  ${srcdir}/include/odp_schedule_scalable_config.h \
  ${srcdir}/include/odp_schedule_scalable_ordered.h \
+ ${srcdir}/include/odp_schedule_subsystem.h \
  ${srcdir}/include/odp_sorted_list_internal.h \
  ${srcdir}/include/odp_shm_internal.h \
  ${srcdir}/include/odp_time_internal.h \
@@ -286,6 +287,7 @@ __LIB__libodp_linux_la_SOURCES = \
   odp_schedule_iquery.c \
   odp_schedule_scalable.c \
   odp_schedule_scalable_ordered.c \
+  schedule/subsystem.c \
   odp_shared_memory.c \
   odp_sorted_list.c \
   odp_spinlock.c \
diff --git a/platform/linux-generic/include/odp_schedule_subsystem.h 
b/platform/linux-generic/include/odp_schedule_subsystem.h
new file mode 100644
index ..b5998a6e
--- /dev/null
+++ b/platform/linux-generic/include/odp_schedule_subsystem.h
@@ -0,0 +1,77 @@
+/* Copyright (c) 2017, ARM Limited. All rights reserved.
+ *
+ * Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_SCHEDULE_SUBSYSTEM_H_
+#define ODP_SCHEDULE_SUBSYSTEM_H_
+
+/* API header files */
+#include 
+#include 
+
+/* Internal header files */
+#include 
+
+#define SCHEDULE_SUBSYSTEM_VERSION 0x0001UL
+
+ODP_SUBSYSTEM_DECLARE(schedule);
+
+ODP_SUBSYSTEM_API(schedule, uint64_t, wait_time, uint64_t ns);
+ODP_SUBSYSTEM_API(schedule, odp_event_t, schedule, odp_queue_t *from,
+ uint64_t wait);
+ODP_SUBSYSTEM_API(schedule, int, schedule_multi, odp_queue_t *from,
+ uint64_t wait, odp_event_t events[], int num);
+ODP_SUBSYSTEM_API(schedule, void, schedule_pause, void);
+ODP_SUBSYSTEM_API(schedule, void, schedule_resume, void);
+ODP_SUBSYSTEM_API(schedule, void, schedule_release_atomic, void);
+ODP_SUBSYSTEM_API(schedule, void, schedule_release_ordered, void);
+ODP_SUBSYSTEM_API(schedule, void, schedule_prefetch, int num);
+ODP_SUBSYSTEM_API(schedule, int, schedule_num_prio, void);
+ODP_SUBSYSTEM_API(schedule, odp_schedule_group_t, schedule_group_create,
+ const char *name, const odp_thrmask_t *mask);
+ODP_SUBSYSTEM_API(schedule, int, schedule_group_destroy,
+ odp_schedule_group_t group);
+ODP_SUBSYSTEM_API(schedule, 

[lng-odp] [PATCH CLOUD-DEV v1 0/3] Modular Framework: schedulers

2017-09-05 Thread Github ODP bot


github
/** Email created from pull request 166 (brbrooks:cloud-dev)
 ** https://github.com/Linaro/odp/pull/166
 ** Patch: https://github.com/Linaro/odp/pull/166.patch
 ** Base sha: d3fe76f2af39af17a3661b866a442878abc31ddc
 ** Merge commit sha: 306bdb45117f6891f18ad9c540f94fa9aa54123c
 **/
/github

checkpatch.pl
WARNING: Avoid unnecessary line continuations
#138: FILE: platform/linux-generic/include/odp_schedule_subsystem.h:68:
+   odp_api_proto(schedule, schedule_release_atomic) \

WARNING: Avoid unnecessary line continuations
#140: FILE: platform/linux-generic/include/odp_schedule_subsystem.h:70:
+   odp_api_proto(schedule, schedule_release_ordered) \

total: 0 errors, 2 warnings, 0 checks, 124 lines checked


to_send-p-000.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
WARNING: externs should be avoided in .c files
#297: FILE: platform/linux-generic/odp_schedule_if.c:11:
+extern const schedule_fn_t schedule_scalable_fn;

WARNING: externs should be avoided in .c files
#298: FILE: platform/linux-generic/odp_schedule_if.c:12:
+extern const schedule_fn_t schedule_default_fn;

WARNING: please, no space before tabs
#576: FILE: platform/linux-generic/schedule/scalable.c:1966:
+^I.wait_time^I ^I= schedule_wait_time,$

total: 0 errors, 3 warnings, 0 checks, 685 lines checked


to_send-p-001.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 371 lines checked


to_send-p-002.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [Linaro/odp]

2017-09-05 Thread GitHub
  Branch: refs/tags/cloud-after-modular-pool
  Home:   https://github.com/Linaro/odp


[lng-odp] [Linaro/odp]

2017-09-05 Thread GitHub
  Branch: refs/tags/cloud-before-modular-pool
  Home:   https://github.com/Linaro/odp


[lng-odp] [Bug 3238] doxygen warnings on helper header files

2017-09-05 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3238

Bill Fischofer  changed:

   What|Removed |Added

 CC||maxim.uva...@linaro.org

--- Comment #2 from Bill Fischofer  ---
Adding Maxim to interested parties list. Maxim: Any idea why Travis didn't
catch this one? I thought we were including the doxygen builds as part of the
tests? In addition to fixing this particular bug we need to be sure Travis is
able to detect this sort of issue going forward.

Or is the problem that Travis is still using an older version of Doxygen? It
seems the newer doxygen (1.8.13) included in Ubuntu 17.04 is the one that has
become stricter in this regard. Perhaps we can upgrade our local Travis
instances if this isn't the default?

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

[lng-odp] [Bug 3238] doxygen warnings on helper header files

2017-09-05 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3238

Bill Fischofer  changed:

   What|Removed |Added

 Status|UNCONFIRMED |CONFIRMED
 Ever confirmed|0   |1
 CC||bill.fischo...@linaro.org
   Assignee|lng-odp@lists.linaro.org|dmitry.ereminsolenikov@lina
   ||ro.org

--- Comment #1 from Bill Fischofer  ---
This bug is also present in master. Git bisect shows the culprit to be:

11fed684507a320fbb79dc86769c8f1755d0276f is the first bad commit
commit 11fed684507a320fbb79dc86769c8f1755d0276f
Author: Dmitry Eremin-Solenikov 
Date:   Mon Aug 28 15:55:34 2017 +0300

helper: move include files to helper/include

Repair build with --enable-helper-linux option.
https://bugs.linaro.org/show_bug.cgi?id=3216

Signed-off-by: Dmitry Eremin-Solenikov 
Signed-off-by: Maxim Uvarov 

:04 04 4a52f3b775e17540c8a74b5a6cbc4a287eb7c1ac
e75994bf2f8236e4b81c26a63bb88d5763f8fa0f M  helper

Assigning to Dmitry for analysis and proposed fix.

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

[lng-odp] [PATCH v2 1/1] linux-gen: deduplicate arch-specific files

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Rewrite ARCH-specific files so that there is no significant code
duplication between different arch files and default files set.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 163 (lumag:improve-build-4)
 ** https://github.com/Linaro/odp/pull/163
 ** Patch: https://github.com/Linaro/odp/pull/163.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 9edbacb89c8a2ac849ad568a116e858db75711da
 **/
 configure.ac   |  3 +-
 platform/Makefile.inc  | 19 --
 platform/linux-generic/Makefile.am | 50 +++---
 .../linux-generic/arch/aarch64/odp/api/cpu_arch.h  | 30 +
 .../odp_cpu_arch.c => aarch64/odp_global_time.c}   | 45 -
 .../linux-generic/arch/arm/odp_sysinfo_parse.c | 33 --
 platform/linux-generic/arch/default/odp_cpu_arch.c | 28 
 .../linux-generic/arch/default/odp_cpu_cycles.c| 19 ++
 .../linux-generic/arch/default/odp_global_time.c   | 33 ++
 platform/linux-generic/arch/mips64/odp_cpu_arch.c  | 25 ---
 platform/linux-generic/arch/powerpc/odp_cpu_arch.c | 25 ---
 .../linux-generic/arch/powerpc/odp_global_time.c   | 15 +
 platform/linux-generic/arch/x86/odp_cpu_arch.c | 72 
 platform/linux-generic/arch/x86/odp_global_time.c  | 77 ++
 14 files changed, 216 insertions(+), 258 deletions(-)
 create mode 100644 platform/linux-generic/arch/aarch64/odp/api/cpu_arch.h
 rename platform/linux-generic/arch/{arm/odp_cpu_arch.c => 
aarch64/odp_global_time.c} (65%)
 delete mode 100644 platform/linux-generic/arch/arm/odp_sysinfo_parse.c
 create mode 100644 platform/linux-generic/arch/default/odp_cpu_cycles.c
 create mode 100644 platform/linux-generic/arch/default/odp_global_time.c
 create mode 100644 platform/linux-generic/arch/powerpc/odp_global_time.c
 create mode 100644 platform/linux-generic/arch/x86/odp_global_time.c

diff --git a/configure.ac b/configure.ac
index df0a0f61..5ff85d55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,7 +107,7 @@ AS_CASE([$host],
   [i686*], [ARCH_DIR=x86],
   [mips64*], [ARCH_DIR=mips64],
   [powerpc*], [ARCH_DIR=powerpc],
-  [aarch64*], [ARCH_DIR=arm],
+  [aarch64*], [ARCH_DIR=aarch64],
   [arm*], [ARCH_DIR=arm],
   [ARCH_DIR=undefined]
 )
@@ -218,6 +218,7 @@ AM_CONDITIONAL([user_guide], [test "x${user_guides}" = 
"xyes" ])
 AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
 AM_CONDITIONAL([helper_linux], [test x$helper_linux = xyes ])
 AM_CONDITIONAL([ARCH_IS_ARM], [test "x${ARCH_DIR}" = "xarm"])
+AM_CONDITIONAL([ARCH_IS_AARCH64], [test "x${ARCH_DIR}" = "xaarch64"])
 AM_CONDITIONAL([ARCH_IS_MIPS64], [test "x${ARCH_DIR}" = "xmips64"])
 AM_CONDITIONAL([ARCH_IS_POWERPC], [test "x${ARCH_DIR}" = "xpowerpc"])
 AM_CONDITIONAL([ARCH_IS_X86], [test "x${ARCH_DIR}" = "xx86"])
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 738f0f9a..bcd06c44 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -84,22 +84,3 @@ odpapiabiarchinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/pool.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/queue.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/shared_memory.h
-
-EXTRA_DIST = \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/x86/cpu_flags.c \
-arch/x86/cpu_flags.h
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index 8f0618f4..eef89821 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -68,17 +68,16 @@ odpapiinclude_HEADERS = \
  $(srcdir)/include/odp/api/traffic_mngr.h \
  $(srcdir)/include/odp/api/version.h
 
+odpapiinclude_HEADERS += $(arch_odp_headers)
 if ARCH_IS_ARM
-odpapiinclude_HEADERS += $(srcdir)/arch/arm/odp/api/cpu_arch.h
+endif
+if ARCH_IS_AARCH64
 endif
 if ARCH_IS_MIPS64
-odpapiinclude_HEADERS += $(srcdir)/arch/mips64/odp/api/cpu_arch.h
 endif
 if ARCH_IS_POWERPC
-odpapiinclude_HEADERS += $(srcdir)/arch/powerpc/odp/api/cpu_arch.h
 endif
 if ARCH_IS_X86
-odpapiinclude_HEADERS += $(srcdir)/arch/x86/odp/api/cpu_arch.h
 endif
 
 

[lng-odp] [PATCH v2 0/1] linux-gen: deduplicate arch-specific files

2017-09-05 Thread Github ODP bot
Rewrite ARCH-specific files so that there is no significant code
duplication between different arch files and default files set.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org

github
/** Email created from pull request 163 (lumag:improve-build-4)
 ** https://github.com/Linaro/odp/pull/163
 ** Patch: https://github.com/Linaro/odp/pull/163.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 9edbacb89c8a2ac849ad568a116e858db75711da
 **/
/github

checkpatch.pl
WARNING: Use of volatile is usually wrong: see 
Documentation/volatile-considered-harmful.txt
#201: FILE: platform/linux-generic/arch/aarch64/odp/api/cpu_arch.h:23:
+   __asm volatile("isb" ::: "memory");

total: 0 errors, 1 warnings, 0 checks, 374 lines checked


to_send-p-000.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
/checkpatch.pl


[lng-odp] [PATCH v3 8/13] test: rework build system

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

- Stop using extra libraries just to create a test executable
- Stop using EXTRA_DIST to distribute headers, include them into
  _SOURCES
- Stop using unnecessary dist_ prefixes, sources are distributed
  automatically

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 test/common_plat/common/Makefile.am |  8 +++-
 test/common_plat/miscellaneous/Makefile.am  |  2 +-
 test/common_plat/performance/Makefile.am| 19 +--
 test/common_plat/validation/api/atomic/Makefile.am  |  9 ++---
 test/common_plat/validation/api/barrier/Makefile.am |  9 ++---
 test/common_plat/validation/api/buffer/Makefile.am  |  9 ++---
 .../validation/api/classification/Makefile.am   | 20 +---
 test/common_plat/validation/api/cpumask/Makefile.am | 10 ++
 test/common_plat/validation/api/crypto/Makefile.am  | 16 
 test/common_plat/validation/api/errno/Makefile.am   |  9 ++---
 test/common_plat/validation/api/hash/Makefile.am|  9 ++---
 test/common_plat/validation/api/init/Makefile.am| 16 ++--
 test/common_plat/validation/api/lock/Makefile.am|  9 ++---
 test/common_plat/validation/api/packet/Makefile.am  |  9 ++---
 test/common_plat/validation/api/pktio/Makefile.am   |  9 ++---
 test/common_plat/validation/api/pool/Makefile.am|  9 ++---
 test/common_plat/validation/api/queue/Makefile.am   |  9 ++---
 test/common_plat/validation/api/random/Makefile.am  |  9 ++---
 .../validation/api/scheduler/Makefile.am|  9 ++---
 test/common_plat/validation/api/shmem/Makefile.am   |  9 ++---
 .../common_plat/validation/api/std_clib/Makefile.am |  9 ++---
 test/common_plat/validation/api/system/Makefile.am  |  9 ++---
 test/common_plat/validation/api/thread/Makefile.am  | 12 +++-
 test/common_plat/validation/api/time/Makefile.am|  8 ++--
 test/common_plat/validation/api/timer/Makefile.am   |  9 ++---
 .../validation/api/traffic_mngr/Makefile.am |  8 ++--
 test/linux-generic/mmap_vlan_ins/Makefile.am|  2 +-
 test/linux-generic/pktio_ipc/Makefile.am|  8 ++--
 test/linux-generic/ring/Makefile.am | 20 
 test/linux-generic/validation/api/shmem/Makefile.am | 13 -
 test/linux-generic/validation/api/shmem/shmem.h | 21 -
 31 files changed, 92 insertions(+), 235 deletions(-)
 delete mode 100644 test/linux-generic/validation/api/shmem/shmem.h

diff --git a/test/common_plat/common/Makefile.am 
b/test/common_plat/common/Makefile.am
index 9fd08ee8..5736214a 100644
--- a/test/common_plat/common/Makefile.am
+++ b/test/common_plat/common/Makefile.am
@@ -2,12 +2,10 @@ include $(top_srcdir)/test/Makefile.inc
 
 noinst_LTLIBRARIES = libcunit_common.la libcpumask_common.la 
libthrmask_common.la
 
-libcunit_common_la_SOURCES = odp_cunit_common.c
+libcunit_common_la_SOURCES = odp_cunit_common.c odp_cunit_common.h
 libcunit_common_la_LIBADD = $(CUNIT_LIBS)
 
-libcpumask_common_la_SOURCES = mask_common.c
+libcpumask_common_la_SOURCES = mask_common.c mask_common.h
 
-libthrmask_common_la_SOURCES = mask_common.c
+libthrmask_common_la_SOURCES = mask_common.c mask_common.h
 libthrmask_common_la_CFLAGS = $(AM_CFLAGS) -DTEST_THRMASK
-
-EXTRA_DIST = mask_common.h odp_cunit_common.h
diff --git a/test/common_plat/miscellaneous/Makefile.am 
b/test/common_plat/miscellaneous/Makefile.am
index 7d8cf353..48240efe 100644
--- a/test/common_plat/miscellaneous/Makefile.am
+++ b/test/common_plat/miscellaneous/Makefile.am
@@ -9,4 +9,4 @@ odp_api_from_cpp_CXXFLAGS = $(AM_CXXFLAGS)
 
 odp_api_from_cpp_LDFLAGS = $(AM_LDFLAGS) -static
 
-dist_odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
+odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
diff --git a/test/common_plat/performance/Makefile.am 
b/test/common_plat/performance/Makefile.am
index 3299f03f..c67de749 100644
--- a/test/common_plat/performance/Makefile.am
+++ b/test/common_plat/performance/Makefile.am
@@ -40,16 +40,15 @@ odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
 odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
 
 noinst_HEADERS = \
- $(top_srcdir)/test/test_debug.h \
- dummy_crc.h
+ $(top_srcdir)/test/test_debug.h
 
-dist_odp_bench_packet_SOURCES = odp_bench_packet.c
-dist_odp_crypto_SOURCES = odp_crypto.c
-dist_odp_pktio_ordered_SOURCES = odp_pktio_ordered.c
-dist_odp_sched_latency_SOURCES = odp_sched_latency.c
-dist_odp_scheduling_SOURCES = odp_scheduling.c
-dist_odp_pktio_perf_SOURCES = 

[lng-odp] [PATCH v3 13/13] travis: skip install stage for doxygen and checkpatch tests

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 .travis.yml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6fbae4f2..38586242 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -118,7 +118,6 @@ install:
 - sudo apt-get install linux-headers-`uname -r`
 - sudo pip install coverage
 - gem install asciidoctor
-- PATH=${PATH//:\.\/node_modules\/\.bin/}
 
 #  DPDK pktio. Note that cache must be purged if dpdk version changes.
 - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
@@ -265,6 +264,8 @@ jobs:
 - stage: test
   env: TEST=doxygen
   compiler: gcc
+  install:
+  - true
   script:
   # doxygen does not trap on warnings, check for them 
here.
   - ./bootstrap
@@ -274,6 +275,8 @@ jobs:
 - stage: test
   env: TEST=checkpatch
   compiler: gcc
+  install:
+  - true
   script:
   - echo ${TRAVIS_COMMIT_RANGE};
   - ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 
's/\.//'`;



[lng-odp] [PATCH v3 12/13] travis: don't error out if there are no patches to check

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 5a32ad5d..6fbae4f2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -277,7 +277,7 @@ jobs:
   script:
   - echo ${TRAVIS_COMMIT_RANGE};
   - ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 
's/\.//'`;
-  - if [ -z "${ODP_PATCHES}" ]; then env; exit 1; fi;
+  - if [ -z "${ODP_PATCHES}" ]; then env; exit 0; fi;
   - ./scripts/ci-checkpatches.sh ${ODP_PATCHES};
 
 after_failure:



[lng-odp] [PATCH v3 11/13] test: misc rewrites in Makefile.am files

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 test/common_plat/miscellaneous/Makefile.am   | 2 --
 test/common_plat/performance/Makefile.am | 8 
 test/common_plat/validation/Makefile.am  | 2 +-
 test/linux-generic/mmap_vlan_ins/Makefile.am | 6 --
 test/linux-generic/performance/Makefile.am   | 2 +-
 test/linux-generic/pktio_ipc/Makefile.am | 3 ---
 6 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/test/common_plat/miscellaneous/Makefile.am 
b/test/common_plat/miscellaneous/Makefile.am
index 5f2cc53d..7d42b07e 100644
--- a/test/common_plat/miscellaneous/Makefile.am
+++ b/test/common_plat/miscellaneous/Makefile.am
@@ -5,6 +5,4 @@ bin_PROGRAMS =  odp_api_from_cpp$(EXEEXT)
 TESTS = odp_api_from_cpp$(EXEEXT)
 endif
 
-odp_api_from_cpp_CXXFLAGS = $(AM_CXXFLAGS)
-
 odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
diff --git a/test/common_plat/performance/Makefile.am 
b/test/common_plat/performance/Makefile.am
index 79e8e39a..ef9537b1 100644
--- a/test/common_plat/performance/Makefile.am
+++ b/test/common_plat/performance/Makefile.am
@@ -24,14 +24,6 @@ endif
 
 bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
-odp_bench_packet_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_crypto_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_perf_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_l2fwd_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_ordered_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_sched_latency_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-
 noinst_HEADERS = \
  $(top_srcdir)/test/test_debug.h
 
diff --git a/test/common_plat/validation/Makefile.am 
b/test/common_plat/validation/Makefile.am
index 5d525fba..32854378 100644
--- a/test/common_plat/validation/Makefile.am
+++ b/test/common_plat/validation/Makefile.am
@@ -1,3 +1,3 @@
-if cunit_support
+if test_vald
 SUBDIRS = api
 endif
diff --git a/test/linux-generic/mmap_vlan_ins/Makefile.am 
b/test/linux-generic/mmap_vlan_ins/Makefile.am
index 2f38e5c6..e42b5254 100644
--- a/test/linux-generic/mmap_vlan_ins/Makefile.am
+++ b/test/linux-generic/mmap_vlan_ins/Makefile.am
@@ -1,14 +1,16 @@
 include $(top_srcdir)/test/Makefile.inc
 TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation
 
-dist_check_SCRIPTS = vlan.pcap \
+dist_check_SCRIPTS = \
 mmap_vlan_ins.sh \
 pktio_env
 
+dist_check_DATA = vlan.pcap
+
 test_SCRIPTS = $(dist_check_SCRIPTS)
+test_DATA = $(dist_check_DATA)
 
 test_PROGRAMS = plat_mmap_vlan_ins$(EXEEXT)
-plat_mmap_vlan_ins_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
 
 # Clonned from example odp_l2fwd simple
 plat_mmap_vlan_ins_SOURCES = mmap_vlan_ins.c
diff --git a/test/linux-generic/performance/Makefile.am 
b/test/linux-generic/performance/Makefile.am
index cb72fce9..0b5da671 100644
--- a/test/linux-generic/performance/Makefile.am
+++ b/test/linux-generic/performance/Makefile.am
@@ -10,4 +10,4 @@ if test_perf_proc
 TESTS = $(TESTSCRIPTS)
 endif
 
-EXTRA_DIST = $(TESTSCRIPTS)
+dist_check_SCRIPTS = $(TESTSCRIPTS)
diff --git a/test/linux-generic/pktio_ipc/Makefile.am 
b/test/linux-generic/pktio_ipc/Makefile.am
index eaa8bdd6..4287fbc0 100644
--- a/test/linux-generic/pktio_ipc/Makefile.am
+++ b/test/linux-generic/pktio_ipc/Makefile.am
@@ -4,9 +4,6 @@ TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation
 test_PROGRAMS = pktio_ipc1\
pktio_ipc2
 
-pktio_ipc1_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
-pktio_ipc2_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
-
 pktio_ipc1_SOURCES = pktio_ipc1.c ipc_common.c ipc_common.h
 pktio_ipc2_SOURCES = pktio_ipc2.c ipc_common.c ipc_common.h
 



[lng-odp] [PATCH v3 10/13] test: build all tests with -static

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 test/Makefile.inc   | 2 +-
 test/common_plat/miscellaneous/Makefile.am  | 2 --
 test/common_plat/performance/Makefile.am| 7 ---
 test/common_plat/validation/api/Makefile.inc| 1 -
 test/linux-generic/mmap_vlan_ins/Makefile.am| 1 -
 test/linux-generic/pktio_ipc/Makefile.am| 2 --
 test/linux-generic/validation/api/shmem/Makefile.am | 2 --
 7 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/test/Makefile.inc b/test/Makefile.inc
index 8bd21432..a45fcf87 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -18,7 +18,7 @@ INCFLAGS = \
 AM_CPPFLAGS = $(INCFLAGS)
 AM_CFLAGS = $(CUNIT_CFLAGS)
 
-AM_LDFLAGS = -L$(LIB)
+AM_LDFLAGS = -L$(LIB) -static
 
 @VALGRIND_CHECK_RULES@
 valgrind_tools = memcheck
diff --git a/test/common_plat/miscellaneous/Makefile.am 
b/test/common_plat/miscellaneous/Makefile.am
index 48240efe..5f2cc53d 100644
--- a/test/common_plat/miscellaneous/Makefile.am
+++ b/test/common_plat/miscellaneous/Makefile.am
@@ -7,6 +7,4 @@ endif
 
 odp_api_from_cpp_CXXFLAGS = $(AM_CXXFLAGS)
 
-odp_api_from_cpp_LDFLAGS = $(AM_LDFLAGS) -static
-
 odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
diff --git a/test/common_plat/performance/Makefile.am 
b/test/common_plat/performance/Makefile.am
index c67de749..79e8e39a 100644
--- a/test/common_plat/performance/Makefile.am
+++ b/test/common_plat/performance/Makefile.am
@@ -24,19 +24,12 @@ endif
 
 bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
-odp_bench_packet_LDFLAGS = $(AM_LDFLAGS) -static
 odp_bench_packet_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_crypto_LDFLAGS = $(AM_LDFLAGS) -static
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_perf_LDFLAGS = $(AM_LDFLAGS) -static
 odp_pktio_perf_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_l2fwd_LDFLAGS = $(AM_LDFLAGS) -static
 odp_l2fwd_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_ordered_LDFLAGS = $(AM_LDFLAGS) -static
 odp_pktio_ordered_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_sched_latency_LDFLAGS = $(AM_LDFLAGS) -static
 odp_sched_latency_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
 odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
 
 noinst_HEADERS = \
diff --git a/test/common_plat/validation/api/Makefile.inc 
b/test/common_plat/validation/api/Makefile.inc
index a9448b17..3e29298d 100644
--- a/test/common_plat/validation/api/Makefile.inc
+++ b/test/common_plat/validation/api/Makefile.inc
@@ -3,7 +3,6 @@ include $(top_srcdir)/test/Makefile.inc
 COMMON_DIR = $(top_builddir)/test/common_plat/common
 
 AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common
-AM_LDFLAGS += -static
 AM_LDFLAGS += $(DPDK_PMDS)
 
 AM_CFLAGS += $(CUNIT_PFLAGS)
diff --git a/test/linux-generic/mmap_vlan_ins/Makefile.am 
b/test/linux-generic/mmap_vlan_ins/Makefile.am
index 5fb6afd9..2f38e5c6 100644
--- a/test/linux-generic/mmap_vlan_ins/Makefile.am
+++ b/test/linux-generic/mmap_vlan_ins/Makefile.am
@@ -8,7 +8,6 @@ dist_check_SCRIPTS = vlan.pcap \
 test_SCRIPTS = $(dist_check_SCRIPTS)
 
 test_PROGRAMS = plat_mmap_vlan_ins$(EXEEXT)
-plat_mmap_vlan_ins_LDFLAGS = $(AM_LDFLAGS) -static
 plat_mmap_vlan_ins_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
 
 # Clonned from example odp_l2fwd simple
diff --git a/test/linux-generic/pktio_ipc/Makefile.am 
b/test/linux-generic/pktio_ipc/Makefile.am
index ad5de50b..eaa8bdd6 100644
--- a/test/linux-generic/pktio_ipc/Makefile.am
+++ b/test/linux-generic/pktio_ipc/Makefile.am
@@ -5,9 +5,7 @@ test_PROGRAMS = pktio_ipc1\
pktio_ipc2
 
 pktio_ipc1_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
-pktio_ipc1_LDFLAGS = $(AM_LDFLAGS) -static
 pktio_ipc2_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
-pktio_ipc2_LDFLAGS = $(AM_LDFLAGS) -static
 
 pktio_ipc1_SOURCES = pktio_ipc1.c ipc_common.c ipc_common.h
 pktio_ipc2_SOURCES = pktio_ipc2.c ipc_common.c ipc_common.h
diff --git a/test/linux-generic/validation/api/shmem/Makefile.am 
b/test/linux-generic/validation/api/shmem/Makefile.am
index 6ff77b00..962450e5 100644
--- a/test/linux-generic/validation/api/shmem/Makefile.am
+++ b/test/linux-generic/validation/api/shmem/Makefile.am
@@ -13,12 +13,10 @@ shmem_odp1_SOURCES = shmem_odp1.c shmem_odp1.h 
shmem_common.h
 shmem_odp1_CFLAGS = $(AM_CFLAGS) \
   $(INCCUNIT_COMMON) \
   $(INCODP)
-shmem_odp1_LDFLAGS = $(AM_LDFLAGS)
 shmem_odp1_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
 
 shmem_odp2_SOURCES = shmem_odp2.c shmem_odp2.h shmem_common.h
 shmem_odp2_CFLAGS = $(AM_CFLAGS) \
  

[lng-odp] [PATCH v3 9/13] helper: test: rework build system

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

- Stop using extra libraries just to create a test executable
- Stop using EXTRA_DIST to distribute headers, include them into
  _SOURCES
- Stop using unnecessary dist_ prefixes, sources are distributed
  automatically

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 helper/test/Makefile.am | 16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index e30a1e71..983e2c68 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -44,15 +44,13 @@ if test_helper
 TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
 endif
 
-dist_bin_SCRIPTS =
-
 test_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
-EXTRA_DIST = odpthreads_as_processes odpthreads_as_pthreads
+dist_check_SCRIPTS = odpthreads_as_processes odpthreads_as_pthreads
 
-dist_chksum_SOURCES = chksum.c
-dist_cuckootable_SOURCES = cuckootable.c
-dist_odpthreads_SOURCES = odpthreads.c
-dist_parse_SOURCES = parse.c
-dist_table_SOURCES = table.c
-dist_iplookuptable_SOURCES = iplookuptable.c
+chksum_SOURCES = chksum.c
+cuckootable_SOURCES = cuckootable.c
+odpthreads_SOURCES = odpthreads.c
+parse_SOURCES = parse.c
+table_SOURCES = table.c
+iplookuptable_SOURCES = iplookuptable.c



[lng-odp] [PATCH v3 7/13] configure: stop setting AM_* variables

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

AM_* variables by design should be set by Makefile.am, not by
configure.ac. Use CFLAGS/CXXFLAGS instead.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 configure.ac   | 12 +++-
 example/Makefile.inc   |  4 ++--
 helper/Makefile.am |  4 ++--
 helper/test/Makefile.am|  4 ++--
 platform/Makefile.inc  |  4 ++--
 platform/linux-generic/Makefile.am |  2 +-
 test/Makefile.inc  |  4 ++--
 test/linux-generic/Makefile.inc|  4 ++--
 8 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/configure.ac b/configure.ac
index f6f69942..d4c07a2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -329,6 +329,7 @@ ODP_CHECK_CFLAG([-Wformat-truncation=0])
 ODP_CHECK_CFLAG([-Wformat-overflow=0])
 
 ODP_CFLAGS="$ODP_CFLAGS -std=c99"
+ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11"
 
 # Extra flags for example to suppress certain warning types
 ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
@@ -347,8 +348,8 @@ esac
 ##
 # Default include setup
 ##
-AM_CFLAGS="$AM_CFLAGS $ODP_CFLAGS"
-AM_CXXFLAGS="-std=c++11"
+CFLAGS="$CFLAGS $ODP_CFLAGS"
+CXXFLAGS="$CXXFLAGS $ODP_CXXFLAGS"
 
 AC_CONFIG_FILES([Makefile
 pkgconfig/libodp-linux.pc
@@ -359,11 +360,8 @@ AC_CONFIG_FILES([Makefile
 # distribute the changed variables among the Makefiles
 
 AC_SUBST([LIBS])
-AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([CPPFLAGS])
-AC_SUBST([AM_CFLAGS])
 AC_SUBST([CFLAGS])
-AC_SUBST([AM_LDFLAGS])
 AC_SUBST([LDFLAGS])
 AC_SUBST([EXEEXT])
 
@@ -390,12 +388,8 @@ AC_MSG_RESULT([
cc: ${CC}
cc version: ${CC_VERSION}
cppflags:   ${CPPFLAGS}
-   am_cppflags:${AM_CPPFLAGS}
-   am_cxxflags:${AM_CXXFLAGS}
cflags: ${CFLAGS}
-   am_cflags:  ${AM_CFLAGS}
ldflags:${LDFLAGS}
-   am_ldflags: ${AM_LDFLAGS}
libs:   ${LIBS}
defs:   ${DEFS}
static libraries:   ${enable_static}
diff --git a/example/Makefile.inc b/example/Makefile.inc
index 7cc21154..cba385b7 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -1,6 +1,6 @@
 LIB   = $(top_builddir)/lib
 LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS)
-AM_CFLAGS += \
+AM_CFLAGS = \
-I$(srcdir) \
-I$(top_srcdir)/example \
-I$(top_srcdir)/platform/@with_platform@/include \
@@ -11,4 +11,4 @@ AM_CFLAGS += \
-I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
-I$(top_builddir)/include
 
-AM_LDFLAGS += -L$(LIB)
+AM_LDFLAGS = -L$(LIB)
diff --git a/helper/Makefile.am b/helper/Makefile.am
index fa503f1a..bf75b467 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -2,7 +2,7 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
 
 LIB   = $(top_builddir)/lib
-AM_CPPFLAGS += -I$(srcdir)/include
+AM_CPPFLAGS = -I$(srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CPPFLAGS += -I$(top_srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
@@ -10,7 +10,7 @@ AM_CPPFLAGS += 
-I$(top_builddir)/platform/@with_platform@/include
 AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
 AM_CPPFLAGS += -I$(top_builddir)/include
 
-AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
+AM_LDFLAGS = -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index fdc15f96..e30a1e71 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -17,8 +17,8 @@ INCFLAGS = \
 
 ODP_PLATFORM=${with_platform}
 
-AM_CPPFLAGS += $(INCFLAGS)
-AM_LDFLAGS += -static
+AM_CPPFLAGS = $(INCFLAGS)
+AM_LDFLAGS = -static
 
 EXECUTABLES = chksum$(EXEEXT) \
   cuckootable$(EXEEXT) \
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index a88e8384..f6722560 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -8,9 +8,9 @@ pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp-linux.pc
 VPATH = $(srcdir) $(builddir)
 lib_LTLIBRARIES = $(LIB)/libodp-linux.la
 
-AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
+AM_LDFLAGS = -version-number '$(ODP_LIBSO_VERSION)'
 
-AM_CFLAGS += "-DGIT_HASH=$(VERSION)"
+AM_CFLAGS = "-DGIT_HASH=$(VERSION)"
 AM_CFLAGS += 

[lng-odp] [PATCH v3 5/13] build: drop platorm/linux-generic/Makefile.inc

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Mandate that platform provides
platform/$(with_platform)/arch/$(ARCH_DIR) directory and reference it
directly from all Makefile.am/.inc files. Main reason for this change is
to allow automake to process all includes at the time of Makefile.am ->
Makefile.in conversion. Currently it can not determine path for
platform/@with_platform@/Makefile.inc, thus inclusion is left for main
make invocation.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 example/Makefile.inc| 2 +-
 helper/Makefile.am  | 3 +--
 helper/test/Makefile.am | 3 +--
 platform/linux-generic/Makefile.am  | 5 ++---
 platform/linux-generic/Makefile.inc | 2 --
 test/Makefile.inc   | 2 +-
 6 files changed, 6 insertions(+), 11 deletions(-)
 delete mode 100644 platform/linux-generic/Makefile.inc

diff --git a/example/Makefile.inc b/example/Makefile.inc
index c6d7ff5f..7cc21154 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -1,4 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
 LIB   = $(top_builddir)/lib
 LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS)
 AM_CFLAGS += \
@@ -9,6 +8,7 @@ AM_CFLAGS += \
-I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/helper/include \
-I$(top_builddir)/platform/@with_platform@/include \
+   -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
-I$(top_builddir)/include
 
 AM_LDFLAGS += -L$(LIB)
diff --git a/helper/Makefile.am b/helper/Makefile.am
index c69fd678..ca512ff1 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
 
@@ -9,6 +7,7 @@ AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_srcdir)/include
 AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include
+AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
 AM_CFLAGS += -I$(top_builddir)/include
 
 AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index beef9191..00997f10 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
-
 LIB   = $(top_builddir)/lib
 
 #in the following line, the libs using the symbols should come before
@@ -13,6 +11,7 @@ INCFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/platform/@with_platform@/include \
+   -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
-I$(top_builddir)/include \
-I$(top_srcdir)/helper
 
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index 8f0618f4..eada421c 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -2,13 +2,13 @@
 #export CUSTOM_STR=https://git.linaro.org/lng/odp.git
 
 include $(top_srcdir)/platform/Makefile.inc
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
 
 AM_CFLAGS +=  -I$(srcdir)/include
 AM_CFLAGS +=  -I$(top_srcdir)/include
 AM_CFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CFLAGS +=  -I$(top_builddir)/include
 AM_CFLAGS +=  -Iinclude
+AM_CFLAGS +=  -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
 
 AM_CPPFLAGS +=  $(OPENSSL_CPPFLAGS)
 AM_CPPFLAGS +=  $(DPDK_CPPFLAGS)
@@ -170,8 +170,7 @@ noinst_HEADERS = \
  ${srcdir}/include/protocols/ip.h \
  ${srcdir}/include/protocols/ipsec.h \
  ${srcdir}/include/protocols/tcp.h \
- ${srcdir}/include/protocols/udp.h \
- ${srcdir}/Makefile.inc
+ ${srcdir}/include/protocols/udp.h
 
 __LIB__libodp_linux_la_SOURCES = \
   _fdserver.c \
diff --git a/platform/linux-generic/Makefile.inc 
b/platform/linux-generic/Makefile.inc
deleted file mode 100644
index 876519be..
--- a/platform/linux-generic/Makefile.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-AM_CFLAGS   += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
-AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
diff --git a/test/Makefile.inc b/test/Makefile.inc
index 728868df..d701ebd7 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -1,4 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
 LIB   = $(top_builddir)/lib
 
 #in the 

[lng-odp] [PATCH v3 6/13] build: use AM_CPPFLAGS to set include paths, rather than AM_CFLAGS

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 helper/Makefile.am | 14 +++---
 helper/test/Makefile.am|  2 +-
 platform/linux-generic/Makefile.am | 12 ++--
 test/Makefile.inc  |  3 +--
 4 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/helper/Makefile.am b/helper/Makefile.am
index ca512ff1..fa503f1a 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -2,13 +2,13 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
 
 LIB   = $(top_builddir)/lib
-AM_CFLAGS += -I$(srcdir)/include
-AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
-AM_CFLAGS += -I$(top_srcdir)/include
-AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
-AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include
-AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
-AM_CFLAGS += -I$(top_builddir)/include
+AM_CPPFLAGS += -I$(srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
+AM_CPPFLAGS += -I$(top_builddir)/platform/@with_platform@/include
+AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
+AM_CPPFLAGS += -I$(top_builddir)/include
 
 AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index 00997f10..fdc15f96 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -17,7 +17,7 @@ INCFLAGS = \
 
 ODP_PLATFORM=${with_platform}
 
-AM_CFLAGS += $(INCFLAGS)
+AM_CPPFLAGS += $(INCFLAGS)
 AM_LDFLAGS += -static
 
 EXECUTABLES = chksum$(EXEEXT) \
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index eada421c..e644505e 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -3,12 +3,12 @@
 
 include $(top_srcdir)/platform/Makefile.inc
 
-AM_CFLAGS +=  -I$(srcdir)/include
-AM_CFLAGS +=  -I$(top_srcdir)/include
-AM_CFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
-AM_CFLAGS +=  -I$(top_builddir)/include
-AM_CFLAGS +=  -Iinclude
-AM_CFLAGS +=  -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
+AM_CPPFLAGS +=  -I$(srcdir)/include
+AM_CPPFLAGS +=  -I$(top_srcdir)/include
+AM_CPPFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
+AM_CPPFLAGS +=  -I$(top_builddir)/include
+AM_CPPFLAGS +=  -Iinclude
+AM_CPPFLAGS +=  -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
 
 AM_CPPFLAGS +=  $(OPENSSL_CPPFLAGS)
 AM_CPPFLAGS +=  $(DPDK_CPPFLAGS)
diff --git a/test/Makefile.inc b/test/Makefile.inc
index d701ebd7..f5bb7674 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -15,9 +15,8 @@ INCFLAGS = \
-I$(top_srcdir)/test \
-I$(top_builddir)/include
 
-AM_CFLAGS += $(INCFLAGS)
+AM_CPPFLAGS = $(INCFLAGS)
 AM_CFLAGS += $(CUNIT_CFLAGS)
-AM_CXXFLAGS = $(INCFLAGS)
 
 AM_LDFLAGS += -L$(LIB)
 



[lng-odp] [PATCH v3 4/13] build: drop -Wno-deprecated-declaration

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

We do not use deprecated attribute anymore, thus let's drop the
-Wno-deprecated-declaration flag from compiler options.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 platform/Makefile.inc   | 3 ---
 test/common_plat/validation/api/Makefile.am | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 738f0f9a..a88e8384 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -13,9 +13,6 @@ AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
 AM_CFLAGS += "-DGIT_HASH=$(VERSION)"
 AM_CFLAGS += $(VISIBILITY_CFLAGS)
 
-#The implementation will need to retain the deprecated implementation
-AM_CFLAGS += -Wno-deprecated-declarations
-
 AM_CFLAGS += @PTHREAD_CFLAGS@
 
 odpapispecincludedir= $(includedir)/odp/api/spec
diff --git a/test/common_plat/validation/api/Makefile.am 
b/test/common_plat/validation/api/Makefile.am
index e2d30a67..601bae6d 100644
--- a/test/common_plat/validation/api/Makefile.am
+++ b/test/common_plat/validation/api/Makefile.am
@@ -23,6 +23,3 @@ ODP_MODULES = atomic \
  system
 
 SUBDIRS = $(ODP_MODULES)
-
-#The tests will need to retain the deprecated test implementation
-AM_CFLAGS += -Wno-deprecated-declarations



[lng-odp] [PATCH v3 2/13] configure: use ODP_CHECK_FLAG to check for -mcx16

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 configure.ac | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index df0a0f61..f6f69942 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,16 +339,7 @@ ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
 case "${host}" in
   i?86? | x86*)
   if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then
- my_save_cflags="$CFLAGS"
-
- CFLAGS=-mcx16
- AC_MSG_CHECKING([whether CC supports -mcx16])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
-   [AC_MSG_RESULT([yes])]
-   [ODP_CFLAGS="$ODP_CFLAGS $CFLAGS"],
-   [AC_MSG_RESULT([no])]
-   )
- CFLAGS="$my_save_cflags"
+ ODP_CHECK_CFLAG([-mcx16])
   fi
   ;;
 esac



[lng-odp] [PATCH v3 3/13] linux-gen: crypto: stop using RAND_pseudo_bytes()

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

RAND_pseudo_bytes() was deprecated in OpenSSL 1.1.0. It is recommended
to use RAND_bytes() instead.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 platform/linux-generic/odp_crypto.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index 563e919e..c7da548a 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -1048,9 +1048,6 @@ int32_t odp_random_data(uint8_t *buf, uint32_t len, 
odp_random_kind_t kind)
 
switch (kind) {
case ODP_RANDOM_BASIC:
-   RAND_pseudo_bytes(buf, len);
-   return len;
-
case ODP_RANDOM_CRYPTO:
rc = RAND_bytes(buf, len);
return (1 == rc) ? (int)len /*success*/: -1 /*failure*/;



[lng-odp] [PATCH v3 1/13] travis: drop ubuntu-toolchain-r-test PPA

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
 .travis.yml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a14974c4..5a32ad5d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,8 +36,6 @@ env:
 
 addons:
 apt:
-sources:
-- ubuntu-toolchain-r-test
 packages:
 - gcc
 - clang-3.8



[lng-odp] [PATCH v3 0/13] More build system improvements

2017-09-05 Thread Github ODP bot


github
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 38d800e8e4b3c89a118426f28490b2e87091e127
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 17 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 9 lines checked


to_send-p-002.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 12 lines checked


to_send-p-003.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 69 lines checked


to_send-p-004.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 56 lines checked


to_send-p-005.patch has no obvious style problems and is ready for submission.
WARNING: Do not use whitespace before Cc:
#64: FILE: configure.ac:388:
cc: ${CC}

WARNING: Use a single space after Cc:
#64: FILE: configure.ac:388:
cc: ${CC}

ERROR: Unrecognized email address: '${CC}'
#64: FILE: configure.ac:388:
cc: ${CC}

total: 1 errors, 2 warnings, 0 checks, 119 lines checked


to_send-p-006.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 429 lines checked


to_send-p-007.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 22 lines checked


to_send-p-008.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 68 lines checked


to_send-p-009.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 56 lines checked


to_send-p-010.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-011.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 23 lines checked


to_send-p-012.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [PATCH v1 1/1] linux-gen: deduplicate arch-specific files

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Rewrite ARCH-specific files so that there is no significant code
duplication between different arch files and default files set.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 163 (lumag:improve-build-4)
 ** https://github.com/Linaro/odp/pull/163
 ** Patch: https://github.com/Linaro/odp/pull/163.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: ba3d784c62f2d435daa5d26e1c815ff3d29574f7
 **/
 configure.ac   |  3 +-
 platform/Makefile.inc  | 19 --
 platform/linux-generic/Makefile.am | 48 +++---
 .../linux-generic/arch/aarch64/odp/api/cpu_arch.h  | 30 +
 .../odp_cpu_arch.c => aarch64/odp_global_time.c}   | 45 -
 .../linux-generic/arch/arm/odp_sysinfo_parse.c | 33 --
 platform/linux-generic/arch/default/odp_cpu_arch.c | 28 
 .../linux-generic/arch/default/odp_cpu_cycles.c| 19 ++
 .../linux-generic/arch/default/odp_global_time.c   | 33 ++
 platform/linux-generic/arch/mips64/odp_cpu_arch.c  | 25 ---
 platform/linux-generic/arch/powerpc/odp_cpu_arch.c | 25 ---
 .../linux-generic/arch/powerpc/odp_global_time.c   | 15 +
 platform/linux-generic/arch/x86/odp_cpu_arch.c | 72 
 platform/linux-generic/arch/x86/odp_global_time.c  | 77 ++
 14 files changed, 214 insertions(+), 258 deletions(-)
 create mode 100644 platform/linux-generic/arch/aarch64/odp/api/cpu_arch.h
 rename platform/linux-generic/arch/{arm/odp_cpu_arch.c => 
aarch64/odp_global_time.c} (65%)
 delete mode 100644 platform/linux-generic/arch/arm/odp_sysinfo_parse.c
 create mode 100644 platform/linux-generic/arch/default/odp_cpu_cycles.c
 create mode 100644 platform/linux-generic/arch/default/odp_global_time.c
 create mode 100644 platform/linux-generic/arch/powerpc/odp_global_time.c
 create mode 100644 platform/linux-generic/arch/x86/odp_global_time.c

diff --git a/configure.ac b/configure.ac
index df0a0f61..5ff85d55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,7 +107,7 @@ AS_CASE([$host],
   [i686*], [ARCH_DIR=x86],
   [mips64*], [ARCH_DIR=mips64],
   [powerpc*], [ARCH_DIR=powerpc],
-  [aarch64*], [ARCH_DIR=arm],
+  [aarch64*], [ARCH_DIR=aarch64],
   [arm*], [ARCH_DIR=arm],
   [ARCH_DIR=undefined]
 )
@@ -218,6 +218,7 @@ AM_CONDITIONAL([user_guide], [test "x${user_guides}" = 
"xyes" ])
 AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
 AM_CONDITIONAL([helper_linux], [test x$helper_linux = xyes ])
 AM_CONDITIONAL([ARCH_IS_ARM], [test "x${ARCH_DIR}" = "xarm"])
+AM_CONDITIONAL([ARCH_IS_AARCH64], [test "x${ARCH_DIR}" = "xaarch64"])
 AM_CONDITIONAL([ARCH_IS_MIPS64], [test "x${ARCH_DIR}" = "xmips64"])
 AM_CONDITIONAL([ARCH_IS_POWERPC], [test "x${ARCH_DIR}" = "xpowerpc"])
 AM_CONDITIONAL([ARCH_IS_X86], [test "x${ARCH_DIR}" = "xx86"])
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 738f0f9a..bcd06c44 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -84,22 +84,3 @@ odpapiabiarchinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/pool.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/queue.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/shared_memory.h
-
-EXTRA_DIST = \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/x86/cpu_flags.c \
-arch/x86/cpu_flags.h
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index 8f0618f4..d213ccef 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -68,17 +68,16 @@ odpapiinclude_HEADERS = \
  $(srcdir)/include/odp/api/traffic_mngr.h \
  $(srcdir)/include/odp/api/version.h
 
+odpapiinclude_HEADERS += $(arch_odp_headers)
 if ARCH_IS_ARM
-odpapiinclude_HEADERS += $(srcdir)/arch/arm/odp/api/cpu_arch.h
+endif
+if ARCH_IS_AARCH64
 endif
 if ARCH_IS_MIPS64
-odpapiinclude_HEADERS += $(srcdir)/arch/mips64/odp/api/cpu_arch.h
 endif
 if ARCH_IS_POWERPC
-odpapiinclude_HEADERS += $(srcdir)/arch/powerpc/odp/api/cpu_arch.h
 endif
 if ARCH_IS_X86
-odpapiinclude_HEADERS += $(srcdir)/arch/x86/odp/api/cpu_arch.h
 endif
 
 

[lng-odp] [PATCH v1 0/1] linux-gen: deduplicate arch-specific files

2017-09-05 Thread Github ODP bot
Rewrite ARCH-specific files so that there is no significant code
duplication between different arch files and default files set.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org

github
/** Email created from pull request 163 (lumag:improve-build-4)
 ** https://github.com/Linaro/odp/pull/163
 ** Patch: https://github.com/Linaro/odp/pull/163.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: ba3d784c62f2d435daa5d26e1c815ff3d29574f7
 **/
/github

checkpatch.pl
WARNING: Use of volatile is usually wrong: see 
Documentation/volatile-considered-harmful.txt
#199: FILE: platform/linux-generic/arch/aarch64/odp/api/cpu_arch.h:23:
+   __asm volatile("isb" ::: "memory");

total: 0 errors, 1 warnings, 0 checks, 372 lines checked


to_send-p-000.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
/checkpatch.pl


[lng-odp] [PATCH v1 1/1] test: fixup CUNIT_CFLAGS variable reference

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Fix type in previous refactoring, which used CUNIT_PFLAGS instead of
CUNIT_CFLAGS.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 164 (lumag:fix-cunit)
 ** https://github.com/Linaro/odp/pull/164
 ** Patch: https://github.com/Linaro/odp/pull/164.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 58bd82a2575919cf8cabe95c0b941afc31c4f14a
 **/
 test/common_plat/validation/api/Makefile.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/common_plat/validation/api/Makefile.inc 
b/test/common_plat/validation/api/Makefile.inc
index a9448b17..d763a817 100644
--- a/test/common_plat/validation/api/Makefile.inc
+++ b/test/common_plat/validation/api/Makefile.inc
@@ -6,7 +6,7 @@ AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common
 AM_LDFLAGS += -static
 AM_LDFLAGS += $(DPDK_PMDS)
 
-AM_CFLAGS += $(CUNIT_PFLAGS)
+AM_CFLAGS += $(CUNIT_CFLAGS)
 
 LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la
 LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la



[lng-odp] [PATCH v1 8/11] test: rework build system

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

- Stop using extra libraries just to create a test executable
- Stop using EXTRA_DIST to distribute headers, include them into
  _SOURCES
- Stop using unnecessary dist_ prefixes, sources are distributed
  automatically

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 test/common_plat/common/Makefile.am |  8 +++-
 test/common_plat/miscellaneous/Makefile.am  |  2 +-
 test/common_plat/performance/Makefile.am| 19 +--
 test/common_plat/validation/api/atomic/Makefile.am  |  9 ++---
 test/common_plat/validation/api/barrier/Makefile.am |  9 ++---
 test/common_plat/validation/api/buffer/Makefile.am  |  9 ++---
 .../validation/api/classification/Makefile.am   | 20 +---
 test/common_plat/validation/api/cpumask/Makefile.am | 10 ++
 test/common_plat/validation/api/crypto/Makefile.am  | 16 
 test/common_plat/validation/api/errno/Makefile.am   |  9 ++---
 test/common_plat/validation/api/hash/Makefile.am|  9 ++---
 test/common_plat/validation/api/init/Makefile.am| 16 ++--
 test/common_plat/validation/api/lock/Makefile.am|  9 ++---
 test/common_plat/validation/api/packet/Makefile.am  |  9 ++---
 test/common_plat/validation/api/pktio/Makefile.am   |  9 ++---
 test/common_plat/validation/api/pool/Makefile.am|  9 ++---
 test/common_plat/validation/api/queue/Makefile.am   |  9 ++---
 test/common_plat/validation/api/random/Makefile.am  |  9 ++---
 .../validation/api/scheduler/Makefile.am|  9 ++---
 test/common_plat/validation/api/shmem/Makefile.am   |  9 ++---
 .../common_plat/validation/api/std_clib/Makefile.am |  9 ++---
 test/common_plat/validation/api/system/Makefile.am  |  9 ++---
 test/common_plat/validation/api/thread/Makefile.am  | 12 +++-
 test/common_plat/validation/api/time/Makefile.am|  8 ++--
 test/common_plat/validation/api/timer/Makefile.am   |  9 ++---
 .../validation/api/traffic_mngr/Makefile.am |  8 ++--
 test/linux-generic/mmap_vlan_ins/Makefile.am|  2 +-
 test/linux-generic/pktio_ipc/Makefile.am|  8 ++--
 test/linux-generic/ring/Makefile.am | 20 
 test/linux-generic/validation/api/shmem/Makefile.am | 13 -
 test/linux-generic/validation/api/shmem/shmem.h | 21 -
 31 files changed, 92 insertions(+), 235 deletions(-)
 delete mode 100644 test/linux-generic/validation/api/shmem/shmem.h

diff --git a/test/common_plat/common/Makefile.am 
b/test/common_plat/common/Makefile.am
index 9fd08ee8..5736214a 100644
--- a/test/common_plat/common/Makefile.am
+++ b/test/common_plat/common/Makefile.am
@@ -2,12 +2,10 @@ include $(top_srcdir)/test/Makefile.inc
 
 noinst_LTLIBRARIES = libcunit_common.la libcpumask_common.la 
libthrmask_common.la
 
-libcunit_common_la_SOURCES = odp_cunit_common.c
+libcunit_common_la_SOURCES = odp_cunit_common.c odp_cunit_common.h
 libcunit_common_la_LIBADD = $(CUNIT_LIBS)
 
-libcpumask_common_la_SOURCES = mask_common.c
+libcpumask_common_la_SOURCES = mask_common.c mask_common.h
 
-libthrmask_common_la_SOURCES = mask_common.c
+libthrmask_common_la_SOURCES = mask_common.c mask_common.h
 libthrmask_common_la_CFLAGS = $(AM_CFLAGS) -DTEST_THRMASK
-
-EXTRA_DIST = mask_common.h odp_cunit_common.h
diff --git a/test/common_plat/miscellaneous/Makefile.am 
b/test/common_plat/miscellaneous/Makefile.am
index 7d8cf353..48240efe 100644
--- a/test/common_plat/miscellaneous/Makefile.am
+++ b/test/common_plat/miscellaneous/Makefile.am
@@ -9,4 +9,4 @@ odp_api_from_cpp_CXXFLAGS = $(AM_CXXFLAGS)
 
 odp_api_from_cpp_LDFLAGS = $(AM_LDFLAGS) -static
 
-dist_odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
+odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
diff --git a/test/common_plat/performance/Makefile.am 
b/test/common_plat/performance/Makefile.am
index 3299f03f..c67de749 100644
--- a/test/common_plat/performance/Makefile.am
+++ b/test/common_plat/performance/Makefile.am
@@ -40,16 +40,15 @@ odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
 odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
 
 noinst_HEADERS = \
- $(top_srcdir)/test/test_debug.h \
- dummy_crc.h
+ $(top_srcdir)/test/test_debug.h
 
-dist_odp_bench_packet_SOURCES = odp_bench_packet.c
-dist_odp_crypto_SOURCES = odp_crypto.c
-dist_odp_pktio_ordered_SOURCES = odp_pktio_ordered.c
-dist_odp_sched_latency_SOURCES = odp_sched_latency.c
-dist_odp_scheduling_SOURCES = odp_scheduling.c
-dist_odp_pktio_perf_SOURCES = 

[lng-odp] [PATCH v1 0/1] test: fixup CUNIT_CFLAGS variable reference

2017-09-05 Thread Github ODP bot
Fix type in previous refactoring, which used CUNIT_PFLAGS instead of
CUNIT_CFLAGS.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org

github
/** Email created from pull request 164 (lumag:fix-cunit)
 ** https://github.com/Linaro/odp/pull/164
 ** Patch: https://github.com/Linaro/odp/pull/164.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 58bd82a2575919cf8cabe95c0b941afc31c4f14a
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [PATCH v1 11/11] test: misc rewrites in Makefile.am files

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 test/common_plat/miscellaneous/Makefile.am   | 2 --
 test/common_plat/performance/Makefile.am | 8 +---
 test/common_plat/validation/Makefile.am  | 2 +-
 test/linux-generic/mmap_vlan_ins/Makefile.am | 6 --
 test/linux-generic/performance/Makefile.am   | 2 +-
 5 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/test/common_plat/miscellaneous/Makefile.am 
b/test/common_plat/miscellaneous/Makefile.am
index 5f2cc53d..7d42b07e 100644
--- a/test/common_plat/miscellaneous/Makefile.am
+++ b/test/common_plat/miscellaneous/Makefile.am
@@ -5,6 +5,4 @@ bin_PROGRAMS =  odp_api_from_cpp$(EXEEXT)
 TESTS = odp_api_from_cpp$(EXEEXT)
 endif
 
-odp_api_from_cpp_CXXFLAGS = $(AM_CXXFLAGS)
-
 odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
diff --git a/test/common_plat/performance/Makefile.am 
b/test/common_plat/performance/Makefile.am
index 79e8e39a..a61addd4 100644
--- a/test/common_plat/performance/Makefile.am
+++ b/test/common_plat/performance/Makefile.am
@@ -24,13 +24,7 @@ endif
 
 bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
-odp_bench_packet_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_crypto_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_perf_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_l2fwd_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_ordered_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_sched_latency_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
+AM_CPPFLAGS += -I${top_srcdir}/test
 
 noinst_HEADERS = \
  $(top_srcdir)/test/test_debug.h
diff --git a/test/common_plat/validation/Makefile.am 
b/test/common_plat/validation/Makefile.am
index 5d525fba..32854378 100644
--- a/test/common_plat/validation/Makefile.am
+++ b/test/common_plat/validation/Makefile.am
@@ -1,3 +1,3 @@
-if cunit_support
+if test_vald
 SUBDIRS = api
 endif
diff --git a/test/linux-generic/mmap_vlan_ins/Makefile.am 
b/test/linux-generic/mmap_vlan_ins/Makefile.am
index 2f38e5c6..e42b5254 100644
--- a/test/linux-generic/mmap_vlan_ins/Makefile.am
+++ b/test/linux-generic/mmap_vlan_ins/Makefile.am
@@ -1,14 +1,16 @@
 include $(top_srcdir)/test/Makefile.inc
 TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation
 
-dist_check_SCRIPTS = vlan.pcap \
+dist_check_SCRIPTS = \
 mmap_vlan_ins.sh \
 pktio_env
 
+dist_check_DATA = vlan.pcap
+
 test_SCRIPTS = $(dist_check_SCRIPTS)
+test_DATA = $(dist_check_DATA)
 
 test_PROGRAMS = plat_mmap_vlan_ins$(EXEEXT)
-plat_mmap_vlan_ins_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
 
 # Clonned from example odp_l2fwd simple
 plat_mmap_vlan_ins_SOURCES = mmap_vlan_ins.c
diff --git a/test/linux-generic/performance/Makefile.am 
b/test/linux-generic/performance/Makefile.am
index cb72fce9..0b5da671 100644
--- a/test/linux-generic/performance/Makefile.am
+++ b/test/linux-generic/performance/Makefile.am
@@ -10,4 +10,4 @@ if test_perf_proc
 TESTS = $(TESTSCRIPTS)
 endif
 
-EXTRA_DIST = $(TESTSCRIPTS)
+dist_check_SCRIPTS = $(TESTSCRIPTS)



[lng-odp] [PATCH v1 10/11] test: build all tests with -static

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 test/Makefile.inc   | 2 +-
 test/common_plat/miscellaneous/Makefile.am  | 2 --
 test/common_plat/performance/Makefile.am| 7 ---
 test/common_plat/validation/api/Makefile.inc| 1 -
 test/linux-generic/mmap_vlan_ins/Makefile.am| 1 -
 test/linux-generic/pktio_ipc/Makefile.am| 2 --
 test/linux-generic/validation/api/shmem/Makefile.am | 2 --
 7 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/test/Makefile.inc b/test/Makefile.inc
index 8bd21432..a45fcf87 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -18,7 +18,7 @@ INCFLAGS = \
 AM_CPPFLAGS = $(INCFLAGS)
 AM_CFLAGS = $(CUNIT_CFLAGS)
 
-AM_LDFLAGS = -L$(LIB)
+AM_LDFLAGS = -L$(LIB) -static
 
 @VALGRIND_CHECK_RULES@
 valgrind_tools = memcheck
diff --git a/test/common_plat/miscellaneous/Makefile.am 
b/test/common_plat/miscellaneous/Makefile.am
index 48240efe..5f2cc53d 100644
--- a/test/common_plat/miscellaneous/Makefile.am
+++ b/test/common_plat/miscellaneous/Makefile.am
@@ -7,6 +7,4 @@ endif
 
 odp_api_from_cpp_CXXFLAGS = $(AM_CXXFLAGS)
 
-odp_api_from_cpp_LDFLAGS = $(AM_LDFLAGS) -static
-
 odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp
diff --git a/test/common_plat/performance/Makefile.am 
b/test/common_plat/performance/Makefile.am
index c67de749..79e8e39a 100644
--- a/test/common_plat/performance/Makefile.am
+++ b/test/common_plat/performance/Makefile.am
@@ -24,19 +24,12 @@ endif
 
 bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
-odp_bench_packet_LDFLAGS = $(AM_LDFLAGS) -static
 odp_bench_packet_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_crypto_LDFLAGS = $(AM_LDFLAGS) -static
 odp_crypto_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_perf_LDFLAGS = $(AM_LDFLAGS) -static
 odp_pktio_perf_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_l2fwd_LDFLAGS = $(AM_LDFLAGS) -static
 odp_l2fwd_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_pktio_ordered_LDFLAGS = $(AM_LDFLAGS) -static
 odp_pktio_ordered_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_sched_latency_LDFLAGS = $(AM_LDFLAGS) -static
 odp_sched_latency_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
-odp_scheduling_LDFLAGS = $(AM_LDFLAGS) -static
 odp_scheduling_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test
 
 noinst_HEADERS = \
diff --git a/test/common_plat/validation/api/Makefile.inc 
b/test/common_plat/validation/api/Makefile.inc
index a9448b17..3e29298d 100644
--- a/test/common_plat/validation/api/Makefile.inc
+++ b/test/common_plat/validation/api/Makefile.inc
@@ -3,7 +3,6 @@ include $(top_srcdir)/test/Makefile.inc
 COMMON_DIR = $(top_builddir)/test/common_plat/common
 
 AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common
-AM_LDFLAGS += -static
 AM_LDFLAGS += $(DPDK_PMDS)
 
 AM_CFLAGS += $(CUNIT_PFLAGS)
diff --git a/test/linux-generic/mmap_vlan_ins/Makefile.am 
b/test/linux-generic/mmap_vlan_ins/Makefile.am
index 5fb6afd9..2f38e5c6 100644
--- a/test/linux-generic/mmap_vlan_ins/Makefile.am
+++ b/test/linux-generic/mmap_vlan_ins/Makefile.am
@@ -8,7 +8,6 @@ dist_check_SCRIPTS = vlan.pcap \
 test_SCRIPTS = $(dist_check_SCRIPTS)
 
 test_PROGRAMS = plat_mmap_vlan_ins$(EXEEXT)
-plat_mmap_vlan_ins_LDFLAGS = $(AM_LDFLAGS) -static
 plat_mmap_vlan_ins_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
 
 # Clonned from example odp_l2fwd simple
diff --git a/test/linux-generic/pktio_ipc/Makefile.am 
b/test/linux-generic/pktio_ipc/Makefile.am
index ad5de50b..eaa8bdd6 100644
--- a/test/linux-generic/pktio_ipc/Makefile.am
+++ b/test/linux-generic/pktio_ipc/Makefile.am
@@ -5,9 +5,7 @@ test_PROGRAMS = pktio_ipc1\
pktio_ipc2
 
 pktio_ipc1_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
-pktio_ipc1_LDFLAGS = $(AM_LDFLAGS) -static
 pktio_ipc2_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
-pktio_ipc2_LDFLAGS = $(AM_LDFLAGS) -static
 
 pktio_ipc1_SOURCES = pktio_ipc1.c ipc_common.c ipc_common.h
 pktio_ipc2_SOURCES = pktio_ipc2.c ipc_common.c ipc_common.h
diff --git a/test/linux-generic/validation/api/shmem/Makefile.am 
b/test/linux-generic/validation/api/shmem/Makefile.am
index 6ff77b00..962450e5 100644
--- a/test/linux-generic/validation/api/shmem/Makefile.am
+++ b/test/linux-generic/validation/api/shmem/Makefile.am
@@ -13,12 +13,10 @@ shmem_odp1_SOURCES = shmem_odp1.c shmem_odp1.h 
shmem_common.h
 shmem_odp1_CFLAGS = $(AM_CFLAGS) \
   $(INCCUNIT_COMMON) \
   $(INCODP)
-shmem_odp1_LDFLAGS = $(AM_LDFLAGS)
 shmem_odp1_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
 
 shmem_odp2_SOURCES = shmem_odp2.c shmem_odp2.h shmem_common.h
 shmem_odp2_CFLAGS = $(AM_CFLAGS) \
  

[lng-odp] [PATCH v1 6/11] build: use AM_CPPFLAGS to set include paths, rather than AM_CFLAGS

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 helper/Makefile.am | 14 +++---
 helper/test/Makefile.am|  2 +-
 platform/linux-generic/Makefile.am | 12 ++--
 test/Makefile.inc  |  3 +--
 4 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/helper/Makefile.am b/helper/Makefile.am
index ca512ff1..fa503f1a 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -2,13 +2,13 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
 
 LIB   = $(top_builddir)/lib
-AM_CFLAGS += -I$(srcdir)/include
-AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
-AM_CFLAGS += -I$(top_srcdir)/include
-AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
-AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include
-AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
-AM_CFLAGS += -I$(top_builddir)/include
+AM_CPPFLAGS += -I$(srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
+AM_CPPFLAGS += -I$(top_builddir)/platform/@with_platform@/include
+AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
+AM_CPPFLAGS += -I$(top_builddir)/include
 
 AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index 00997f10..fdc15f96 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -17,7 +17,7 @@ INCFLAGS = \
 
 ODP_PLATFORM=${with_platform}
 
-AM_CFLAGS += $(INCFLAGS)
+AM_CPPFLAGS += $(INCFLAGS)
 AM_LDFLAGS += -static
 
 EXECUTABLES = chksum$(EXEEXT) \
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index eada421c..e644505e 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -3,12 +3,12 @@
 
 include $(top_srcdir)/platform/Makefile.inc
 
-AM_CFLAGS +=  -I$(srcdir)/include
-AM_CFLAGS +=  -I$(top_srcdir)/include
-AM_CFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
-AM_CFLAGS +=  -I$(top_builddir)/include
-AM_CFLAGS +=  -Iinclude
-AM_CFLAGS +=  -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
+AM_CPPFLAGS +=  -I$(srcdir)/include
+AM_CPPFLAGS +=  -I$(top_srcdir)/include
+AM_CPPFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
+AM_CPPFLAGS +=  -I$(top_builddir)/include
+AM_CPPFLAGS +=  -Iinclude
+AM_CPPFLAGS +=  -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
 
 AM_CPPFLAGS +=  $(OPENSSL_CPPFLAGS)
 AM_CPPFLAGS +=  $(DPDK_CPPFLAGS)
diff --git a/test/Makefile.inc b/test/Makefile.inc
index d701ebd7..f5bb7674 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -15,9 +15,8 @@ INCFLAGS = \
-I$(top_srcdir)/test \
-I$(top_builddir)/include
 
-AM_CFLAGS += $(INCFLAGS)
+AM_CPPFLAGS = $(INCFLAGS)
 AM_CFLAGS += $(CUNIT_CFLAGS)
-AM_CXXFLAGS = $(INCFLAGS)
 
 AM_LDFLAGS += -L$(LIB)
 



[lng-odp] [PATCH v1 7/11] configure: stop setting AM_* variables

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

AM_* variables by design should be set by Makefile.am, not by
configure.ac. Use CFLAGS/CXXFLAGS instead.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 configure.ac   | 12 +++-
 example/Makefile.inc   |  4 ++--
 helper/Makefile.am |  4 ++--
 helper/test/Makefile.am|  4 ++--
 platform/Makefile.inc  |  4 ++--
 platform/linux-generic/Makefile.am |  2 +-
 test/Makefile.inc  |  4 ++--
 test/linux-generic/Makefile.inc|  4 ++--
 8 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/configure.ac b/configure.ac
index f6f69942..d4c07a2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -329,6 +329,7 @@ ODP_CHECK_CFLAG([-Wformat-truncation=0])
 ODP_CHECK_CFLAG([-Wformat-overflow=0])
 
 ODP_CFLAGS="$ODP_CFLAGS -std=c99"
+ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11"
 
 # Extra flags for example to suppress certain warning types
 ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
@@ -347,8 +348,8 @@ esac
 ##
 # Default include setup
 ##
-AM_CFLAGS="$AM_CFLAGS $ODP_CFLAGS"
-AM_CXXFLAGS="-std=c++11"
+CFLAGS="$CFLAGS $ODP_CFLAGS"
+CXXFLAGS="$CXXFLAGS $ODP_CXXFLAGS"
 
 AC_CONFIG_FILES([Makefile
 pkgconfig/libodp-linux.pc
@@ -359,11 +360,8 @@ AC_CONFIG_FILES([Makefile
 # distribute the changed variables among the Makefiles
 
 AC_SUBST([LIBS])
-AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([CPPFLAGS])
-AC_SUBST([AM_CFLAGS])
 AC_SUBST([CFLAGS])
-AC_SUBST([AM_LDFLAGS])
 AC_SUBST([LDFLAGS])
 AC_SUBST([EXEEXT])
 
@@ -390,12 +388,8 @@ AC_MSG_RESULT([
cc: ${CC}
cc version: ${CC_VERSION}
cppflags:   ${CPPFLAGS}
-   am_cppflags:${AM_CPPFLAGS}
-   am_cxxflags:${AM_CXXFLAGS}
cflags: ${CFLAGS}
-   am_cflags:  ${AM_CFLAGS}
ldflags:${LDFLAGS}
-   am_ldflags: ${AM_LDFLAGS}
libs:   ${LIBS}
defs:   ${DEFS}
static libraries:   ${enable_static}
diff --git a/example/Makefile.inc b/example/Makefile.inc
index 7cc21154..cba385b7 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -1,6 +1,6 @@
 LIB   = $(top_builddir)/lib
 LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS)
-AM_CFLAGS += \
+AM_CFLAGS = \
-I$(srcdir) \
-I$(top_srcdir)/example \
-I$(top_srcdir)/platform/@with_platform@/include \
@@ -11,4 +11,4 @@ AM_CFLAGS += \
-I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
-I$(top_builddir)/include
 
-AM_LDFLAGS += -L$(LIB)
+AM_LDFLAGS = -L$(LIB)
diff --git a/helper/Makefile.am b/helper/Makefile.am
index fa503f1a..bf75b467 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -2,7 +2,7 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
 
 LIB   = $(top_builddir)/lib
-AM_CPPFLAGS += -I$(srcdir)/include
+AM_CPPFLAGS = -I$(srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CPPFLAGS += -I$(top_srcdir)/include
 AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
@@ -10,7 +10,7 @@ AM_CPPFLAGS += 
-I$(top_builddir)/platform/@with_platform@/include
 AM_CPPFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
 AM_CPPFLAGS += -I$(top_builddir)/include
 
-AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
+AM_LDFLAGS = -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index fdc15f96..e30a1e71 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -17,8 +17,8 @@ INCFLAGS = \
 
 ODP_PLATFORM=${with_platform}
 
-AM_CPPFLAGS += $(INCFLAGS)
-AM_LDFLAGS += -static
+AM_CPPFLAGS = $(INCFLAGS)
+AM_LDFLAGS = -static
 
 EXECUTABLES = chksum$(EXEEXT) \
   cuckootable$(EXEEXT) \
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index a88e8384..f6722560 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -8,9 +8,9 @@ pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp-linux.pc
 VPATH = $(srcdir) $(builddir)
 lib_LTLIBRARIES = $(LIB)/libodp-linux.la
 
-AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
+AM_LDFLAGS = -version-number '$(ODP_LIBSO_VERSION)'
 
-AM_CFLAGS += "-DGIT_HASH=$(VERSION)"
+AM_CFLAGS = "-DGIT_HASH=$(VERSION)"
 AM_CFLAGS += 

[lng-odp] [PATCH v1 9/11] helper: test: rework build system

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

- Stop using extra libraries just to create a test executable
- Stop using EXTRA_DIST to distribute headers, include them into
  _SOURCES
- Stop using unnecessary dist_ prefixes, sources are distributed
  automatically

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 helper/test/Makefile.am | 16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index e30a1e71..983e2c68 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -44,15 +44,13 @@ if test_helper
 TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
 endif
 
-dist_bin_SCRIPTS =
-
 test_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
-EXTRA_DIST = odpthreads_as_processes odpthreads_as_pthreads
+dist_check_SCRIPTS = odpthreads_as_processes odpthreads_as_pthreads
 
-dist_chksum_SOURCES = chksum.c
-dist_cuckootable_SOURCES = cuckootable.c
-dist_odpthreads_SOURCES = odpthreads.c
-dist_parse_SOURCES = parse.c
-dist_table_SOURCES = table.c
-dist_iplookuptable_SOURCES = iplookuptable.c
+chksum_SOURCES = chksum.c
+cuckootable_SOURCES = cuckootable.c
+odpthreads_SOURCES = odpthreads.c
+parse_SOURCES = parse.c
+table_SOURCES = table.c
+iplookuptable_SOURCES = iplookuptable.c



[lng-odp] [PATCH v1 5/11] build: drop platorm/linux-generic/Makefile.inc

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Mandate that platform provides
platform/$(with_platform)/arch/$(ARCH_DIR) directory and reference it
directly from all Makefile.am/.inc files. Main reason for this change is
to allow automake to process all includes at the time of Makefile.am ->
Makefile.in conversion. Currently it can not determine path for
platform/@with_platform@/Makefile.inc, thus inclusion is left for main
make invocation.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 example/Makefile.inc| 2 +-
 helper/Makefile.am  | 3 +--
 helper/test/Makefile.am | 3 +--
 platform/linux-generic/Makefile.am  | 5 ++---
 platform/linux-generic/Makefile.inc | 2 --
 test/Makefile.inc   | 2 +-
 6 files changed, 6 insertions(+), 11 deletions(-)
 delete mode 100644 platform/linux-generic/Makefile.inc

diff --git a/example/Makefile.inc b/example/Makefile.inc
index c6d7ff5f..7cc21154 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -1,4 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
 LIB   = $(top_builddir)/lib
 LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS)
 AM_CFLAGS += \
@@ -9,6 +8,7 @@ AM_CFLAGS += \
-I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/helper/include \
-I$(top_builddir)/platform/@with_platform@/include \
+   -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
-I$(top_builddir)/include
 
 AM_LDFLAGS += -L$(LIB)
diff --git a/helper/Makefile.am b/helper/Makefile.am
index c69fd678..ca512ff1 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
 
@@ -9,6 +7,7 @@ AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_srcdir)/include
 AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include
+AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@
 AM_CFLAGS += -I$(top_builddir)/include
 
 AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index beef9191..00997f10 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
-
 LIB   = $(top_builddir)/lib
 
 #in the following line, the libs using the symbols should come before
@@ -13,6 +11,7 @@ INCFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/platform/@with_platform@/include \
+   -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
-I$(top_builddir)/include \
-I$(top_srcdir)/helper
 
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index 8f0618f4..eada421c 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -2,13 +2,13 @@
 #export CUSTOM_STR=https://git.linaro.org/lng/odp.git
 
 include $(top_srcdir)/platform/Makefile.inc
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
 
 AM_CFLAGS +=  -I$(srcdir)/include
 AM_CFLAGS +=  -I$(top_srcdir)/include
 AM_CFLAGS +=  -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
 AM_CFLAGS +=  -I$(top_builddir)/include
 AM_CFLAGS +=  -Iinclude
+AM_CFLAGS +=  -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
 
 AM_CPPFLAGS +=  $(OPENSSL_CPPFLAGS)
 AM_CPPFLAGS +=  $(DPDK_CPPFLAGS)
@@ -170,8 +170,7 @@ noinst_HEADERS = \
  ${srcdir}/include/protocols/ip.h \
  ${srcdir}/include/protocols/ipsec.h \
  ${srcdir}/include/protocols/tcp.h \
- ${srcdir}/include/protocols/udp.h \
- ${srcdir}/Makefile.inc
+ ${srcdir}/include/protocols/udp.h
 
 __LIB__libodp_linux_la_SOURCES = \
   _fdserver.c \
diff --git a/platform/linux-generic/Makefile.inc 
b/platform/linux-generic/Makefile.inc
deleted file mode 100644
index 876519be..
--- a/platform/linux-generic/Makefile.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-AM_CFLAGS   += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
-AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
diff --git a/test/Makefile.inc b/test/Makefile.inc
index 728868df..d701ebd7 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -1,4 +1,3 @@
-include $(top_srcdir)/platform/@with_platform@/Makefile.inc
 LIB   = $(top_builddir)/lib
 
 #in the 

[lng-odp] [PATCH v1 2/11] configure: use ODP_CHECK_FLAG to check for -mcx16

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 configure.ac | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index df0a0f61..f6f69942 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,16 +339,7 @@ ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
 case "${host}" in
   i?86? | x86*)
   if test "${CC}" != "gcc" -o ${CC_VERSION_MAJOR} -ge 5; then
- my_save_cflags="$CFLAGS"
-
- CFLAGS=-mcx16
- AC_MSG_CHECKING([whether CC supports -mcx16])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
-   [AC_MSG_RESULT([yes])]
-   [ODP_CFLAGS="$ODP_CFLAGS $CFLAGS"],
-   [AC_MSG_RESULT([no])]
-   )
- CFLAGS="$my_save_cflags"
+ ODP_CHECK_CFLAG([-mcx16])
   fi
   ;;
 esac



[lng-odp] [PATCH v1 3/11] linux-gen: crypto: stop using RAND_pseudo_bytes()

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

RAND_pseudo_bytes() was deprecated in OpenSSL 1.1.0. It is recommended
to use RAND_bytes() instead.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 platform/linux-generic/odp_crypto.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index 563e919e..c7da548a 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -1048,9 +1048,6 @@ int32_t odp_random_data(uint8_t *buf, uint32_t len, 
odp_random_kind_t kind)
 
switch (kind) {
case ODP_RANDOM_BASIC:
-   RAND_pseudo_bytes(buf, len);
-   return len;
-
case ODP_RANDOM_CRYPTO:
rc = RAND_bytes(buf, len);
return (1 == rc) ? (int)len /*success*/: -1 /*failure*/;



[lng-odp] [PATCH v1 4/11] build: drop -Wno-deprecated-declaration

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

We do not use deprecated attribute anymore, thus let's drop the
-Wno-deprecated-declaration flag from compiler options.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
 platform/Makefile.inc   | 3 ---
 test/common_plat/validation/api/Makefile.am | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 738f0f9a..a88e8384 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -13,9 +13,6 @@ AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
 AM_CFLAGS += "-DGIT_HASH=$(VERSION)"
 AM_CFLAGS += $(VISIBILITY_CFLAGS)
 
-#The implementation will need to retain the deprecated implementation
-AM_CFLAGS += -Wno-deprecated-declarations
-
 AM_CFLAGS += @PTHREAD_CFLAGS@
 
 odpapispecincludedir= $(includedir)/odp/api/spec
diff --git a/test/common_plat/validation/api/Makefile.am 
b/test/common_plat/validation/api/Makefile.am
index e2d30a67..601bae6d 100644
--- a/test/common_plat/validation/api/Makefile.am
+++ b/test/common_plat/validation/api/Makefile.am
@@ -23,6 +23,3 @@ ODP_MODULES = atomic \
  system
 
 SUBDIRS = $(ODP_MODULES)
-
-#The tests will need to retain the deprecated test implementation
-AM_CFLAGS += -Wno-deprecated-declarations



[lng-odp] [PATCH v1 0/11] More build system improvements

2017-09-05 Thread Github ODP bot


github
/** Email created from pull request 165 (lumag:improve-build-3)
 ** https://github.com/Linaro/odp/pull/165
 ** Patch: https://github.com/Linaro/odp/pull/165.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: c9bd3cdd91bd495988653511548fd4525579db79
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 17 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 9 lines checked


to_send-p-002.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 12 lines checked


to_send-p-003.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 69 lines checked


to_send-p-004.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 56 lines checked


to_send-p-005.patch has no obvious style problems and is ready for submission.
WARNING: Do not use whitespace before Cc:
#64: FILE: configure.ac:388:
cc: ${CC}

WARNING: Use a single space after Cc:
#64: FILE: configure.ac:388:
cc: ${CC}

ERROR: Unrecognized email address: '${CC}'
#64: FILE: configure.ac:388:
cc: ${CC}

total: 1 errors, 2 warnings, 0 checks, 119 lines checked


to_send-p-006.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 429 lines checked


to_send-p-007.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 22 lines checked


to_send-p-008.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 68 lines checked


to_send-p-009.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 47 lines checked


to_send-p-010.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


Re: [lng-odp] Fwd: Cunit configuration error

2017-09-05 Thread Dmitry Eremin-Solenikov
On 05/09/17 19:31, Maxim Uvarov wrote:
> I got this error from latest api-next in github.
> Anything I am missing? I have installed libcunit1-dev
> 
> checking for asciidoctor... asciidoctor
> checking for mscgen... no
> configure: WARNING: mscgen not found - continuing without sequence
> message support
> checking for CUNIT... no
> configure: error: Package requirements (cunit) were not met:
> 
> Package 'cunit' has no Version: field
> 
> Consider adjusting the PKG_CONFIG_PATH environment variable if you
> installed software in a non-standard prefix.

Please see https://github.com/Linaro/odp/pull/162 .

CUnit before 2.1-3 contained invalid cunit.pc file.

Try calling /configure CUNIT_CFLAGS="-I/usr/include"
CUNIT_LIBS="-lcunit" .



-- 
With best wishes
Dmitry


[lng-odp] Fwd: Cunit configuration error

2017-09-05 Thread Maxim Uvarov



 Forwarded Message 
Subject: Cunit configuration error
Date: Tue, 5 Sep 2017 09:11:32 -0700
From: Bala Manoharan 
To: Maxim Uvarov 

Hi,

I got this error from latest api-next in github.
Anything I am missing? I have installed libcunit1-dev

checking for asciidoctor... asciidoctor
checking for mscgen... no
configure: WARNING: mscgen not found - continuing without sequence
message support
checking for CUNIT... no
configure: error: Package requirements (cunit) were not met:

Package 'cunit' has no Version: field

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.


Regards,
Bala


[lng-odp] [PATCH v1 1/1] DEPENDENCIES: document changes in CUnit localization

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 162 (lumag:fix-deps)
 ** https://github.com/Linaro/odp/pull/162
 ** Patch: https://github.com/Linaro/odp/pull/162.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 14eaeea369772a8d69c46395d2011a7c66ebf0a0
 **/
 DEPENDENCIES | 32 
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/DEPENDENCIES b/DEPENDENCIES
index a194cad1..71c629ba 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -9,12 +9,13 @@ Prerequisites for building the OpenDataPlane (ODP) API
automake
autoconf
libtool
+   pkg-config
 
On Debian/Ubuntu systems:
-   $ sudo apt-get install automake autoconf libtool
+   $ sudo apt-get install automake autoconf libtool pkg-config
 
On CentOS/RedHat/Fedora systems:
-   $ sudo yum install automake autoconf libtool
+   $ sudo yum install automake autoconf libtool pkgconfig
 
 3. Required libraries
 
@@ -199,11 +200,11 @@ Prerequisites for building the OpenDataPlane (ODP) API
 
 4.0 Packages needed to build API tests
 
-   Cunit test framework version 2.1-3 is required
-   Cunit prvodes a framework to run the API test suite that proves conformance 
to the
+   CUnit test framework version 2.1-3 is required
+   CUnit prvodes a framework to run the API test suite that proves conformance 
to the
ODP API. The home page http://cunit.sourceforge.net/doc/introduction.html
 
-4.1 Native Cunit install
+4.1 Native CUnit install
 
# Debian/Ubuntu
$ apt-get install libcunit1-dev
@@ -232,20 +233,27 @@ Prerequisites for building the OpenDataPlane (ODP) API
# reboot, before trying to run e.g. 'make distcheck'.
sudo ldconfig
 
-4.3 Cross compile of Cunit
+4.3 Cross compile of CUnit
 
$ git svn clone http://svn.code.sf.net/p/cunit/code/trunk cunit-code
$ cd cunit-code
$ ./bootstrap
$ ./configure --host=arm-linux-gnueabihf 
--prefix=/home/${USER}/src/install-cunit
 
-4.4 Using Cunit with ODP
-   $ Add the configuration option to the regular configuration options
-   # Use the default path ...
-   ./configure  --enable-cunit
+4.4 Using CUnit with ODP
 
-   # ... OR the user defined path.
-   ./configure  --with-cunit-path=/home/
+   Configure will automatically look for CUnit if validation testsuite is
+   enabled. By default it uses pkg-config to locate CUnit. Usually no
+   additional configuration will be required. Few corner cases:
+
+   # Systemwide CUnit if configure errors out with 'missing Version' message
+   ./configure CUNIT_CFLAGS="-I/usr/include" CUNIT_LIBS="-lcunit"
+
+   # User directory installation
+   ./configure PKG_CONFIG_PATH=/home//lib/pkgconfig
+
+   # ... OR directly specifying flags
+   ./configure CUNIT_CFLAGS="-I/home//include" 
CUNIT_LIBS="/home//lib -lcunit"
 
 5.0 Documentation Images & Doxygen
 



[lng-odp] [PATCH v1 0/1] DEPENDENCIES: document changes in CUnit localization

2017-09-05 Thread Github ODP bot
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org

github
/** Email created from pull request 162 (lumag:fix-deps)
 ** https://github.com/Linaro/odp/pull/162
 ** Patch: https://github.com/Linaro/odp/pull/162.patch
 ** Base sha: 42184679185ce0c979e065349360167e3fce6ca0
 ** Merge commit sha: 14eaeea369772a8d69c46395d2011a7c66ebf0a0
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 63 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


Re: [lng-odp] Compiler Barrier API

2017-09-05 Thread Brian Brooks
I don't see a compiler barrier in the odp.git repo. Perhaps 'nop', but
this acts as more than a pure compiler barrier?


On Tue, Sep 5, 2017 at 8:23 AM, Andriy Berestovskyy
 wrote:
> Hey Petri,
>
> On 05.09.2017 14:17, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>>
>> I think compiler barrier is too weak for writing portable code, since it
>> does not guarantee that the CPU would not re-order the instructions.
>
>
>
> No, compiler barrier does not guarantee CPU order. Though, sometimes we do
> not need such a guarantee.
>
> Compiler barriers are in the same league with volatiles and provide the same
> weak guarantees: eventually the effect will be observed and code will not be
> optimized out by the compiler.
>
>
>
>> ODP implementation has ":::memory" in context of inline assembly
>> instructions, but that's when we are writing code against specific ISA and
>> thus know which amount of synchronization is needed.
>
>
>
> The barrier is quite rare, so it might remain in form of asm volatile...
>
>
> Andriy


[lng-odp] [PATCH API-NEXT v2 2/2] linux-generic: api schedule unlock lock

2017-09-05 Thread Github ODP bot
From: Balasubramanian Manoharan 

Signed-off-by: Balasubramanian Manoharan 
---
/** Email created from pull request 160 (bala-manoharan:api_sched_order_lock)
 ** https://github.com/Linaro/odp/pull/160
 ** Patch: https://github.com/Linaro/odp/pull/160.patch
 ** Base sha: 4eae04e80a634c17ac276bb06bce468cbe28cde0
 ** Merge commit sha: 0fdc4843f1c46de41bffe74270ffe252bdce1521
 **/
 platform/linux-generic/include/odp_schedule_if.h   |  1 +
 .../include/odp_schedule_scalable_ordered.h|  1 +
 platform/linux-generic/odp_schedule.c  | 25 +-
 platform/linux-generic/odp_schedule_if.c   |  5 +
 platform/linux-generic/odp_schedule_iquery.c   | 24 -
 platform/linux-generic/odp_schedule_scalable.c | 19 
 platform/linux-generic/odp_schedule_sp.c   |  8 ++-
 7 files changed, 80 insertions(+), 3 deletions(-)

diff --git a/platform/linux-generic/include/odp_schedule_if.h 
b/platform/linux-generic/include/odp_schedule_if.h
index 657993b1..b0db67ab 100644
--- a/platform/linux-generic/include/odp_schedule_if.h
+++ b/platform/linux-generic/include/odp_schedule_if.h
@@ -95,6 +95,7 @@ typedef struct {
   odp_schedule_group_info_t *);
void (*schedule_order_lock)(unsigned);
void (*schedule_order_unlock)(unsigned);
+   void (*schedule_order_unlock_lock)(unsigned);
 
 } schedule_api_t;
 
diff --git a/platform/linux-generic/include/odp_schedule_scalable_ordered.h 
b/platform/linux-generic/include/odp_schedule_scalable_ordered.h
index 1c365a2b..cdc2ab49 100644
--- a/platform/linux-generic/include/odp_schedule_scalable_ordered.h
+++ b/platform/linux-generic/include/odp_schedule_scalable_ordered.h
@@ -79,6 +79,7 @@ typedef struct reorder_window {
uint32_t tail;
uint32_t turn;
uint32_t olock[CONFIG_QUEUE_MAX_ORD_LOCKS];
+   uint32_t lock_acquired;
uint16_t lock_count;
/* Reorder contexts in this window */
reorder_context_t *ring[RWIN_SIZE];
diff --git a/platform/linux-generic/odp_schedule.c 
b/platform/linux-generic/odp_schedule.c
index 5b940762..35f69bd7 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -214,6 +214,8 @@ typedef struct {
/* Array of ordered locks */
odp_atomic_u64_t  lock[CONFIG_QUEUE_MAX_ORD_LOCKS];
 
+   odp_atomic_u64_t lock_acquired;
+
 } order_context_t ODP_ALIGNED_CACHE;
 
 typedef struct {
@@ -1103,6 +1105,7 @@ static void order_unlock(void)
 static void schedule_order_lock(unsigned lock_index)
 {
odp_atomic_u64_t *ord_lock;
+   odp_atomic_u64_t *lock_acquired;
uint32_t queue_index;
 
queue_index = sched_local.ordered.src_queue;
@@ -1112,6 +1115,7 @@ static void schedule_order_lock(unsigned lock_index)
   !sched_local.ordered.lock_called.u8[lock_index]);
 
ord_lock = >order[queue_index].lock[lock_index];
+   lock_acquired = >order[queue_index].lock_acquired;
 
/* Busy loop to synchronize ordered processing */
while (1) {
@@ -1121,6 +1125,7 @@ static void schedule_order_lock(unsigned lock_index)
 
if (lock_seq == sched_local.ordered.ctx) {
sched_local.ordered.lock_called.u8[lock_index] = 1;
+   odp_atomic_store_rel_u64(lock_acquired, lock_index);
return;
}
odp_cpu_pause();
@@ -1130,6 +1135,7 @@ static void schedule_order_lock(unsigned lock_index)
 static void schedule_order_unlock(unsigned lock_index)
 {
odp_atomic_u64_t *ord_lock;
+   odp_atomic_u64_t *lock_acquired;
uint32_t queue_index;
 
queue_index = sched_local.ordered.src_queue;
@@ -1138,12 +1144,28 @@ static void schedule_order_unlock(unsigned lock_index)
   lock_index <= sched->queue[queue_index].order_lock_count);
 
ord_lock = >order[queue_index].lock[lock_index];
+   lock_acquired = >order[queue_index].lock_acquired;
 
ODP_ASSERT(sched_local.ordered.ctx == odp_atomic_load_u64(ord_lock));
 
+   odp_atomic_store_rel_u64(lock_acquired,
+sched->queue[queue_index].
+order_lock_count + 1);
odp_atomic_store_rel_u64(ord_lock, sched_local.ordered.ctx + 1);
 }
 
+static void schedule_order_unlock_lock(unsigned lock_index)
+{
+   odp_atomic_u64_t *lock_acquired;
+   uint32_t queue_index;
+
+   queue_index = sched_local.ordered.src_queue;
+
+   lock_acquired = >order[queue_index].lock_acquired;
+   schedule_order_unlock(odp_atomic_load_u64(lock_acquired));
+   schedule_order_lock(lock_index);
+}
+
 static void schedule_pause(void)
 {
sched_local.pause = 1;
@@ -1429,5 +1451,6 @@ const schedule_api_t schedule_default_api = {
.schedule_group_thrmask   = schedule_group_thrmask,
 

[lng-odp] [PATCH API-NEXT v2 1/2] api: schedule: add schedule order unlock lock api

2017-09-05 Thread Github ODP bot
From: Balasubramanian Manoharan 

Adds odp_schedule_order_unlock_lock() api. This API combines schedule order
unlock and lock into a single api for performance optimization in HW.

Signed-off-by: Balasubramanian Manoharan 
---
/** Email created from pull request 160 (bala-manoharan:api_sched_order_lock)
 ** https://github.com/Linaro/odp/pull/160
 ** Patch: https://github.com/Linaro/odp/pull/160.patch
 ** Base sha: 4eae04e80a634c17ac276bb06bce468cbe28cde0
 ** Merge commit sha: 0fdc4843f1c46de41bffe74270ffe252bdce1521
 **/
 include/odp/api/spec/schedule.h | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h
index 8244746d..0997315e 100644
--- a/include/odp/api/spec/schedule.h
+++ b/include/odp/api/spec/schedule.h
@@ -368,6 +368,25 @@ void odp_schedule_order_lock(unsigned lock_index);
 void odp_schedule_order_unlock(unsigned lock_index);
 
 /**
+ * Release ordered context lock and acquires new lock
+ *
+ * This call is valid only when holding an ordered synchronization context.
+ * Release a previously locked ordered context lock and acquires
+ * a new ordered context lock.
+ * This call is valid only when there is a single ordered context lock active.
+ * Results are undefined if this call is made when multiple ordered context
+ * locks are acquired in nested fashion.
+ *
+ * @param lock_index   Index of the ordered lock in the current context to be
+ * acquired. Previously acquired ordered lock is released.
+ * Must be in the range 0...odp_queue_lock_count() - 1.
+ *
+ * @see odp_schedule_order_lock(), odp_schedule_order_unlock()
+ *
+ */
+void odp_schedule_order_unlock_lock(uint32_t lock_index);
+
+/**
  * @}
  */
 



[lng-odp] [PATCH API-NEXT v2 0/2] api: add schedule order unlock lock

2017-09-05 Thread Github ODP bot
Adds odp_schedule_order_unlock_lock() api.
This API combines schedule order unlock and lock into a single api for HW 
performance optimisation.

github
/** Email created from pull request 160 (bala-manoharan:api_sched_order_lock)
 ** https://github.com/Linaro/odp/pull/160
 ** Patch: https://github.com/Linaro/odp/pull/160.patch
 ** Base sha: 4eae04e80a634c17ac276bb06bce468cbe28cde0
 ** Merge commit sha: 0fdc4843f1c46de41bffe74270ffe252bdce1521
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 25 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 221 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [PATCH API-NEXT v1 1/1] linux-gen: Scheduled pktin polling for ssched

2017-09-05 Thread Github ODP bot
From: Ola Liljedahl 

Pktin polling is handled by the scalable scheduler the same way as queues.

Non-empty pktin queues stay on the schedq of their designated priority
level. Empty pktin queues are pushed to a lower-than-lowest priority
schedq so to be polled only when all other (highest to lowest priority)
schedq's have been processed.

Jira: ENTNET-473

Signed-off-by: Ola Liljedahl 

Change-Id: I8e095a43d0344abe45c94a856ef8424d52358fb4
---
/** Email created from pull request 161 (WonderfulVoid:api-next)
 ** https://github.com/Linaro/odp/pull/161
 ** Patch: https://github.com/Linaro/odp/pull/161.patch
 ** Base sha: 4eae04e80a634c17ac276bb06bce468cbe28cde0
 ** Merge commit sha: b3e24494913476bc1834136ffdd2ac2508a0f15d
 **/
 .../include/odp_queue_scalable_internal.h  |   2 +
 platform/linux-generic/include/odp_schedule_if.h   |  11 +-
 .../linux-generic/include/odp_schedule_scalable.h  |  25 +-
 .../include/odp_schedule_scalable_ordered.h|   2 +
 platform/linux-generic/odp_packet_io.c |  47 +-
 platform/linux-generic/odp_queue_scalable.c|  32 +-
 platform/linux-generic/odp_schedule.c  |   2 +-
 platform/linux-generic/odp_schedule_iquery.c   |   5 +-
 platform/linux-generic/odp_schedule_scalable.c | 541 +
 .../linux-generic/odp_schedule_scalable_ordered.c  |  26 +
 platform/linux-generic/odp_schedule_sp.c   |   5 +-
 11 files changed, 457 insertions(+), 241 deletions(-)

diff --git a/platform/linux-generic/include/odp_queue_scalable_internal.h 
b/platform/linux-generic/include/odp_queue_scalable_internal.h
index f15314b2..ddc65f60 100644
--- a/platform/linux-generic/include/odp_queue_scalable_internal.h
+++ b/platform/linux-generic/include/odp_queue_scalable_internal.h
@@ -58,6 +58,8 @@ union queue_entry_u {
 int _odp_queue_deq(sched_elem_t *q, odp_buffer_hdr_t *buf_hdr[], int num);
 int _odp_queue_deq_sc(sched_elem_t *q, odp_event_t *evp, int num);
 int _odp_queue_deq_mc(sched_elem_t *q, odp_event_t *evp, int num);
+int _odp_queue_enq_sp(sched_elem_t *q, odp_buffer_hdr_t *buf_hdr[], int num);
+queue_entry_t *qentry_from_ext(odp_queue_t handle);
 
 /* Round up memory size to next cache line size to
  * align all memory addresses on cache line boundary.
diff --git a/platform/linux-generic/include/odp_schedule_if.h 
b/platform/linux-generic/include/odp_schedule_if.h
index 657993b1..71538e62 100644
--- a/platform/linux-generic/include/odp_schedule_if.h
+++ b/platform/linux-generic/include/odp_schedule_if.h
@@ -14,9 +14,15 @@ extern "C" {
 #include 
 #include 
 #include 
+#include 
 
-typedef void (*schedule_pktio_start_fn_t)(int pktio_index, int num_in_queue,
- int in_queue_idx[]);
+/* Number of ordered locks per queue */
+#define SCHEDULE_ORDERED_LOCKS_PER_QUEUE 2
+
+typedef void (*schedule_pktio_start_fn_t)(int pktio_index,
+int num_in_queue,
+int in_queue_idx[],
+odp_queue_t odpq[]);
 typedef int (*schedule_thr_add_fn_t)(odp_schedule_group_t group, int thr);
 typedef int (*schedule_thr_rem_fn_t)(odp_schedule_group_t group, int thr);
 typedef int (*schedule_num_grps_fn_t)(void);
@@ -66,6 +72,7 @@ extern const schedule_fn_t *sched_fn;
 
 /* Interface for the scheduler */
 int sched_cb_pktin_poll(int pktio_index, int num_queue, int index[]);
+int sched_cb_pktin_poll_one(int pktio_index, int rx_queue, odp_event_t evts[]);
 void sched_cb_pktio_stop_finalize(int pktio_index);
 odp_queue_t sched_cb_queue_handle(uint32_t queue_index);
 void sched_cb_queue_destroy_finalize(uint32_t queue_index);
diff --git a/platform/linux-generic/include/odp_schedule_scalable.h 
b/platform/linux-generic/include/odp_schedule_scalable.h
index 8a2d70da..ac357b01 100644
--- a/platform/linux-generic/include/odp_schedule_scalable.h
+++ b/platform/linux-generic/include/odp_schedule_scalable.h
@@ -22,8 +22,12 @@
  * constants, but not ODP_SCHED_PRIO_NUM. The current API for this
  * is odp_schedule_num_prio(). The other schedulers also define
  * this internally as NUM_PRIO.
+ *
+ * One additional priority level for idle pktin queues.
+ * This is only for internal use and not visible to the user.
  */
-#define ODP_SCHED_PRIO_NUM  8
+#define ODP_SCHED_PRIO_PKTIN 8
+#define ODP_SCHED_PRIO_NUM  9
 
 typedef struct {
union {
@@ -55,14 +59,18 @@ typedef uint32_t ringidx_t;
 #define ODP_NO_SCHED_QUEUE (ODP_SCHED_SYNC_ORDERED + 1)
 
 typedef struct {
-   struct llnode node;  /* must be first */
+   struct llnode node;
sched_queue_t *schedq;
 #ifdef CONFIG_QSCHST_LOCK
odp_ticketlock_t qschlock;
 #endif
qschedstate_t qschst;
-   uint16_t pop_deficit;
-   uint16_t qschst_type;
+   uint8_t pop_deficit;
+   uint8_t qschst_type;
+   uint8_t pktio_idx;
+   uint8_t rx_queue;
+   uint16_t xoffset;
+ 

[lng-odp] [PATCH API-NEXT v1 0/1] linux-gen: Scheduled pktin polling for ssched

2017-09-05 Thread Github ODP bot
Pktin polling is handled by the scalable scheduler the same way as queues.
Non-empty pktin queues stay on the schedq of their designated priority
level. Empty pktin queues are pushed to a lower-than-lowest priority
schedq so to be polled only when all other (highest to lowest priority)
schedqs have been processed.
Signed-off-by: Ola Liljedahl ola.liljed...@arm.com
Change-Id: I8e095a43d0344abe45c94a856ef8424d52358fb4

github
/** Email created from pull request 161 (WonderfulVoid:api-next)
 ** https://github.com/Linaro/odp/pull/161
 ** Patch: https://github.com/Linaro/odp/pull/161.patch
 ** Base sha: 4eae04e80a634c17ac276bb06bce468cbe28cde0
 ** Merge commit sha: b3e24494913476bc1834136ffdd2ac2508a0f15d
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 1020 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [Linaro/odp] a7463a: helper: chksum: odph_chksum returns value in netwo...

2017-09-05 Thread GitHub
  Branch: refs/heads/api-next
  Home:   https://github.com/Linaro/odp
  Commit: a7463a692a4e2dc311c2d383595adafd01433fa4
  
https://github.com/Linaro/odp/commit/a7463a692a4e2dc311c2d383595adafd01433fa4
  Author: Dmitry Eremin-Solenikov 
  Date:   2017-08-29 (Tue, 29 Aug 2017)

  Changed paths:
M helper/include/odp/helper/chksum.h

  Log Message:
  ---
  helper: chksum: odph_chksum returns value in network byte order

All examples and usecases assumed network byte order for odph_chksum()
return value. Instead of changing this convention, rather document that
odph_chksum returns value in network byte order.
https://bugs.linaro.org/show_bug.cgi?id=2976

Signed-off-by: Dmitry Eremin-Solenikov 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 87fbe7fbf2debf8bc44bfffc3d3a2d1827208452
  
https://github.com/Linaro/odp/commit/87fbe7fbf2debf8bc44bfffc3d3a2d1827208452
  Author: Dmitry Eremin-Solenikov 
  Date:   2017-08-29 (Tue, 29 Aug 2017)

  Changed paths:
M helper/include/odp/helper/ip.h
M test/common_plat/validation/api/classification/odp_classification_common.c
M 
test/common_plat/validation/api/classification/odp_classification_test_pmr.c
M test/common_plat/validation/api/classification/odp_classification_tests.c

  Log Message:
  ---
  helper: ip: correct ipv4 header checksum calculation

Current code for IPv4 header checksum calculation assumes that packet
data is aligned on 2-byte boundary, that there are no optional headers,
etc. Rewrite checksumming code to properly copy & process headers.
https://bugs.linaro.org/show_bug.cgi?id=2976

Signed-off-by: Dmitry Eremin-Solenikov 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
  
https://github.com/Linaro/odp/commit/7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
  Author: Dmitry Eremin-Solenikov 
  Date:   2017-08-29 (Tue, 29 Aug 2017)

  Changed paths:
M helper/test/chksum.c

  Log Message:
  ---
  helper: chksum: verify odph_ipv4_chksum_x() functions

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

Signed-off-by: Dmitry Eremin-Solenikov 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 29139f725a7d6f2bd9e57a60abf1e55f4ac64c97
  
https://github.com/Linaro/odp/commit/29139f725a7d6f2bd9e57a60abf1e55f4ac64c97
  Author: Dmitry Eremin-Solenikov 
  Date:   2017-09-04 (Mon, 04 Sep 2017)

  Changed paths:
M Makefile.am
M configure.ac
M example/m4/configure.m4
M helper/m4/configure.m4
M test/common_plat/m4/miscellaneous.m4
M test/common_plat/m4/performance.m4
M test/common_plat/m4/validation.m4
M test/linux-generic/m4/performance.m4

  Log Message:
  ---
  configure: enable all tests by default

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: da905ec07e1e50b4d34975a81ea289ec96eba503
  
https://github.com/Linaro/odp/commit/da905ec07e1e50b4d34975a81ea289ec96eba503
  Author: Dmitry Eremin-Solenikov 
  Date:   2017-09-04 (Mon, 04 Sep 2017)

  Changed paths:
M configure.ac

  Log Message:
  ---
  configure: rework with-testdir check

Rework with-testdir option handling to follow the rest of configure
options.

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 6e02ad50626de86804cbd62ae467104ae7850220
  
https://github.com/Linaro/odp/commit/6e02ad50626de86804cbd62ae467104ae7850220
  Author: Dmitry Eremin-Solenikov 
  Date:   2017-09-04 (Mon, 04 Sep 2017)

  Changed paths:
M Makefile.am

  Log Message:
  ---
  configure: enable helper-linux in distcheck options

Signed-off-by: Dmitry Eremin-Solenikov 
Reviewed-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 


  Commit: 60105f079350405920462a4b0d59c7e78d9a8492
  
https://github.com/Linaro/odp/commit/60105f079350405920462a4b0d59c7e78d9a8492
  Author: Dmitry Eremin-Solenikov 
  Date:   2017-09-04 (Mon, 04 Sep 2017)

  Changed paths:
M configure.ac

  Log Message:
  ---
  configure: provide a way to enable all debugging options at once

Adding --enable-debug=full to configure will enable all 

[lng-odp] [Bug 2976] IP headers checksum functions are incorrect

2017-09-05 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2976

--- Comment #15 from Maxim Uvarov  ---
https://github.com/Linaro/odp/commit/7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
refs/heads/api-next
2017-08-29T00:25:11+03:00
Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org
helper: chksum: verify odph_ipv4_chksum_x() functions

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

Signed-off-by: Dmitry Eremin-Solenikov 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

[lng-odp] [Bug 2976] IP headers checksum functions are incorrect

2017-09-05 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=2976

--- Comment #13 from Maxim Uvarov  ---
https://github.com/Linaro/odp/commit/a7463a692a4e2dc311c2d383595adafd01433fa4
refs/heads/api-next
2017-08-29T00:25:02+03:00
Dmitry Eremin-Solenikov dmitry.ereminsoleni...@linaro.org
helper: chksum: odph_chksum returns value in network byte order

All examples and usecases assumed network byte order for odph_chksum()
return value. Instead of changing this convention, rather document that
odph_chksum returns value in network byte order.
https://bugs.linaro.org/show_bug.cgi?id=2976

Signed-off-by: Dmitry Eremin-Solenikov 
Signed-off-by: Bill Fischofer 
Signed-off-by: Maxim Uvarov 

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

Re: [lng-odp] Compiler Barrier API

2017-09-05 Thread Andriy Berestovskyy

Hey Petri,

On 05.09.2017 14:17, Savolainen, Petri (Nokia - FI/Espoo) wrote:

I think compiler barrier is too weak for writing portable code, since it does 
not guarantee that the CPU would not re-order the instructions.



No, compiler barrier does not guarantee CPU order. Though, sometimes we 
do not need such a guarantee.


Compiler barriers are in the same league with volatiles and provide the 
same weak guarantees: eventually the effect will be observed and code 
will not be optimized out by the compiler.





ODP implementation has ":::memory" in context of inline assembly instructions, 
but that's when we are writing code against specific ISA and thus know which amount of 
synchronization is needed.



The barrier is quite rare, so it might remain in form of asm volatile...


Andriy


Re: [lng-odp] Compiler Barrier API

2017-09-05 Thread Savolainen, Petri (Nokia - FI/Espoo)


> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Andriy Berestovskyy
> Sent: Tuesday, September 05, 2017 2:08 PM
> To: lng-odp@lists.linaro.org
> Subject: Re: [lng-odp] Compiler Barrier API
> 
> Hey Maxim,
> There is a use case in the ODP code itself just search for the
> volatile("" ::: "memory"). It is rare, just like all the barriers.
> 
> We also have compiler barrier in our code, so I just thought it would be
> nice to add this to the api/sync.h, i.e.:
> 
> /**
>   * Compiler barrier
>   *
>   * This is a compiler barrier. It prevents compiler to rearrange
>   * access operations before the barrier with operations after it.
>   *
>   * It also forces compiler to load variables used in loop condition
>   * each loop cycle.
>   *
>   * This call is not needed when using ODP defined synchronization
>   * mechanisms.
>   */
> void odp_compiler_barrier(void);
> 
> 
> With the following definition:
> 
> static inline void odp_compiler_barrier(void)
> {
>   __asm__ volatile("": : :"memory");
> }
> 
> It it is OK with you, I can prepare a proper patch.
> 
> Andriy
> 

I think compiler barrier is too weak for writing portable code, since it does 
not guarantee that the CPU would not re-order the instructions. Application 
should use ODP memory barriers (odp_mb_full(), odp_mb_acquire(), etc) or 
atomics with memory ordering (odp_atomic_load_acq_u64(), 
odp_atomic_store_rel_u64()).

ODP implementation has ":::memory" in context of inline assembly instructions, 
but that's when we are writing code against specific ISA and thus know which 
amount of synchronization is needed. A portable application cannot assume any 
particular ISA.

-Petri







Re: [lng-odp] Compiler Barrier API

2017-09-05 Thread Andriy Berestovskyy

Hey Maxim,
There is a use case in the ODP code itself just search for the 
volatile("" ::: "memory"). It is rare, just like all the barriers.


We also have compiler barrier in our code, so I just thought it would be 
nice to add this to the api/sync.h, i.e.:


/**
 * Compiler barrier
 *
 * This is a compiler barrier. It prevents compiler to rearrange
 * access operations before the barrier with operations after it.
 *
 * It also forces compiler to load variables used in loop condition
 * each loop cycle.
 *
 * This call is not needed when using ODP defined synchronization
 * mechanisms.
 */
void odp_compiler_barrier(void);


With the following definition:

static inline void odp_compiler_barrier(void)
{
__asm__ volatile("": : :"memory");
}

It it is OK with you, I can prepare a proper patch.

Andriy

On 04.09.2017 21:31, Maxim Uvarov wrote:

On 09/04/17 18:09, Andriy Berestovskyy wrote:

Hey guys,
There are few __asm__ volatile("" ::: "memory") in the generic ODP code,
but seems like there is no API for the compiler barrier.

Shall we add one to the api/sync.h?

Andriy


Hello Andriy,

Do you have use case for that?

In my understanding odp api is already barrier safe i.e. application
does not need additional barriers. And in abi compatibility mode we
export all functions, - it will be significant slow down.

Best regards,
Maxim.



[lng-odp] [Bug 3238] New: doxygen warnings on helper header files

2017-09-05 Thread bugzilla-daemon
https://bugs.linaro.org/show_bug.cgi?id=3238

Bug ID: 3238
   Summary: doxygen warnings on helper header files
   Product: OpenDataPlane - linux- generic reference
   Version: api-next
  Hardware: Other
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: ---
 Component: Helpers
  Assignee: lng-odp@lists.linaro.org
  Reporter: petri.savolai...@linaro.org
CC: lng-odp@lists.linaro.org
  Target Milestone: ---

On api-next (at least) "make doxygen-doc" prints out a bunch of Doxygen
warnings from helper header files:


  DXGEN  doc/application-api-guide/Doxyfile
  DXGEN  doc/helper-guide/Doxyfile
/odp/helper/include/odph_list_internal.h:21: warning: Compound odph_list_object
is not documented.
/odp/helper/include/odp/helper/ip.h:98: warning: Member
odph_ipv4_csum(odp_packet_t pkt, uint32_t offset, odph_ipv4hdr_t *ip,
odp_u16sum_t *chksum) (function) of group odph_header is not documented.
/odp/helper/include/odph_list_internal.h:72: warning: Member container_of(ptr,
type, list_node) (macro definition) of file odph_list_internal.h is not
documented.
/odp/helper/include/odph_list_internal.h:75: warning: Member
ODPH_LIST_FOR_EACH(pos, list_head, type, list_node) (macro definition) of file
odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:23: warning: Member odph_list_object
(typedef) of file odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:25: warning: Member odph_list_head
(typedef) of file odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:27: warning: Member
ODPH_INIT_LIST_HEAD(odph_list_object *list) (function) of file
odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:33: warning: Member
__odph_list_add(odph_list_object *new, odph_list_object *prev, odph_list_object
*next) (function) of file odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:43: warning: Member
odph_list_add(odph_list_object *new, odph_list_object *head) (function) of file
odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:48: warning: Member
odph_list_add_tail(struct odph_list_object *new, odph_list_object *head)
(function) of file odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:54: warning: Member
__odph_list_del(struct odph_list_object *prev, odph_list_object *next)
(function) of file odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:61: warning: Member
odph_list_del(struct odph_list_object *entry) (function) of file
odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:67: warning: Member
odph_list_empty(const struct odph_list_object *head) (function) of file
odph_list_internal.h is not documented.
/odp/helper/include/odph_list_internal.h:75: warning: parameters of member
ODPH_LIST_FOR_EACH are not (all) documented
/odp/helper/include/odp/helper/ip.h:98: warning: Member
odph_ipv4_csum(odp_packet_t pkt, uint32_t offset, odph_ipv4hdr_t *ip,
odp_u16sum_t *chksum) (function) of group odph_header is not documented.
/odp/helper/include/odph_list_internal.h:22: warning: Member next (variable) of
class odph_list_object is not documented.
/odp/helper/include/odph_list_internal.h:22: warning: Member prev (variable) of
class odph_list_object is not documented.
  DXGEN  doc/platform-api-guide/Doxyfile
  DXGEN  doc/driver-api-guide/Doxyfile

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

[lng-odp] [PATCH API-NEXT v2 1/1] api: comp: introduce compression API

2017-09-05 Thread Github ODP bot
From: Shally Verma 

compression specification is set of API to enable compression/
decompression support in ODP. Current specification has support
for zlib, deflate and LZS.

Signed-off-by: Shally Verma 
Signed-off-by: Mahipal Challa 
Cc: Narayan Prasad Athreya 
Cc: Subrahmanyam Nilla 
Cc: Shrutika Pimpalkar 
Cc: Venkatesh Bolla 
---
/** Email created from pull request 156 (1234sv:api-next-comp)
 ** https://github.com/Linaro/odp/pull/156
 ** Patch: https://github.com/Linaro/odp/pull/156.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: c0860375a96a57fff79b25ca60ff4476104c31d9
 **/
 include/odp/api/spec/comp.h | 873 
 1 file changed, 873 insertions(+)
 create mode 100644 include/odp/api/spec/comp.h

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
new file mode 100644
index ..7bff123d
--- /dev/null
+++ b/include/odp/api/spec/comp.h
@@ -0,0 +1,873 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:BSD-3-Clause
+ */
+
+/**
+ * @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 is an API set to do compression+hash or decompression+hash
+ *  operations on data. Hash is calculated on plaintext.
+ *
+ *  if opcode = ODP_COMP_COMPRESS, then it will apply hash and then compress,
+ *  if opcode = ODP_COMP_DECOMPRESS, then it will decompress and then 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 interface.
+ *  @{
+ */
+
+/**
+ * @def ODP_COMP_SESSION_INVALID
+ * Invalid session handle
+ */
+
+/**
+ * @typedef odp_comp_session_t
+ * Compression/Decompression session 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 - No hash algorithm selected. */
+   ODP_COMP_HASH_ALG_NONE,
+   /** ODP_COMP_HASH_ALG_SHA1 - SHA-1 hash algorithm. */
+   ODP_COMP_HASH_ALG_SHA1,
+   /** ODP_COMP_HASH_ALG_SHA256 - SHA-2 hash algorithm
+* 256-bit digest length.
+*/
+   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,
+   /** 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).
+*
+* if using async mode, application should either make sure to
+* provide sufficient output buffer size OR maintain relevant
+* context (or ordering) information with respect to each input packet
+* en-queued for processing.
+*
+*/
+   ODP_COMP_ERR_OUT_OF_SPACE,
+   /** Invalid user data pointers */
+   

[lng-odp] [PATCH API-NEXT v2 0/1] api: comp: introduce compression API

2017-09-05 Thread Github ODP bot
ODP comp patch v2
changes from v1(v8 version of PR102):
-Added a new API set which takes input and output packet handle
as separate parameter
-Added sync and async operation api for single packet processing
-Added an sync and async operation API for multiple packet processing
-Rework on data structure for input and output parameter and result
-Removed old set of API for packet processing
ODP comp patch v1
Previous patch incorporates review comments made over API-NEXT PATCH v8 PR#102
- Add description to Comp API hash algorithm
- Add specific reference of SHA-2 for SHA256
- Rename algorithm parameters in odp_comp_capability_t
- Add more description to odp_comp_alg_param_t
Signed-off-by: Shally Verma 
Signed-off-by: Mahipal Challa 
Cc: Narayan Prasad Athreya 

github
/** Email created from pull request 156 (1234sv:api-next-comp)
 ** https://github.com/Linaro/odp/pull/156
 ** Patch: https://github.com/Linaro/odp/pull/156.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: c0860375a96a57fff79b25ca60ff4476104c31d9
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 873 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


Re: [lng-odp] Regarding github pull (RE: [Linaro/odp] [PATCH API-NEXT v12] comp: compression spec (#102))

2017-09-05 Thread Maxim Uvarov
Shally,

you need to prepare commits manually. Github will not squash them.
By prepare I mean:
1. isolate api patch. it has to have api: prefix and be the first patch.
That patch needs Petri's review.
2. put all other patches behind it. Split them as reasonable but keep
bisectability working.  I.e. code have
to compile on any slice of patches.

Patches to mailing list build directly from your commits. How many commits
you have as many patches will be send.

I would start with single patch with api. Then get Petri's approve (or if
Nitkil will be ready than get his). Then I can merge it to api-next.
And then adjust implementation to that api and send it.

Best regards,
Maxim.







On 5 September 2017 at 12:18, Verma, Shally  wrote:

> HI Maxim
>
>
>
> So that I can better take care of problem raised below, help me to
> understand this.
>
>
>
> Currently I have two commits in my local branch :1st-as of today, 2nd:
> older commit having older spec version (already pushed to branch and pull
> request v1 raised on it).
>
>
>
> So, before I push it to my pull request branch, do I need to squash them ?
> Or just push will do.?
>
>
>
> As I understand, current push should generate v2 with latest commit log
> and it should just suffice.
>
>
>
>
>
> Thanks
>
> Shally
>
>
>
> *From:* Shally Verma [mailto:notificati...@github.com]
> *Sent:* 31 August 2017 14:00
> *To:* Linaro/odp 
> *Cc:* Verma, Shally ; Your activity <
> your_activ...@noreply.github.com>
> *Subject:* Re: [Linaro/odp] [PATCH API-NEXT v12] comp: compression spec
> (#102)
>
>
>
> Yea I realise that part and I tried to squash them however since I am new
> to github so taking more time with all this. I am trying to understand how
> best to resolve them and make it one smooth flow until then, Please bear
> with me on these issues.
>
> If Maxim (or any other) don’t mind to share his chat ID to me, then I can
> work with him and get past these issues fast.
>
> Thanks
> Shally
>
> From: Petri Savolainen [mailto:notificati...@github.com]
> Sent: 31 August 2017 13:54
> To: Linaro/odp 
> Cc: Verma, Shally ; Mention <
> ment...@noreply.github.com>
> Subject: Re: [Linaro/odp] [PATCH API-NEXT v12] comp: compression spec
> (#102)
>
>
> There should be only one API spec commit. It seems now that there are 6
> commits. Please, squash all commits into one. It's pretty much impossible
> to review / comment this spec now.
>
> Change commit subject to "api: comp: introduce compression API". All API
> spec file changing commits MUST start with "api: " prefix.
>
> It seems that commit log text is empty. It should have rationale for the
> change. In this case describe the intended usage on the new API, etc. E.g.
> 5 sentences of text what problem comp API solves, for what problem
> application should use it, etc.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub Linaro/odp/pull/102#issuecomment-326226266>, or mute the thread<
> https://github.com/notifications/unsubscribe-auth/
> AIFXaHsw4hvMg50u0bvFvbZgtwPHLcJ4ks5sdm2pgaJpZM4Oq6xH>.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> , or mute
> the thread
> 
> .[image: Image removed by sender.]
>


[lng-odp] [PATCH API-NEXT v17 1/1] test: validation: add IPsec API testsuite

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Add several basic tests for IPsec API.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 70 (lumag:ipsec-testsuite-2)
 ** https://github.com/Linaro/odp/pull/70
 ** Patch: https://github.com/Linaro/odp/pull/70.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 9612ad76314e4b3b88f490944d58c5bb7e9dbf8c
 **/
 test/common_plat/validation/api/ipsec/Makefile.am  |  27 +-
 test/common_plat/validation/api/ipsec/ipsec.c  | 870 ++-
 test/common_plat/validation/api/ipsec/ipsec.h  |  82 +-
 .../common_plat/validation/api/ipsec/ipsec_async.c |  55 ++
 .../validation/api/ipsec/ipsec_inline_in.c |  56 ++
 .../validation/api/ipsec/ipsec_inline_out.c|  56 ++
 test/common_plat/validation/api/ipsec/ipsec_main.c |  12 -
 test/common_plat/validation/api/ipsec/ipsec_sync.c |  53 ++
 .../validation/api/ipsec/ipsec_sync_in.c   |  27 +
 .../validation/api/ipsec/ipsec_test_in.c   | 815 +
 .../validation/api/ipsec/ipsec_test_out.c  | 348 
 .../validation/api/ipsec/test_vectors.h| 965 +
 test/linux-generic/Makefile.am |   5 +-
 13 files changed, 3327 insertions(+), 44 deletions(-)
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_async.c
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_inline_in.c
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_inline_out.c
 delete mode 100644 test/common_plat/validation/api/ipsec/ipsec_main.c
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_sync.c
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_sync_in.c
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_test_in.c
 create mode 100644 test/common_plat/validation/api/ipsec/ipsec_test_out.c
 create mode 100644 test/common_plat/validation/api/ipsec/test_vectors.h

diff --git a/test/common_plat/validation/api/ipsec/Makefile.am 
b/test/common_plat/validation/api/ipsec/Makefile.am
index 106b8dce..5a4652f5 100644
--- a/test/common_plat/validation/api/ipsec/Makefile.am
+++ b/test/common_plat/validation/api/ipsec/Makefile.am
@@ -1,10 +1,27 @@
 include ../Makefile.inc
 
+AM_CPPFLAGS += -Wno-error=missing-field-initializers
+
 noinst_LTLIBRARIES = libtestipsec.la
-libtestipsec_la_SOURCES = ipsec.c
+libtestipsec_la_SOURCES = \
+   test_vectors.h \
+   ipsec_test_in.c \
+   ipsec_test_out.c \
+   ipsec.h \
+   ipsec.c
+
+test_PROGRAMS = \
+   ipsec_sync$(EXEEXT) \
+   ipsec_async$(EXEEXT) \
+   ipsec_inline_in$(EXEEXT) \
+   ipsec_inline_out$(EXEEXT)
 
-test_PROGRAMS = ipsec_main$(EXEEXT)
-dist_ipsec_main_SOURCES = ipsec_main.c
-ipsec_main_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
+ipsec_sync_SOURCES = ipsec_sync.c
+ipsec_async_SOURCES = ipsec_async.c
+ipsec_inline_in_SOURCES = ipsec_inline_in.c
+ipsec_inline_out_SOURCES = ipsec_inline_out.c
 
-EXTRA_DIST = ipsec.h
+ipsec_sync_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
+ipsec_async_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
+ipsec_inline_in_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
+ipsec_inline_out_LDADD = libtestipsec.la $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/common_plat/validation/api/ipsec/ipsec.c 
b/test/common_plat/validation/api/ipsec/ipsec.c
index 78348032..43d5222c 100644
--- a/test/common_plat/validation/api/ipsec/ipsec.c
+++ b/test/common_plat/validation/api/ipsec/ipsec.c
@@ -4,41 +4,875 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
+#include "config.h"
+
 #include 
 #include 
 #include 
 
 #include "ipsec.h"
 
-void ipsec_test_capability(void)
+#include "test_vectors.h"
+
+struct suite_context_s suite_context;
+
+#define PKT_POOL_NUM  64
+#define PKT_POOL_LEN  (1 * 1024)
+
+static odp_pktio_t pktio_create(odp_pool_t pool)
+{
+   odp_pktio_t pktio;
+   odp_pktio_param_t pktio_param;
+   odp_pktin_queue_param_t pktin_param;
+   odp_pktio_capability_t capa;
+
+   int ret;
+
+   if (pool == ODP_POOL_INVALID)
+   return ODP_PKTIO_INVALID;
+
+   odp_pktio_param_init(_param);
+   pktio_param.in_mode = ODP_PKTIN_MODE_QUEUE;
+
+   pktio = odp_pktio_open("loop", pool, _param);
+   if (pktio == ODP_PKTIO_INVALID) {
+   ret = odp_pool_destroy(pool);
+   if (ret)
+   fprintf(stderr, "unable to destroy pool.\n");
+   return ODP_PKTIO_INVALID;
+   }
+
+   if (odp_pktio_capability(pktio, )) {
+   fprintf(stderr, "pktio capabilities failed.\n");
+   return ODP_PKTIO_INVALID;
+   }
+
+   odp_pktin_queue_param_init(_param);
+   pktin_param.queue_param.sched.sync = ODP_SCHED_SYNC_ATOMIC;
+
+   if (odp_pktin_queue_config(pktio, _param)) {
+   fprintf(stderr, "pktin queue 

[lng-odp] [PATCH API-NEXT v15 4/9] linux-gen: packet: factor out L2 header parsing

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Function parse_packet_common() now becomes just a multiplexer calling
other low-level parsing functions.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
 platform/linux-generic/odp_packet.c | 139 
 1 file changed, 77 insertions(+), 62 deletions(-)

diff --git a/platform/linux-generic/odp_packet.c 
b/platform/linux-generic/odp_packet.c
index bb0f2b89..2038f60d 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -2120,6 +2120,78 @@ int _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, 
odp_packet_t dstpkt)
return dsthdr->buf_hdr.uarea_size < srchdr->buf_hdr.uarea_size;
 }
 
+/** Parser helper function for Ethernet packets */
+static inline uint16_t parse_eth(packet_parser_t *prs, const uint8_t 
**parseptr,
+uint32_t *offset, uint32_t frame_len)
+{
+   uint16_t ethtype;
+   const _odp_ethhdr_t *eth;
+   uint16_t macaddr0, macaddr2, macaddr4;
+   const _odp_vlanhdr_t *vlan;
+
+   /* Detect jumbo frames */
+   if (frame_len > _ODP_ETH_LEN_MAX)
+   prs->input_flags.jumbo = 1;
+
+   eth = (const _odp_ethhdr_t *)*parseptr;
+
+   /* Handle Ethernet broadcast/multicast addresses */
+   macaddr0 = odp_be_to_cpu_16(*((const uint16_t *)(const void *)eth));
+   prs->input_flags.eth_mcast = (macaddr0 & 0x0100) == 0x0100;
+
+   if (macaddr0 == 0x) {
+   macaddr2 =
+   odp_be_to_cpu_16(*((const uint16_t *)
+  (const void *)eth + 1));
+   macaddr4 =
+   odp_be_to_cpu_16(*((const uint16_t *)
+  (const void *)eth + 2));
+   prs->input_flags.eth_bcast =
+   (macaddr2 == 0x) && (macaddr4 == 0x);
+   } else {
+   prs->input_flags.eth_bcast = 0;
+   }
+
+   /* Get Ethertype */
+   ethtype = odp_be_to_cpu_16(eth->type);
+   *offset += sizeof(*eth);
+   *parseptr += sizeof(*eth);
+
+   /* Check for SNAP vs. DIX */
+   if (ethtype < _ODP_ETH_LEN_MAX) {
+   prs->input_flags.snap = 1;
+   if (ethtype > frame_len - *offset) {
+   prs->error_flags.snap_len = 1;
+   return 0;
+   }
+   ethtype = odp_be_to_cpu_16(*((const uint16_t *)(uintptr_t)
+(parseptr + 6)));
+   *offset   += 8;
+   *parseptr += 8;
+   }
+
+   /* Parse the VLAN header(s), if present */
+   if (ethtype == _ODP_ETHTYPE_VLAN_OUTER) {
+   prs->input_flags.vlan_qinq = 1;
+   prs->input_flags.vlan = 1;
+
+   vlan = (const _odp_vlanhdr_t *)*parseptr;
+   ethtype = odp_be_to_cpu_16(vlan->type);
+   *offset += sizeof(_odp_vlanhdr_t);
+   *parseptr += sizeof(_odp_vlanhdr_t);
+   }
+
+   if (ethtype == _ODP_ETHTYPE_VLAN) {
+   prs->input_flags.vlan = 1;
+   vlan = (const _odp_vlanhdr_t *)*parseptr;
+   ethtype = odp_be_to_cpu_16(vlan->type);
+   *offset += sizeof(_odp_vlanhdr_t);
+   *parseptr += sizeof(_odp_vlanhdr_t);
+   }
+
+   return ethtype;
+}
+
 /**
  * Parser helper function for IPv4
  */
@@ -2274,9 +2346,9 @@ int packet_parse_common(packet_parser_t *prs, const 
uint8_t *ptr,
uint16_t ethtype;
const uint8_t *parseptr;
uint8_t  ip_proto;
-   const _odp_ethhdr_t *eth;
-   uint16_t macaddr0, macaddr2, macaddr4;
-   const _odp_vlanhdr_t *vlan;
+
+   parseptr = ptr;
+   offset = 0;
 
if (layer == ODP_PKTIO_PARSER_LAYER_NONE)
return 0;
@@ -2285,65 +2357,8 @@ int packet_parse_common(packet_parser_t *prs, const 
uint8_t *ptr,
prs->input_flags.eth = 1;
/* Assume valid L2 header, no CRC/FCS check in SW */
prs->input_flags.l2 = 1;
-   /* Detect jumbo frames */
-   if (frame_len > _ODP_ETH_LEN_MAX)
-   prs->input_flags.jumbo = 1;
-
-   offset = sizeof(_odp_ethhdr_t);
-   eth = (const _odp_ethhdr_t *)ptr;
 
-   /* Handle Ethernet broadcast/multicast addresses */
-   macaddr0 = odp_be_to_cpu_16(*((const uint16_t *)(const void *)eth));
-   prs->input_flags.eth_mcast = (macaddr0 & 0x0100) == 0x0100;
-
-   if (macaddr0 == 0x) {
-   macaddr2 =
-   odp_be_to_cpu_16(*((const uint16_t *)
-  

[lng-odp] [PATCH API-NEXT v15 9/9] linux-generic: ipsec: draft IPsec implementation

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

For now it's only a preview with the following limitation:
 - Only IPv4 support
 - No pipeline_cls and outer header retaining support
 - No zeroing of mutable IPv4 options for AH ICV calculation
 - No replay protection
 - No ESN support
 - No UDP encapsulation support

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
 .../linux-generic/include/odp_ipsec_internal.h |7 +
 .../linux-generic/include/odp_packet_internal.h|4 +
 platform/linux-generic/odp_ipsec.c | 1216 +++-
 3 files changed, 1178 insertions(+), 49 deletions(-)

diff --git a/platform/linux-generic/include/odp_ipsec_internal.h 
b/platform/linux-generic/include/odp_ipsec_internal.h
index 64ef8ab7..74085c95 100644
--- a/platform/linux-generic/include/odp_ipsec_internal.h
+++ b/platform/linux-generic/include/odp_ipsec_internal.h
@@ -183,6 +183,13 @@ int _odp_ipsec_sa_update_stats(ipsec_sa_t *ipsec_sa, 
uint32_t len,
   odp_ipsec_op_status_t *status);
 
 /**
+ * Try inline IPsec processing of provided packet.
+ *
+ * @retval 0 if packet was processed and sent using IPsec inline processing
+ */
+int _odp_ipsec_try_inline(odp_packet_t pkt);
+
+/**
  * @}
  */
 
diff --git a/platform/linux-generic/include/odp_packet_internal.h 
b/platform/linux-generic/include/odp_packet_internal.h
index 1f215d7d..51697192 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -27,6 +27,7 @@ extern "C" {
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -159,6 +160,9 @@ typedef struct odp_packet_hdr_t {
uint8_t extra[PKT_EXTRA_LEN] ODP_ALIGNED_CACHE;
 #endif
 
+   /* Context for IPsec */
+   odp_ipsec_packet_result_t ipsec_ctx;
+
/* Packet data storage */
uint8_t data[0];
 } odp_packet_hdr_t;
diff --git a/platform/linux-generic/odp_ipsec.c 
b/platform/linux-generic/odp_ipsec.c
index d0ca027c..cdea8d12 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -4,127 +4,1245 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
+#include "config.h"
+
 #include 
 
+#include 
+#include 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 
+typedef struct ODP_PACKED {
+   odp_u32be_t spi; /**< Security Parameter Index */
+   odp_u32be_t seq_no;  /**< Sequence Number */
+} ipsec_aad_t;
+
 int odp_ipsec_capability(odp_ipsec_capability_t *capa)
 {
+   int rc;
+   odp_crypto_capability_t crypto_capa;
+   odp_queue_capability_t queue_capa;
+
memset(capa, 0, sizeof(odp_ipsec_capability_t));
 
+   capa->op_mode_sync = ODP_SUPPORT_PREFERRED;
+   capa->op_mode_async = ODP_SUPPORT_PREFERRED;
+   capa->op_mode_inline_in = ODP_SUPPORT_PREFERRED;
+   capa->op_mode_inline_out = ODP_SUPPORT_PREFERRED;
+
+   capa->proto_ah = ODP_SUPPORT_YES;
+
+   capa->max_num_sa = ODP_CONFIG_IPSEC_SAS;
+
+   rc = odp_crypto_capability(_capa);
+   if (rc < 0)
+   return rc;
+
+   capa->ciphers = crypto_capa.ciphers;
+   capa->auths = crypto_capa.auths;
+
+   rc = odp_queue_capability(_capa);
+   if (rc < 0)
+   return rc;
+
+   capa->max_queues = queue_capa.max_queues;
+
return 0;
 }
 
 int odp_ipsec_cipher_capability(odp_cipher_alg_t cipher,
odp_crypto_cipher_capability_t capa[], int num)
 {
-   (void)cipher;
-   (void)capa;
-   (void)num;
-
-   return -1;
+   return odp_crypto_cipher_capability(cipher, capa, num);
 }
 
 int odp_ipsec_auth_capability(odp_auth_alg_t auth,
  odp_crypto_auth_capability_t capa[], int num)
 {
-   (void)auth;
-   (void)capa;
-   (void)num;
-
-   return -1;
+   return odp_crypto_auth_capability(auth, capa, num);
 }
 
 void odp_ipsec_config_init(odp_ipsec_config_t *config)
 {
memset(config, 0, sizeof(odp_ipsec_config_t));
+   config->inbound_mode = ODP_IPSEC_OP_MODE_SYNC;
+   config->outbound_mode = ODP_IPSEC_OP_MODE_SYNC;
+   config->max_num_sa = ODP_CONFIG_IPSEC_SAS;
+   config->inbound.default_queue = ODP_QUEUE_INVALID;
+   config->inbound.lookup.min_spi = 0;
+   config->inbound.lookup.max_spi = UINT32_MAX;
 }
 
+static odp_ipsec_config_t ipsec_config;
+
 int odp_ipsec_config(const odp_ipsec_config_t *config)
 {
-   (void)config;
+   if (ODP_CONFIG_IPSEC_SAS > config->max_num_sa)
+   return -1;
+
+   ipsec_config = *config;
+
+   return 0;
+}
+
+static odp_ipsec_packet_result_t 

[lng-odp] [PATCH API-NEXT v15 7/9] linux-generic: ipsec: implement events handling

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Add functions implementing IPsec events support.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
 platform/linux-generic/Makefile.am |   2 +
 platform/linux-generic/include/odp_internal.h  |   4 +
 .../linux-generic/include/odp_ipsec_internal.h |  84 +++
 platform/linux-generic/odp_event.c |   4 +
 platform/linux-generic/odp_init.c  |  13 ++
 platform/linux-generic/odp_ipsec.c |  10 +-
 platform/linux-generic/odp_ipsec_events.c  | 156 +
 7 files changed, 265 insertions(+), 8 deletions(-)
 create mode 100644 platform/linux-generic/include/odp_ipsec_internal.h
 create mode 100644 platform/linux-generic/odp_ipsec_events.c

diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index 7556b9ad..22b13a3d 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -174,6 +174,7 @@ noinst_HEADERS = \
  ${srcdir}/include/odp_errno_define.h \
  ${srcdir}/include/odp_forward_typedefs_internal.h \
  ${srcdir}/include/odp_internal.h \
+ ${srcdir}/include/odp_ipsec_internal.h \
  ${srcdir}/include/odp_llqueue.h \
  ${srcdir}/include/odp_name_table_internal.h \
  ${srcdir}/include/odp_packet_internal.h \
@@ -247,6 +248,7 @@ __LIB__libodp_linux_la_SOURCES = \
   odp_init.c \
   odp_impl.c \
   odp_ipsec.c \
+  odp_ipsec_events.c \
   odp_name_table.c \
   odp_packet.c \
   odp_packet_flags.c \
diff --git a/platform/linux-generic/include/odp_internal.h 
b/platform/linux-generic/include/odp_internal.h
index ab935ff8..f916631b 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -74,6 +74,7 @@ enum init_stage {
CLASSIFICATION_INIT,
TRAFFIC_MNGR_INIT,
NAME_TABLE_INIT,
+   IPSEC_EVENTS_INIT,
MODULES_INIT,
ALL_INIT  /* All init stages completed */
 };
@@ -133,6 +134,9 @@ int _odp_ishm_init_local(void);
 int _odp_ishm_term_global(void);
 int _odp_ishm_term_local(void);
 
+int _odp_ipsec_events_init_global(void);
+int _odp_ipsec_events_term_global(void);
+
 int _odp_modules_init_global(void);
 
 int cpuinfo_parser(FILE *file, system_info_t *sysinfo);
diff --git a/platform/linux-generic/include/odp_ipsec_internal.h 
b/platform/linux-generic/include/odp_ipsec_internal.h
new file mode 100644
index ..b31f048f
--- /dev/null
+++ b/platform/linux-generic/include/odp_ipsec_internal.h
@@ -0,0 +1,84 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP internal IPsec routines
+ */
+
+#ifndef ODP_IPSEC_INTERNAL_H_
+#define ODP_IPSEC_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include 
+#include 
+
+#include 
+
+/** @ingroup odp_ipsec
+ *  @{
+ */
+
+typedef ODP_HANDLE_T(ipsec_status_t);
+
+#define ODP_IPSEC_STATUS_INVALID \
+   _odp_cast_scalar(ipsec_status_t, 0x)
+
+/**
+ * @internal Get ipsec_status handle from event
+ *
+ * Converts an ODP_EVENT_IPSEC_STATUS type event to an IPsec status event.
+ *
+ * @param ev   Event handle
+ *
+ * @return IPsec status handle
+ *
+ * @see odp_event_type()
+ */
+ipsec_status_t _odp_ipsec_status_from_event(odp_event_t ev);
+
+/**
+ * @internal Free IPsec status event
+ *
+ * Frees the ipsec_status into the ipsec_status pool it was allocated from.
+ *
+ * @param res   IPsec status handle
+ */
+void _odp_ipsec_status_free(ipsec_status_t status);
+
+/**
+ * @internal Send ODP_IPSEC_STATUS event
+ *
+ * Sends the ipsec_status event using provided information
+ *
+ * @param queue destination queue
+ * @param idstatus id
+ * @param saSA respective to the operation
+ * @param resultstatus value
+ * @param warn  generated warning
+ *
+ * @retval 0 on success
+ * @retval <0 on failure
+ */
+int _odp_ipsec_status_send(odp_queue_t queue,
+  odp_ipsec_status_id_t id,
+  odp_ipsec_sa_t sa,
+  int result,
+  odp_ipsec_warn_t warn);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/odp_event.c 
b/platform/linux-generic/odp_event.c
index 991d0e17..66bc11fe 100644

[lng-odp] [PATCH API-NEXT v15 5/9] linux-gen: packet: support parsing of just L3/L4 headers

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

IPsec packet postprocessing needs parsing of packets which guarantee
only L3/L4 headers. Separate parsing function doing L3/L4 headers
parsing.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
 .../linux-generic/include/odp_packet_internal.h|  6 ++
 platform/linux-generic/odp_packet.c| 85 ++
 2 files changed, 62 insertions(+), 29 deletions(-)

diff --git a/platform/linux-generic/include/odp_packet_internal.h 
b/platform/linux-generic/include/odp_packet_internal.h
index 91fba1ea..1f215d7d 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -356,6 +356,12 @@ int packet_alloc_multi(odp_pool_t pool_hdl, uint32_t len,
 int packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
   odp_pktio_parser_layer_t layer);
 
+/* Perform L3 and L4 parsing up to a given protocol layer */
+int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr,
+  odp_pktio_parser_layer_t layer,
+  uint32_t l3_offset,
+  uint16_t ethtype);
+
 /* Reset parser metadata for a new parse */
 void packet_parse_reset(odp_packet_hdr_t *pkt_hdr);
 
diff --git a/platform/linux-generic/odp_packet.c 
b/platform/linux-generic/odp_packet.c
index 2038f60d..1292d33e 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -262,7 +262,7 @@ void packet_parse_reset(odp_packet_hdr_t *pkt_hdr)
pkt_hdr->p.error_flags.all  = 0;
pkt_hdr->p.input_flags.all  = 0;
pkt_hdr->p.output_flags.all = 0;
-   pkt_hdr->p.l2_offset= 0;
+   pkt_hdr->p.l2_offset= ODP_PACKET_OFFSET_INVALID;
pkt_hdr->p.l3_offset= ODP_PACKET_OFFSET_INVALID;
pkt_hdr->p.l4_offset= ODP_PACKET_OFFSET_INVALID;
 
@@ -2332,37 +2332,15 @@ static inline void parse_udp(packet_parser_t *prs,
*parseptr += sizeof(_odp_udphdr_t);
 }
 
-/**
- * Parse common packet headers up to given layer
- *
- * The function expects at least PACKET_PARSE_SEG_LEN bytes of data to be
- * available from the ptr.
- */
-int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr,
-   uint32_t frame_len, uint32_t seg_len,
-   odp_pktio_parser_layer_t layer)
+static inline
+int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr,
+ uint32_t offset,
+ uint32_t frame_len, uint32_t seg_len,
+ odp_pktio_parser_layer_t layer,
+ uint16_t ethtype)
 {
-   uint32_t offset;
-   uint16_t ethtype;
-   const uint8_t *parseptr;
uint8_t  ip_proto;
 
-   parseptr = ptr;
-   offset = 0;
-
-   if (layer == ODP_PKTIO_PARSER_LAYER_NONE)
-   return 0;
-
-   /* We only support Ethernet for now */
-   prs->input_flags.eth = 1;
-   /* Assume valid L2 header, no CRC/FCS check in SW */
-   prs->input_flags.l2 = 1;
-
-   ethtype = parse_eth(prs, , , frame_len);
-
-   if (layer == ODP_PKTIO_PARSER_LAYER_L2)
-   return prs->error_flags.all != 0;
-
/* Set l3_offset+flag only for known ethtypes */
prs->l3_offset = offset;
prs->input_flags.l3 = 1;
@@ -2445,6 +2423,42 @@ int packet_parse_common(packet_parser_t *prs, const 
uint8_t *ptr,
 }
 
 /**
+ * Parse common packet headers up to given layer
+ *
+ * The function expects at least PACKET_PARSE_SEG_LEN bytes of data to be
+ * available from the ptr.
+ */
+int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr,
+   uint32_t frame_len, uint32_t seg_len,
+   odp_pktio_parser_layer_t layer)
+{
+   uint32_t offset;
+   uint16_t ethtype;
+   const uint8_t *parseptr;
+
+   parseptr = ptr;
+   offset = 0;
+
+   if (layer == ODP_PKTIO_PARSER_LAYER_NONE)
+   return 0;
+
+   /* Assume valid L2 header, no CRC/FCS check in SW */
+   prs->l2_offset = offset;
+   prs->input_flags.l2 = 1;
+   /* We only support Ethernet for now */
+   prs->input_flags.eth = 1;
+
+   ethtype = parse_eth(prs, , , frame_len);
+
+   if (layer == ODP_PKTIO_PARSER_LAYER_L2)
+   return prs->error_flags.all != 0;
+
+
+   return packet_parse_common_l3_l4(prs, parseptr, offset, frame_len,
+seg_len, layer, ethtype);
+}
+
+/**
  * Simple packet parser
  */
 int packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
@@ -2457,6 +2471,19 @@ int 

[lng-odp] [PATCH API-NEXT v15 6/9] linux-gen: packet: add support for IP-in-IP (RFC 2003) encap

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Don't barf on IP-in-IP packets parsing, just ignore L4 (=L3) header.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
 platform/linux-generic/include/protocols/ip.h | 1 +
 platform/linux-generic/odp_packet.c   | 4 
 2 files changed, 5 insertions(+)

diff --git a/platform/linux-generic/include/protocols/ip.h 
b/platform/linux-generic/include/protocols/ip.h
index 2b34a753..0fc391ab 100644
--- a/platform/linux-generic/include/protocols/ip.h
+++ b/platform/linux-generic/include/protocols/ip.h
@@ -158,6 +158,7 @@ typedef struct ODP_PACKED {
  * @{*/
 #define _ODP_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */
 #define _ODP_IPPROTO_ICMPv4  0x01 /**< Internet Control Message Protocol (1) */
+#define _ODP_IPPROTO_IPIP0x04 /**< IP Encapsulation within IP (4) */
 #define _ODP_IPPROTO_TCP 0x06 /**< Transmission Control Protocol (6) */
 #define _ODP_IPPROTO_UDP 0x11 /**< User Datagram Protocol (17) */
 #define _ODP_IPPROTO_ROUTE   0x2B /**< IPv6 Routing header (43) */
diff --git a/platform/linux-generic/odp_packet.c 
b/platform/linux-generic/odp_packet.c
index 1292d33e..4793fa12 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -2385,6 +2385,10 @@ int packet_parse_common_l3_l4(packet_parser_t *prs, 
const uint8_t *parseptr,
prs->input_flags.icmp = 1;
break;
 
+   case _ODP_IPPROTO_IPIP:
+   /* Do nothing */
+   break;
+
case _ODP_IPPROTO_TCP:
if (odp_unlikely(offset + _ODP_TCPHDR_LEN > seg_len))
return -1;



[lng-odp] [PATCH API-NEXT v15 3/9] linux-gen: pktio: loop: support IPsec inbound inline

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Add support for inbound inline IPsec packet processing on loop
interface.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
 platform/linux-generic/pktio/loop.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/platform/linux-generic/pktio/loop.c 
b/platform/linux-generic/pktio/loop.c
index 6cc86e6a..1b36034f 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -135,6 +135,13 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
 
packet_set_ts(pkt_hdr, ts);
pkt_hdr->input = pktio_entry->s.handle;
+
+   /* Try IPsec inline processing */
+   if (pktio_entry->s.config.inbound_ipsec &&
+   odp_packet_has_ipsec(pkt) &&
+   _odp_ipsec_try_inline(pkt) == 0)
+   continue;
+
pktio_entry->s.stats.in_octets += pkt_len;
pkts[num_rx++] = pkt;
}
@@ -229,6 +236,7 @@ static int loopback_capability(pktio_entry_t *pktio_entry 
ODP_UNUSED,
odp_pktio_config_init(>config);
capa->config.pktin.bit.ts_all = 1;
capa->config.pktin.bit.ts_ptp = 1;
+   capa->config.inbound_ipsec = 1;
capa->config.outbound_ipsec = 1;
 
return 0;



[lng-odp] [PATCH API-NEXT v12 5/6] comp compression API

2017-09-05 Thread Github ODP bot
From: Shally Verma 

Signed-off-by: Mahipal Challa 
Signed-off-by: Shally Verma 
Cc: Narayan Prasad Athreya 
---
/** Email created from pull request 102 (1234sv:api-next)
 ** https://github.com/Linaro/odp/pull/102
 ** Patch: https://github.com/Linaro/odp/pull/102.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 5a3875bda93ff56c76538aa76f8a943651e0919a
 **/
 include/odp/api/spec/comp.h | 429 +---
 1 file changed, 200 insertions(+), 229 deletions(-)

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
index f084f4bf..2956094c 100644
--- a/include/odp/api/spec/comp.h
+++ b/include/odp/api/spec/comp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017, Linaro Limited
+/* Copyright (c) 2013, Linaro Limited
  * All rights reserved.
  *
  * SPDX-License-Identifier:BSD-3-Clause
@@ -14,23 +14,24 @@
 #define ODP_API_COMP_H_
 
 #include 
-#include 
-#include 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#include 
+#include 
+
 /** @defgroup odp_compression ODP COMP
- *  ODP Compression is an API set to do compression+hash or decompression+hash
+ *  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 apply hash and then compress,
- *  if opcode = ODP_COMP_DECOMPRESS, then it will decompress and then apply
+ *  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 interface.
+ *  Macros, enums, types and operations to utilize compression.
  *  @{
  */
 
@@ -59,7 +60,7 @@ typedef enum {
  *
  */
 typedef enum {
-   /** Compress */
+   /** Compress  */
ODP_COMP_OP_COMPRESS,
/** Decompress */
ODP_COMP_OP_DECOMPRESS
@@ -70,13 +71,11 @@ typedef enum {
  *
  */
 typedef enum {
-   /** ODP_COMP_HASH_ALG_NONE - No hash algorithm selected. */
+   /** ODP_COMP_HASH_ALG_NONE*/
ODP_COMP_HASH_ALG_NONE,
-   /** ODP_COMP_HASH_ALG_SHA1 - SHA-1 hash algorithm. */
+   /** ODP_COMP_HASH_ALG_SHA1*/
ODP_COMP_HASH_ALG_SHA1,
-   /** ODP_COMP_HASH_ALG_SHA256 - SHA-2 hash algorithm
-   * 256-bit digest length.
-   */
+   /**  ODP_COMP_HASH_ALG_SHA256*/
ODP_COMP_HASH_ALG_SHA256
 } odp_comp_hash_alg_t;
 
@@ -196,10 +195,10 @@ typedef enum {
 typedef union odp_comp_hash_algos_t {
/** hash algorithms */
struct {
-   /** ODP_COMP_HASH_ALG_SHA1 */
+   /** SHA-1 */
uint32_t sha1  : 1;
 
-   /** ODP_COMP_HASH_ALG_SHA256 */
+   /** SHA with 256 bits of Message Digest */
uint32_t sha256 : 1;
 
} bit;
@@ -248,10 +247,14 @@ typedef struct odp_comp_capability_t {
uint32_t max_sessions;
 
/** Supported compression algorithms */
-   odp_comp_algos_t comp_algos;
+   odp_comp_algos_t comp_algs;
 
/** Supported hash algorithms. */
-   odp_comp_hash_algos_t hash_algos;
+   odp_comp_hash_algos_t hash_algs;
+
+   /* sync/async mode of operation support.
+* Implementation should support atleast one of the mode.
+*/
 
/** Support type for synchronous operation mode (ODP_COMP_SYNC).
 *  User should set odp_comp_session_param_t:mode based on
@@ -279,7 +282,7 @@ typedef struct odp_comp_hash_alg_capability_t {
  * Compression algorithm capabilities structure for each algorithm.
  *
  */
-typedef struct odp_comp_algo_capability_t {
+typedef struct odp_comp_alg_capability_t {
/** Enumeration indicating alg support for dictionary load */
odp_support_t support_dict;
 
@@ -319,16 +322,15 @@ typedef struct odp_comp_algo_capability_t {
uint32_t max_level;
 
/* Supported hash algorithms */
-   odp_comp_hash_algos_t hash_algo;
-} odp_comp_algo_capability_t;
+   odp_comp_hash_algos_t hash_alg;
+} odp_comp_alg_capability_t;
 
 /**
  * Comp API dictionary type
- * Consists of pointer to byte buffer. length of dictionary
- * indicated by length parameter.
+ *
  */
 typedef struct odp_comp_dict_t {
-   /** pointer to byte array */
+   /** pointer to character array */
uint8_t *buf;
/** length of the dictionary. */
uint32_t len;
@@ -338,10 +340,7 @@ typedef struct odp_comp_dict_t {
  * Comp API algorithm specific parameters
  *
  */
-typedef struct odp_comp_algo_param_t {
-   /** struct for defining deflate algorithm parameters.
-   * Also initialized by other deflate based algorithms , ex. ZLIB
-   */
+typedef struct odp_comp_alg_param_t {
 

[lng-odp] [PATCH API-NEXT v15 2/9] linux-gen: pktio: loop: support IPsec outbound inline

2017-09-05 Thread Github ODP bot
From: Dmitry Eremin-Solenikov 

Add support for outbound inline IPsec packet processing on loop
interface.

Signed-off-by: Dmitry Eremin-Solenikov 
---
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
 platform/linux-generic/pktio/loop.c | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/platform/linux-generic/pktio/loop.c 
b/platform/linux-generic/pktio/loop.c
index 428b6ceb..6cc86e6a 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -164,6 +164,22 @@ static int loopback_send(pktio_entry_t *pktio_entry, int 
index ODP_UNUSED,
bytes += odp_packet_len(pkt_tbl[i]);
}
 
+   if (pktio_entry->s.config.outbound_ipsec)
+   for (i = 0; i < len; ++i) {
+   odp_buffer_t buf = buf_from_buf_hdr(hdr_tbl[i]);
+   odp_ipsec_packet_result_t result;
+
+   if (_odp_buffer_event_subtype(buf) !=
+   ODP_EVENT_PACKET_IPSEC)
+   continue;
+
+   /* Possibly postprocessing packet */
+   odp_ipsec_result(, pkt_tbl[i]);
+
+   _odp_buffer_event_subtype_set(buf,
+ ODP_EVENT_PACKET_BASIC);
+   }
+
odp_ticketlock_lock(_entry->s.txl);
 
queue = queue_fn->from_ext(pktio_entry->s.pkt_loop.loopq);
@@ -213,6 +229,8 @@ static int loopback_capability(pktio_entry_t *pktio_entry 
ODP_UNUSED,
odp_pktio_config_init(>config);
capa->config.pktin.bit.ts_all = 1;
capa->config.pktin.bit.ts_ptp = 1;
+   capa->config.outbound_ipsec = 1;
+
return 0;
 }
 



[lng-odp] [PATCH API-NEXT v15 0/9] IPsec implementation based on packet interface

2017-09-05 Thread Github ODP bot
This PR replaces #28 by providing new IPsec implementation based on latest API 
additions.

github
/** Email created from pull request 81 (lumag:ipsec-packet-impl-2)
 ** https://github.com/Linaro/odp/pull/81
 ** Patch: https://github.com/Linaro/odp/pull/81.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: 3ec7da960bd3d497e998f18cb30a2480296e7b6d
 **/
/github

checkpatch.pl
CHECK: Avoid CamelCase: 
#808: FILE: test/common_plat/validation/api/ipsec/ipsec.c:715:
+   for (i = 0; suite[i].pName; i++) {

CHECK: Alignment should match open parenthesis
#2564: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:18:
+KEY(key_a5_128, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+   0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5);

CHECK: Alignment should match open parenthesis
#2566: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:20:
+KEY(key_5a_128, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
+   0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a);

CHECK: Alignment should match open parenthesis
#2568: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:22:
+KEY(key_a5_256, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+   0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,

CHECK: Alignment should match open parenthesis
#2572: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:26:
+KEY(key_5a_256, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
+   0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,

CHECK: Alignment should match open parenthesis
#2577: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:31:
+KEY(key_rfc3602, 0x90, 0xd3, 0x82, 0xb4, 0x10, 0xee, 0xba, 0x7a,
+0xd9, 0x38, 0xc4, 0x6c, 0xec, 0x1a, 0x82, 0xbf);

CHECK: Alignment should match open parenthesis
#2579: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:33:
+KEY(key_rfc3602_2, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+  0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef);

CHECK: Alignment should match open parenthesis
#2581: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:35:
+KEY(key_mcgrew_gcm_2, 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
+ 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08);

CHECK: Alignment should match open parenthesis
#2584: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:38:
+KEY(key_mcgrew_gcm_3, 0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
+ 0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab,

CHECK: Alignment should match open parenthesis
#2589: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:43:
+KEY(key_mcgrew_gcm_4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);

CHECK: Alignment should match open parenthesis
#2592: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:46:
+KEY(key_mcgrew_gcm_12, 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25,
+  0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47);

total: 0 errors, 0 warnings, 11 checks, 3401 lines checked


to_send-p-000.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 30 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 20 lines checked


to_send-p-002.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 164 lines checked


to_send-p-003.patch has no obvious style problems and is ready for submission.
CHECK: Please don't use multiple blank lines
#131: FILE: platform/linux-generic/odp_packet.c:2456:
+
+

total: 0 errors, 0 warnings, 1 checks, 124 lines checked


to_send-p-004.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 17 lines checked


to_send-p-005.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 333 lines checked


to_send-p-006.patch has no obvious style problems and is ready for submission.
ERROR: space prohibited after that '&' (ctx:WxW)
#434: FILE: platform/linux-generic/odp_ipsec_sad.c:133:
+   if (state & IPSEC_SA_STATE_DISABLE)
  ^

ERROR: space prohibited after that '-' (ctx:WxW)
#452: FILE: platform/linux-generic/odp_ipsec_sad.c:151:
+state - 1);
   ^

ERROR: space prohibited after that '&' (ctx:WxW)
#668: FILE: platform/linux-generic/odp_ipsec_sad.c:367:
+   if (state & 

[lng-odp] [PATCH API-NEXT v12 6/6] comp compression API

2017-09-05 Thread Github ODP bot
From: Shally Verma 

Signed-off-by: Mahipal Challa 
Signed-off-by: Shally Verma 
Cc: Narayan Prasad Athreya 
---
/** Email created from pull request 102 (1234sv:api-next)
 ** https://github.com/Linaro/odp/pull/102
 ** Patch: https://github.com/Linaro/odp/pull/102.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 5a3875bda93ff56c76538aa76f8a943651e0919a
 **/
 include/odp/api/spec/comp.h | 463 +---
 1 file changed, 259 insertions(+), 204 deletions(-)

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
index 2956094c..c04bafcf 100644
--- a/include/odp/api/spec/comp.h
+++ b/include/odp/api/spec/comp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, Linaro Limited
+/* Copyright (c) 2017, Linaro Limited
  * All rights reserved.
  *
  * SPDX-License-Identifier:BSD-3-Clause
@@ -14,24 +14,23 @@
 #define ODP_API_COMP_H_
 
 #include 
+#include 
+#include 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include 
-#include 
-
 /** @defgroup odp_compression ODP COMP
- *  ODP Compression defines API set to compress/decompress along with hash
+ *  ODP Compression is an API set to do compression+hash or decompression+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
+ *  if opcode = ODP_COMP_COMPRESS, then it will apply hash and then compress,
+ *  if opcode = ODP_COMP_DECOMPRESS, then it will decompress and then 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.
+ *  Macros, enums, types and operations to utilize compression interface.
  *  @{
  */
 
@@ -60,7 +59,7 @@ typedef enum {
  *
  */
 typedef enum {
-   /** Compress  */
+   /** Compress */
ODP_COMP_OP_COMPRESS,
/** Decompress */
ODP_COMP_OP_DECOMPRESS
@@ -71,11 +70,13 @@ typedef enum {
  *
  */
 typedef enum {
-   /** ODP_COMP_HASH_ALG_NONE*/
+   /** ODP_COMP_HASH_ALG_NONE - No hash algorithm selected. */
ODP_COMP_HASH_ALG_NONE,
-   /** ODP_COMP_HASH_ALG_SHA1*/
+   /** ODP_COMP_HASH_ALG_SHA1 - SHA-1 hash algorithm. */
ODP_COMP_HASH_ALG_SHA1,
-   /**  ODP_COMP_HASH_ALG_SHA256*/
+   /** ODP_COMP_HASH_ALG_SHA256 - SHA-2 hash algorithm
+   * 256-bit digest length.
+   */
ODP_COMP_HASH_ALG_SHA256
 } odp_comp_hash_alg_t;
 
@@ -195,10 +196,10 @@ typedef enum {
 typedef union odp_comp_hash_algos_t {
/** hash algorithms */
struct {
-   /** SHA-1 */
+   /** ODP_COMP_HASH_ALG_SHA1 */
uint32_t sha1  : 1;
 
-   /** SHA with 256 bits of Message Digest */
+   /** ODP_COMP_HASH_ALG_SHA256 */
uint32_t sha256 : 1;
 
} bit;
@@ -247,14 +248,10 @@ typedef struct odp_comp_capability_t {
uint32_t max_sessions;
 
/** Supported compression algorithms */
-   odp_comp_algos_t comp_algs;
+   odp_comp_algos_t comp_algos;
 
/** Supported hash algorithms. */
-   odp_comp_hash_algos_t hash_algs;
-
-   /* sync/async mode of operation support.
-* Implementation should support atleast one of the mode.
-*/
+   odp_comp_hash_algos_t hash_algos;
 
/** Support type for synchronous operation mode (ODP_COMP_SYNC).
 *  User should set odp_comp_session_param_t:mode based on
@@ -282,7 +279,7 @@ typedef struct odp_comp_hash_alg_capability_t {
  * Compression algorithm capabilities structure for each algorithm.
  *
  */
-typedef struct odp_comp_alg_capability_t {
+typedef struct odp_comp_algo_capability_t {
/** Enumeration indicating alg support for dictionary load */
odp_support_t support_dict;
 
@@ -322,15 +319,16 @@ typedef struct odp_comp_alg_capability_t {
uint32_t max_level;
 
/* Supported hash algorithms */
-   odp_comp_hash_algos_t hash_alg;
-} odp_comp_alg_capability_t;
+   odp_comp_hash_algos_t hash_algo;
+} odp_comp_algo_capability_t;
 
 /**
  * Comp API dictionary type
- *
+ * Consists of pointer to byte buffer. length of dictionary
+ * indicated by length parameter.
  */
 typedef struct odp_comp_dict_t {
-   /** pointer to character array */
+   /** pointer to byte array */
uint8_t *buf;
/** length of the dictionary. */
uint32_t len;
@@ -340,7 +338,10 @@ typedef struct odp_comp_dict_t {
  * Comp API algorithm specific parameters
  *
  */
-typedef struct odp_comp_alg_param_t {
+typedef struct odp_comp_algo_param_t {
+   /** struct for defining deflate algorithm parameters.
+   * Also initialized by other deflate based algorithms , ex. ZLIB
+   */
  

[lng-odp] [PATCH API-NEXT v12 3/6] comp compression spec

2017-09-05 Thread Github ODP bot
From: Shally Verma 

---
/** Email created from pull request 102 (1234sv:api-next)
 ** https://github.com/Linaro/odp/pull/102
 ** Patch: https://github.com/Linaro/odp/pull/102.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 5a3875bda93ff56c76538aa76f8a943651e0919a
 **/
 include/odp/api/spec/comp.h | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)
 mode change 100644 => 100755 include/odp/api/spec/comp.h

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
old mode 100644
new mode 100755
index 21a3bdb1..f084f4bf
--- a/include/odp/api/spec/comp.h
+++ b/include/odp/api/spec/comp.h
@@ -457,8 +457,12 @@ typedef struct odp_comp_packet_op_param_t {
 */
odp_bool_t last;
 
-   /** Valid Data range */
-   odp_packet_data_range_t data_range;
+   /** Input data range */
+   odp_packet_data_range_t indata_range;
+
+   /** Output packet data range. Indicates where
+   * processed packet output will be written.
+   */
 } odp_comp_packet_op_param_t;
 
 /**
@@ -702,8 +706,8 @@ int odp_comp_decompress(const odp_packet_t pkt_in[],
  * @retval <0 on failure
  */
 int odp_comp_compress_enq(const odp_packet_t pkt_in[],
- const odp_packet_t pkt_out[],
- const odp_crypto_packet_op_param_t param[],
+ odp_packet_t pkt_out[],
+ odp_comp_packet_op_param_t param[],
  int num_pkt);
 
 /**
@@ -750,8 +754,8 @@ int odp_comp_compress_enq(const odp_packet_t pkt_in[],
  * @retval <0 on failure
  */
 int odp_comp_decompress_enq(const odp_packet_t pkt_in[],
-   const odp_packet_t pkt_out[],
-   const odp_crypto_packet_op_param_t param[],
+   odp_packet_t pkt_out[],
+   odp_crypto_packet_op_param_t param[],
int num_pkt);
 
  /**



[lng-odp] [PATCH API-NEXT v12 2/6] comp compression API

2017-09-05 Thread Github ODP bot
From: Shally Verma 

Signed-off-by:shally.ve...@cavium.com
Signed-off-by:mahipal.cha...@cavium.com Cc prasadathreya.naray...@cavium.com
---
/** Email created from pull request 102 (1234sv:api-next)
 ** https://github.com/Linaro/odp/pull/102
 ** Patch: https://github.com/Linaro/odp/pull/102.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 5a3875bda93ff56c76538aa76f8a943651e0919a
 **/
 include/odp/api/spec/comp.h | 427 +++-
 1 file changed, 226 insertions(+), 201 deletions(-)

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
index 2956094c..21a3bdb1 100644
--- a/include/odp/api/spec/comp.h
+++ b/include/odp/api/spec/comp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, Linaro Limited
+/* Copyright (c) 2017, Linaro Limited
  * All rights reserved.
  *
  * SPDX-License-Identifier:BSD-3-Clause
@@ -14,24 +14,23 @@
 #define ODP_API_COMP_H_
 
 #include 
+#include 
+#include 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include 
-#include 
-
 /** @defgroup odp_compression ODP COMP
- *  ODP Compression defines API set to compress/decompress along with hash
+ *  ODP Compression is an API set to do compression+hash or decompression+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
+ *  if opcode = ODP_COMP_COMPRESS, then it will apply hash and then compress,
+ *  if opcode = ODP_COMP_DECOMPRESS, then it will decompress and then 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.
+ *  Macros, enums, types and operations to utilize compression interface.
  *  @{
  */
 
@@ -60,7 +59,7 @@ typedef enum {
  *
  */
 typedef enum {
-   /** Compress  */
+   /** Compress */
ODP_COMP_OP_COMPRESS,
/** Decompress */
ODP_COMP_OP_DECOMPRESS
@@ -71,11 +70,13 @@ typedef enum {
  *
  */
 typedef enum {
-   /** ODP_COMP_HASH_ALG_NONE*/
+   /** ODP_COMP_HASH_ALG_NONE - No hash algorithm selected. */
ODP_COMP_HASH_ALG_NONE,
-   /** ODP_COMP_HASH_ALG_SHA1*/
+   /** ODP_COMP_HASH_ALG_SHA1 - SHA-1 hash algorithm. */
ODP_COMP_HASH_ALG_SHA1,
-   /**  ODP_COMP_HASH_ALG_SHA256*/
+   /** ODP_COMP_HASH_ALG_SHA256 - SHA-2 hash algorithm
+   * 256-bit digest length.
+   */
ODP_COMP_HASH_ALG_SHA256
 } odp_comp_hash_alg_t;
 
@@ -195,10 +196,10 @@ typedef enum {
 typedef union odp_comp_hash_algos_t {
/** hash algorithms */
struct {
-   /** SHA-1 */
+   /** ODP_COMP_HASH_ALG_SHA1 */
uint32_t sha1  : 1;
 
-   /** SHA with 256 bits of Message Digest */
+   /** ODP_COMP_HASH_ALG_SHA256 */
uint32_t sha256 : 1;
 
} bit;
@@ -247,14 +248,10 @@ typedef struct odp_comp_capability_t {
uint32_t max_sessions;
 
/** Supported compression algorithms */
-   odp_comp_algos_t comp_algs;
+   odp_comp_algos_t comp_algos;
 
/** Supported hash algorithms. */
-   odp_comp_hash_algos_t hash_algs;
-
-   /* sync/async mode of operation support.
-* Implementation should support atleast one of the mode.
-*/
+   odp_comp_hash_algos_t hash_algos;
 
/** Support type for synchronous operation mode (ODP_COMP_SYNC).
 *  User should set odp_comp_session_param_t:mode based on
@@ -282,7 +279,7 @@ typedef struct odp_comp_hash_alg_capability_t {
  * Compression algorithm capabilities structure for each algorithm.
  *
  */
-typedef struct odp_comp_alg_capability_t {
+typedef struct odp_comp_algo_capability_t {
/** Enumeration indicating alg support for dictionary load */
odp_support_t support_dict;
 
@@ -322,15 +319,16 @@ typedef struct odp_comp_alg_capability_t {
uint32_t max_level;
 
/* Supported hash algorithms */
-   odp_comp_hash_algos_t hash_alg;
-} odp_comp_alg_capability_t;
+   odp_comp_hash_algos_t hash_algo;
+} odp_comp_algo_capability_t;
 
 /**
  * Comp API dictionary type
- *
+ * Consists of pointer to byte buffer. length of dictionary
+ * indicated by length parameter.
  */
 typedef struct odp_comp_dict_t {
-   /** pointer to character array */
+   /** pointer to byte array */
uint8_t *buf;
/** length of the dictionary. */
uint32_t len;
@@ -340,7 +338,10 @@ typedef struct odp_comp_dict_t {
  * Comp API algorithm specific parameters
  *
  */
-typedef struct odp_comp_alg_param_t {
+typedef struct odp_comp_algo_param_t {
+   /** struct for defining deflate algorithm parameters.
+   * Also initialized by other deflate based algorithms , ex. ZLIB
+   */
struct comp_alg_def_param {

[lng-odp] [PATCH API-NEXT v12 4/6] comp compression spec

2017-09-05 Thread Github ODP bot
From: Shally Verma 

---
/** Email created from pull request 102 (1234sv:api-next)
 ** https://github.com/Linaro/odp/pull/102
 ** Patch: https://github.com/Linaro/odp/pull/102.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 5a3875bda93ff56c76538aa76f8a943651e0919a
 **/
 include/odp/api/spec/comp.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 include/odp/api/spec/comp.h

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
old mode 100755
new mode 100644



[lng-odp] [PATCH API-NEXT v12 0/6] comp: compression spec

2017-09-05 Thread Github ODP bot
This patch addresses review comments on v4 Patch.
Main changes:
-Changed event type to ODP_EVENT_PACKET and
subtype to ODP_EVENT_PACKET_COMP

github
/** Email created from pull request 102 (1234sv:api-next)
 ** https://github.com/Linaro/odp/pull/102
 ** Patch: https://github.com/Linaro/odp/pull/102.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 5a3875bda93ff56c76538aa76f8a943651e0919a
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 815 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
WARNING: Use a single space after Signed-off-by:
#7: 
Signed-off-by:shally.ve...@cavium.com

WARNING: Use a single space after Signed-off-by:
#8: 
Signed-off-by:mahipal.cha...@cavium.com Cc prasadathreya.naray...@cavium.com

total: 0 errors, 2 warnings, 0 checks, 614 lines checked


to_send-p-001.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: do not set execute permissions for source files
#20: FILE: include/odp/api/spec/comp.h

ERROR: Missing Signed-off-by: line(s)

total: 2 errors, 0 warnings, 0 checks, 34 lines checked


to_send-p-002.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Does not appear to be a unified-diff format patch

total: 1 errors, 0 warnings, 0 checks, 0 lines checked


to_send-p-003.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 0 checks, 617 lines checked


to_send-p-004.patch has no obvious style problems and is ready for submission.
ERROR: trailing whitespace
#496: FILE: include/odp/api/spec/comp.h:716:
+ * User should compute processed data len = total output len - digest_len,^M$

ERROR: trailing whitespace
#497: FILE: include/odp/api/spec/comp.h:717:
+ *  where digest_len queried through odp_comp_hash_alg_capability().^M$

total: 2 errors, 0 warnings, 0 checks, 648 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
  scripts/cleanfile


to_send-p-005.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
/checkpatch.pl


[lng-odp] [PATCH API-NEXT v12 1/6] comp: compression spec

2017-09-05 Thread Github ODP bot
From: Shally Verma 

Signed-off-by: Shally Verma 
Signed-off-by: Mahipal Challa  Cc 
prasadathreya.naray...@cavium.com
---
/** Email created from pull request 102 (1234sv:api-next)
 ** https://github.com/Linaro/odp/pull/102
 ** Patch: https://github.com/Linaro/odp/pull/102.patch
 ** Base sha: 8390f890d4bd2babb63a24f7b15d2f4763e44050
 ** Merge commit sha: 5a3875bda93ff56c76538aa76f8a943651e0919a
 **/
 include/odp/api/spec/comp.h | 815 
 1 file changed, 815 insertions(+)
 create mode 100644 include/odp/api/spec/comp.h

diff --git a/include/odp/api/spec/comp.h b/include/odp/api/spec/comp.h
new file mode 100644
index ..2956094c
--- /dev/null
+++ b/include/odp/api/spec/comp.h
@@ -0,0 +1,815 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP Compression
+ */
+
+#ifndef ODP_API_COMP_H_
+#define ODP_API_COMP_H_
+
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include 
+#include 
+
+/** @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
+ */
+
+/**
+ * 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,
+   /** 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).
+   *
+   * if using async mode, application should either make sure to
+   * provide sufficient output buffer size OR maintain relevant
+   * context (or ordering) information with respect to each input packet
+   * en-queued for processing.
+   *
+   */
+   ODP_COMP_ERR_OUT_OF_SPACE,
+   /** 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,
+   /** Error if operation has been requested in an invalid state */
+   ODP_COMP_ERR_INV_STATE,
+   /** Error if API does not support any of the operational parameter. */
+   ODP_COMP_ERR_NOT_SUPPORTED,
+   /** Error if session is invalid. */
+   

[lng-odp] [PATCH v4 2/5] linux-gen: dpdk: enable per pktio RX IP/UDP/TCP checksum offload

2017-09-05 Thread Github ODP bot
From: Bogdan Pricope 

Signed-off-by: Bogdan Pricope 
---
/** Email created from pull request 124 (bogdanPricope:dpdk_hw_csum_pr)
 ** https://github.com/Linaro/odp/pull/124
 ** Patch: https://github.com/Linaro/odp/pull/124.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 086fe31f96e49f97f945702d0691f019245b959c
 **/
 platform/linux-generic/pktio/dpdk.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/platform/linux-generic/pktio/dpdk.c 
b/platform/linux-generic/pktio/dpdk.c
index 8d1dcd84..f2a54b75 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -668,6 +668,7 @@ static int dpdk_setup_port(pktio_entry_t *pktio_entry)
int ret;
pkt_dpdk_t *pkt_dpdk = _entry->s.pkt_dpdk;
struct rte_eth_rss_conf rss_conf;
+   uint16_t hw_ip_checksum = 0;
 
/* Always set some hash functions to enable DPDK RSS hash calculation */
if (pkt_dpdk->hash.all_bits == 0) {
@@ -677,12 +678,17 @@ static int dpdk_setup_port(pktio_entry_t *pktio_entry)
rss_conf_to_hash_proto(_conf, _dpdk->hash);
}
 
+   if (pktio_entry->s.config.pktin.bit.ipv4_chksum ||
+   pktio_entry->s.config.pktin.bit.udp_chksum ||
+   pktio_entry->s.config.pktin.bit.tcp_chksum)
+   hw_ip_checksum = 1;
+
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
.split_hdr_size = 0,
.header_split   = 0,
-   .hw_ip_checksum = 0,
+   .hw_ip_checksum = hw_ip_checksum,
.hw_vlan_filter = 0,
.hw_strip_crc   = 0,
.enable_scatter = 0,



[lng-odp] [PATCH v4 0/5] dpdk pktio: enable hardware checksum support

2017-09-05 Thread Github ODP bot
Add HW checksum calculation/validation support for dpdk pktio.
Note: No UDP/TCP HW checksum calculation/validation support for:

IPv4 fragments
IPv6 packets with extension headers (including fragments)

github
/** Email created from pull request 124 (bogdanPricope:dpdk_hw_csum_pr)
 ** https://github.com/Linaro/odp/pull/124
 ** Patch: https://github.com/Linaro/odp/pull/124.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 086fe31f96e49f97f945702d0691f019245b959c
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 69 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 25 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 85 lines checked


to_send-p-002.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 150 lines checked


to_send-p-003.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 360 lines checked


to_send-p-004.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [PATCH v4 5/5] examples: generator: update odp_generator to use HW checksum capabilities

2017-09-05 Thread Github ODP bot
From: Bogdan Pricope 

Signed-off-by: Bogdan Pricope 
---
/** Email created from pull request 124 (bogdanPricope:dpdk_hw_csum_pr)
 ** https://github.com/Linaro/odp/pull/124
 ** Patch: https://github.com/Linaro/odp/pull/124.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 086fe31f96e49f97f945702d0691f019245b959c
 **/
 example/generator/odp_generator.c | 155 ++
 1 file changed, 123 insertions(+), 32 deletions(-)

diff --git a/example/generator/odp_generator.c 
b/example/generator/odp_generator.c
index f3ec43be..df18ea80 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -46,6 +46,7 @@
 
 typedef struct {
odp_pktio_t pktio;
+   odp_pktio_config_t config;
odp_pktout_queue_t pktout[MAX_WORKERS];
unsigned pktout_count;
 } interface_t;
@@ -91,7 +92,16 @@ static struct {
 /** * Thread specific arguments
  */
 typedef struct {
-   odp_pktout_queue_t pktout; /**< Packet output queue to use*/
+   union {
+   struct {
+   odp_pktout_queue_t pktout; /**< Packet output queue */
+   odp_pktout_config_opt_t *pktout_cfg; /**< Packet output 
config*/
+   } tx;
+   struct {
+   interface_t *ifs; /**< Interfaces array */
+   int ifs_count; /**< Interfaces array size */
+   } rx;
+   };
odp_pool_t pool;/**< Pool for packet IO */
odp_timer_pool_t tp;/**< Timer pool handle */
odp_queue_t tq; /**< Queue for timeouts */
@@ -116,6 +126,11 @@ static args_t *args;
 /** Barrier to sync threads execution */
 static odp_barrier_t barrier;
 
+/** Packet processing function types */
+typedef odp_packet_t (*setup_pkt_ref_fn_t)(odp_pool_t,
+  odp_pktout_config_opt_t *);
+typedef int (*setup_pkt_fn_t)(odp_packet_t, odp_pktout_config_opt_t *);
+
 /* helper funcs */
 static void parse_args(int argc, char *argv[], appl_args_t *appl_args);
 static void print_info(char *progname, appl_args_t *appl_args);
@@ -190,20 +205,22 @@ static int scan_ip(char *buf, unsigned int *paddr)
  * Setup array of reference packets
  *
  * @param pool Packet pool
+ * @param pktout_cfg Interface output configuration
  * @param pkt_ref_array Packet array
  * @param pkt_ref_array_size Packet array size
  * @param setup_ref Packet setup function
  * @return 0 success, -1 failed
 */
 static int setup_pkt_ref_array(odp_pool_t pool,
+  odp_pktout_config_opt_t *pktout_cfg,
   odp_packet_t *pkt_ref_array,
   int pkt_ref_array_size,
-  odp_packet_t (*setup_ref)(odp_pool_t))
+  setup_pkt_ref_fn_t setup_ref)
 {
int i;
 
for (i = 0; i < pkt_ref_array_size; i++) {
-   pkt_ref_array[i] = (*setup_ref)(pool);
+   pkt_ref_array[i] = (*setup_ref)(pool, pktout_cfg);
if (pkt_ref_array[i] == ODP_PACKET_INVALID)
break;
}
@@ -218,21 +235,23 @@ static int setup_pkt_ref_array(odp_pool_t pool,
 /**
  * Setup array of packets
  *
+ * @param pktout_cfg Interface output configuration
  * @param pkt_ref_array Reference packet array
  * @param pkt_array Packet array
  * @param pkt_array_size Packet array size
  * @param setup_pkt Packet setup function
  * @return 0 success, -1 failed
 */
-static int setup_pkt_array(odp_packet_t *pkt_ref_array,
+static int setup_pkt_array(odp_pktout_config_opt_t *pktout_cfg,
+  odp_packet_t *pkt_ref_array,
   odp_packet_t  *pkt_array,
   int pkt_array_size,
-  int (*setup_pkt)(odp_packet_t))
+  setup_pkt_fn_t setup_pkt)
 {
int i;
 
for (i = 0; i < pkt_array_size; i++) {
-   if ((*setup_pkt)(pkt_ref_array[i]))
+   if ((*setup_pkt)(pkt_ref_array[i], pktout_cfg))
break;
 
pkt_array[i] = odp_packet_ref_static(pkt_ref_array[i]);
@@ -252,13 +271,15 @@ static int setup_pkt_array(odp_packet_t *pkt_ref_array,
  * set up an udp packet reference
  *
  * @param pool Buffer pool to create packet in
+ * @param pktout_cfg Interface output configuration
  *
  *
  * @retval Handle of created packet
  * @retval ODP_PACKET_INVALID  Packet could not be created
  *
  */
-static odp_packet_t setup_udp_pkt_ref(odp_pool_t pool)
+static odp_packet_t setup_udp_pkt_ref(odp_pool_t pool,
+ odp_pktout_config_opt_t *pktout_cfg)
 {
odp_packet_t pkt;
char *buf;
@@ -302,8 +323,10 @@ static odp_packet_t setup_udp_pkt_ref(odp_pool_t pool)
udp->src_port = odp_cpu_to_be_16(args->appl.srcport);
udp->dst_port 

[lng-odp] [PATCH v4 3/5] linux-gen: dpdk: RX - process checksum validation offload flags

2017-09-05 Thread Github ODP bot
From: Bogdan Pricope 

Signed-off-by: Bogdan Pricope 
---
/** Email created from pull request 124 (bogdanPricope:dpdk_hw_csum_pr)
 ** https://github.com/Linaro/odp/pull/124
 ** Patch: https://github.com/Linaro/odp/pull/124.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 086fe31f96e49f97f945702d0691f019245b959c
 **/
 platform/linux-generic/pktio/dpdk.c | 55 +
 1 file changed, 55 insertions(+)

diff --git a/platform/linux-generic/pktio/dpdk.c 
b/platform/linux-generic/pktio/dpdk.c
index f2a54b75..891adcd5 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -303,6 +303,44 @@ static struct rte_mempool_ops ops_stack = {
 
 MEMPOOL_REGISTER_OPS(ops_stack);
 
+#define HAS_IP4_CSUM_FLAG(m, f) ((m->ol_flags & PKT_RX_IP_CKSUM_MASK) == f)
+#define HAS_L4_PROTO(m, proto) ((m->packet_type & RTE_PTYPE_L4_MASK) == proto)
+#define HAS_L4_CSUM_FLAG(m, f) ((m->ol_flags & PKT_RX_L4_CKSUM_MASK) == f)
+
+#define PKTIN_CSUM_BITS 0x1C
+
+static inline int pkt_set_ol_rx(odp_pktin_config_opt_t *pktin_cfg,
+   odp_packet_hdr_t *pkt_hdr,
+   struct rte_mbuf *mbuf)
+{
+   if (pktin_cfg->bit.ipv4_chksum &&
+   RTE_ETH_IS_IPV4_HDR(mbuf->packet_type) &&
+   HAS_IP4_CSUM_FLAG(mbuf, PKT_RX_IP_CKSUM_BAD)) {
+   if (pktin_cfg->bit.drop_ipv4_err)
+   return -1;
+
+   pkt_hdr->p.error_flags.ip_err = 1;
+   }
+
+   if (pktin_cfg->bit.udp_chksum &&
+   HAS_L4_PROTO(mbuf, RTE_PTYPE_L4_UDP) &&
+   HAS_L4_CSUM_FLAG(mbuf, PKT_RX_L4_CKSUM_BAD)) {
+   if (pktin_cfg->bit.drop_udp_err)
+   return -1;
+
+   pkt_hdr->p.error_flags.udp_err = 1;
+   } else if (pktin_cfg->bit.tcp_chksum &&
+  HAS_L4_PROTO(mbuf, RTE_PTYPE_L4_TCP)  &&
+  HAS_L4_CSUM_FLAG(mbuf, PKT_RX_L4_CKSUM_BAD)) {
+   if (pktin_cfg->bit.drop_tcp_err)
+   return -1;
+
+   pkt_hdr->p.error_flags.tcp_err = 1;
+   }
+
+   return 0;
+}
+
 static inline int mbuf_to_pkt(pktio_entry_t *pktio_entry,
  odp_packet_t pkt_table[],
  struct rte_mbuf *mbuf_table[],
@@ -317,6 +355,7 @@ static inline int mbuf_to_pkt(pktio_entry_t *pktio_entry,
int nb_pkts = 0;
int alloc_len, num;
odp_pool_t pool = pktio_entry->s.pkt_dpdk.pool;
+   odp_pktin_config_opt_t *pktin_cfg = _entry->s.config.pktin;
 
/* Allocate maximum sized packets */
alloc_len = pktio_entry->s.pkt_dpdk.data_room;
@@ -371,6 +410,14 @@ static inline int mbuf_to_pkt(pktio_entry_t *pktio_entry,
 
packet_set_ts(pkt_hdr, ts);
 
+   if (pktin_cfg->all_bits & PKTIN_CSUM_BITS) {
+   if (pkt_set_ol_rx(pktin_cfg, pkt_hdr, mbuf)) {
+   odp_packet_free(pkt);
+   rte_pktmbuf_free(mbuf);
+   continue;
+   }
+   }
+
pkt_table[nb_pkts++] = pkt;
 
rte_pktmbuf_free(mbuf);
@@ -437,6 +484,7 @@ static inline int mbuf_to_pkt_zero(pktio_entry_t 
*pktio_entry,
int i;
int nb_pkts = 0;
odp_pool_t pool = pktio_entry->s.pkt_dpdk.pool;
+   odp_pktin_config_opt_t *pktin_cfg = _entry->s.config.pktin;
 
for (i = 0; i < mbuf_num; i++) {
odp_packet_hdr_t parsed_hdr;
@@ -482,6 +530,13 @@ static inline int mbuf_to_pkt_zero(pktio_entry_t 
*pktio_entry,
 
packet_set_ts(pkt_hdr, ts);
 
+   if (pktin_cfg->all_bits & PKTIN_CSUM_BITS) {
+   if (pkt_set_ol_rx(pktin_cfg, pkt_hdr, mbuf)) {
+   rte_pktmbuf_free(mbuf);
+   continue;
+   }
+   }
+
pkt_table[nb_pkts++] = pkt;
}
 



[lng-odp] [PATCH v4 4/5] linux-gen: dpdk: TX - set checksum calculation offload flags

2017-09-05 Thread Github ODP bot
From: Bogdan Pricope 

Signed-off-by: Bogdan Pricope 
---
/** Email created from pull request 124 (bogdanPricope:dpdk_hw_csum_pr)
 ** https://github.com/Linaro/odp/pull/124
 ** Patch: https://github.com/Linaro/odp/pull/124.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 086fe31f96e49f97f945702d0691f019245b959c
 **/
 platform/linux-generic/pktio/dpdk.c | 108 
 1 file changed, 108 insertions(+)

diff --git a/platform/linux-generic/pktio/dpdk.c 
b/platform/linux-generic/pktio/dpdk.c
index 891adcd5..26ca0d6b 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -32,6 +32,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 #if ODP_DPDK_ZERO_COPY
@@ -434,6 +438,95 @@ static inline int mbuf_to_pkt(pktio_entry_t *pktio_entry,
return (i > 0 ? i : -1);
 }
 
+static inline int check_proto(void *l3_hdr, odp_bool_t *l3_proto_v4,
+ uint8_t *l4_proto)
+{
+   uint8_t l3_proto_ver = _ODP_IPV4HDR_VER(*(uint8_t *)l3_hdr);
+
+   if (l3_proto_ver == _ODP_IPV4) {
+   struct ipv4_hdr *ip = (struct ipv4_hdr *)l3_hdr;
+
+   *l3_proto_v4 = 1;
+   if (!rte_ipv4_frag_pkt_is_fragmented(ip))
+   *l4_proto = ip->next_proto_id;
+   else
+   *l4_proto = 0;
+
+   return 0;
+   } else if (l3_proto_ver == _ODP_IPV6) {
+   struct ipv6_hdr *ipv6 = (struct ipv6_hdr *)l3_hdr;
+
+   *l3_proto_v4 = 0;
+   *l4_proto = ipv6->proto;
+   return 0;
+   }
+
+   return -1;
+}
+
+static inline uint16_t phdr_csum(odp_bool_t ipv4, void *l3_hdr,
+uint64_t ol_flags)
+{
+   if (ipv4)
+   return rte_ipv4_phdr_cksum(l3_hdr, ol_flags);
+   else /*ipv6*/
+   return rte_ipv6_phdr_cksum(l3_hdr, ol_flags);
+}
+
+static inline void pkt_set_ol_tx(odp_pktout_config_opt_t *pktout_cfg,
+odp_packet_hdr_t *pkt_hdr,
+struct rte_mbuf *mbuf,
+char *mbuf_data)
+{
+   void *l3_hdr, *l4_hdr;
+   uint8_t l4_proto;
+   odp_bool_t l3_proto_v4;
+   odp_bool_t ipv4_chksum_pkt, udp_chksum_pkt, tcp_chksum_pkt;
+   packet_parser_t *pkt_p = _hdr->p;
+
+   l3_hdr = (void *)(mbuf_data + pkt_p->l3_offset);
+
+   if (check_proto(l3_hdr, _proto_v4, _proto))
+   return;
+
+   ipv4_chksum_pkt = pktout_cfg->bit.ipv4_chksum && l3_proto_v4;
+   udp_chksum_pkt =  pktout_cfg->bit.udp_chksum &&
+   (l4_proto == _ODP_IPPROTO_UDP);
+   tcp_chksum_pkt = pktout_cfg->bit.tcp_chksum &&
+   (l4_proto == _ODP_IPPROTO_TCP);
+
+   if (!ipv4_chksum_pkt && !udp_chksum_pkt && !tcp_chksum_pkt)
+   return;
+
+   mbuf->l2_len = pkt_p->l3_offset - pkt_p->l2_offset;
+   mbuf->l3_len = pkt_p->l4_offset - pkt_p->l3_offset;
+
+   if (l3_proto_v4)
+   mbuf->ol_flags = PKT_TX_IPV4;
+   else
+   mbuf->ol_flags = PKT_TX_IPV6;
+
+   if (ipv4_chksum_pkt) {
+   mbuf->ol_flags |=  PKT_TX_IP_CKSUM;
+
+   ((struct ipv4_hdr *)l3_hdr)->hdr_checksum = 0;
+   }
+
+   l4_hdr = (void *)(mbuf_data + pkt_p->l4_offset);
+
+   if (udp_chksum_pkt) {
+   mbuf->ol_flags |= PKT_TX_UDP_CKSUM;
+
+   ((struct udp_hdr *)l4_hdr)->dgram_cksum =
+   phdr_csum(l3_proto_v4, l3_hdr, mbuf->ol_flags);
+   } else if (tcp_chksum_pkt) {
+   mbuf->ol_flags |= PKT_TX_TCP_CKSUM;
+
+   ((struct tcp_hdr *)l4_hdr)->cksum =
+   phdr_csum(l3_proto_v4, l3_hdr, mbuf->ol_flags);
+   }
+}
+
 static inline int pkt_to_mbuf(pktio_entry_t *pktio_entry,
  struct rte_mbuf *mbuf_table[],
  const odp_packet_t pkt_table[], uint16_t num)
@@ -442,6 +535,7 @@ static inline int pkt_to_mbuf(pktio_entry_t *pktio_entry,
int i, j;
char *data;
uint16_t pkt_len;
+   odp_pktout_config_opt_t *pktout_cfg = _entry->s.config.pktout;
 
if (odp_unlikely((rte_pktmbuf_alloc_bulk(pkt_dpdk->pkt_pool,
 mbuf_table, num {
@@ -461,6 +555,11 @@ static inline int pkt_to_mbuf(pktio_entry_t *pktio_entry,
data = rte_pktmbuf_append(mbuf_table[i], pkt_len);
 
odp_packet_copy_to_mem(pkt_table[i], 0, pkt_len, data);
+
+   if (pktout_cfg->all_bits)
+   pkt_set_ol_tx(pktout_cfg,
+ odp_packet_hdr(pkt_table[i]),
+ mbuf_table[i], data);
}
return i;
 
@@ -549,6 +648,7 @@ static inline 

[lng-odp] [PATCH v4 1/5] linux-gen: dpdk: retrieve offload capabilities

2017-09-05 Thread Github ODP bot
From: Bogdan Pricope 

Signed-off-by: Bogdan Pricope 
---
/** Email created from pull request 124 (bogdanPricope:dpdk_hw_csum_pr)
 ** https://github.com/Linaro/odp/pull/124
 ** Patch: https://github.com/Linaro/odp/pull/124.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 086fe31f96e49f97f945702d0691f019245b959c
 **/
 platform/linux-generic/pktio/dpdk.c | 54 +
 1 file changed, 54 insertions(+)

diff --git a/platform/linux-generic/pktio/dpdk.c 
b/platform/linux-generic/pktio/dpdk.c
index b6d072ab..8d1dcd84 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -899,6 +899,11 @@ static void dpdk_init_capability(pktio_entry_t 
*pktio_entry,
 {
pkt_dpdk_t *pkt_dpdk = _entry->s.pkt_dpdk;
odp_pktio_capability_t *capa = _dpdk->capa;
+   int ptype_cnt;
+   int ptype_l3_ipv4 = 0;
+   int ptype_l4_tcp = 0;
+   int ptype_l4_udp = 0;
+   uint32_t ptype_mask = RTE_PTYPE_L3_MASK | RTE_PTYPE_L4_MASK;
 
memset(dev_info, 0, sizeof(struct rte_eth_dev_info));
memset(capa, 0, sizeof(odp_pktio_capability_t));
@@ -910,9 +915,58 @@ static void dpdk_init_capability(pktio_entry_t 
*pktio_entry,
  PKTIO_MAX_QUEUES);
capa->set_op.op.promisc_mode = 1;
 
+   ptype_cnt = rte_eth_dev_get_supported_ptypes(pkt_dpdk->port_id,
+ptype_mask, NULL, 0);
+   if (ptype_cnt > 0) {
+   uint32_t ptypes[ptype_cnt];
+   int i;
+
+   ptype_cnt = rte_eth_dev_get_supported_ptypes(pkt_dpdk->port_id,
+ptype_mask, ptypes,
+ptype_cnt);
+   for (i = 0; i < ptype_cnt; i++)
+   switch (ptypes[i]) {
+   case RTE_PTYPE_L3_IPV4:
+   /* Fall through */
+   case RTE_PTYPE_L3_IPV4_EXT_UNKNOWN:
+   /* Fall through */
+   case RTE_PTYPE_L3_IPV4_EXT:
+   ptype_l3_ipv4 = 1;
+   break;
+   case RTE_PTYPE_L4_TCP:
+   ptype_l4_tcp = 1;
+   break;
+   case RTE_PTYPE_L4_UDP:
+   ptype_l4_udp = 1;
+   break;
+   }
+   }
+
odp_pktio_config_init(>config);
capa->config.pktin.bit.ts_all = 1;
capa->config.pktin.bit.ts_ptp = 1;
+
+   capa->config.pktin.bit.ipv4_chksum = ptype_l3_ipv4 &&
+   (dev_info->rx_offload_capa & DEV_RX_OFFLOAD_IPV4_CKSUM) ? 1 : 0;
+   if (capa->config.pktin.bit.ipv4_chksum)
+   capa->config.pktin.bit.drop_ipv4_err = 1;
+
+   capa->config.pktin.bit.udp_chksum = ptype_l4_udp &&
+   (dev_info->rx_offload_capa & DEV_RX_OFFLOAD_UDP_CKSUM) ? 1 : 0;
+   if (capa->config.pktin.bit.udp_chksum)
+   capa->config.pktin.bit.drop_udp_err = 1;
+
+   capa->config.pktin.bit.tcp_chksum = ptype_l4_tcp &&
+   (dev_info->rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) ? 1 : 0;
+   if (capa->config.pktin.bit.tcp_chksum)
+   capa->config.pktin.bit.drop_tcp_err = 1;
+
+   capa->config.pktout.bit.ipv4_chksum =
+   (dev_info->tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) ? 1 : 0;
+   capa->config.pktout.bit.udp_chksum =
+   (dev_info->tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) ? 1 : 0;
+   capa->config.pktout.bit.tcp_chksum =
+   (dev_info->tx_offload_capa & DEV_TX_OFFLOAD_TCP_CKSUM) ? 1 : 0;
 }
 
 static int dpdk_open(odp_pktio_t id ODP_UNUSED,



[lng-odp] [PATCH API-NEXT v4 1/1] doc: userguide: document new packet-oriented crypto operations

2017-09-05 Thread Github ODP bot
From: Bill Fischofer 

Crypto now offers two complementary sets of cryptographic APIs: the
original parameter-driven API and a new packet-oriented API designed to
be more flexible and consistent with the protocol-aware APIs introduced
as part of IPsec support. Update the ODP User Guide to include these
new APIs.

Signed-off-by: Bill Fischofer 
---
/** Email created from pull request 150 (Bill-Fischofer-Linaro:crypto-doc)
 ** https://github.com/Linaro/odp/pull/150
 ** Patch: https://github.com/Linaro/odp/pull/150.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: bc91736c78cded105b471e5b17a99f5f46fd3810
 **/
 doc/users-guide/users-guide-crypto.adoc | 120 
 1 file changed, 108 insertions(+), 12 deletions(-)

diff --git a/doc/users-guide/users-guide-crypto.adoc 
b/doc/users-guide/users-guide-crypto.adoc
index c18e369b..029f47b1 100644
--- a/doc/users-guide/users-guide-crypto.adoc
+++ b/doc/users-guide/users-guide-crypto.adoc
@@ -1,8 +1,10 @@
 == Cryptographic services
 
-ODP provides APIs to perform cryptographic operations required by various
-communication protocols (_e.g.,_ IPsec). ODP cryptographic APIs are session
-based.
+ODP provides APIs to perform cryptographic operations required by
+applications. ODP cryptographic APIs are session based and provide
+cryptographic algorithm offload services. ODP also offers cryptographic
+protocol offload services for protocols such as IPsec using a different set
+of APIs. This section covers the main crypto APIs.
 
 ODP provides APIs for following cryptographic services:
 
@@ -11,6 +13,11 @@ ODP provides APIs for following cryptographic services:
 * Random number generation
 * Crypto capability inquiries
 
+Ciphering and authentication services are accessible via two complementary
+sets of related APIs. The original ODP crypto APIs, and a newer
+_packet-oriented_ set of crypto APIs that are designed to be consistent with
+the protocol-aware cryptographic services offered by the IPsec API set.
+
 === Crypto Sessions
 
 To apply a cryptographic operation to a packet a session must be created. All
@@ -29,18 +36,40 @@ Other Session parameters include algorithms, keys, 
initialization vector
 (optional), encode or decode, output queue for async mode and output packet
 pool for allocation of an output packet if required.
 
+The parameters that describe the characteristics of a crypto session are
+encoded in the `odp_crypto_session_param_t` struct that is passed to the
+`odp_crypto_session_create()` API. A successful call returns an
+`odp_crypto_session_t` object that in turn is passed as an input parameter to
+crypto operation calls.
+
+When an application is finished with a crypto session the
+`odp_crypto_session_destroy()` API is used to release the resources associated
+with an `odp_crypto_session_t`.
+
 === Crypto operations
 
 After session creation, a cryptographic operation can be applied to a packet
-using the `odp_crypto_operation()` API. Applications may indicate a preference
-for synchronous or asynchronous processing in the session's `pref_mode`
-parameter.  However crypto operations may complete synchronously even if an
-asynchronous preference is indicated, and applications must examine the
-`posted` output parameter from `odp_crypto_operation()` to determine whether
-the operation has completed or if an `ODP_EVENT_CRYPTO_COMPL` notification is
-expected. In the case of an async operation, the `posted` output parameter
-will be set to true.
-
+in one of two ways.
+
+ Parameter-based Crypto Operations
+This is the original ODP support for cryptographic operations. The
+`odp_crypto_operation()` API takes an input `odp_crypto_op_param_t` struct
+that describes the cryptographic operation to be performed. This struct
+contains the session to use as well as the input packet the operation is to be
+performed on. The caller may either specify an output packet to receive the
+operation results or may request that the ODP implementation allocate a new
+packet to receive these results from the output pool associated with the
+`odp_crypto_session_t`. If the input packet is also used as the output packet,
+then an "in place" operation is requested.
+
+When using the `odp_crypto_operation()` API. Applications may indicate a
+preference for synchronous or asynchronous processing in the session's
+`pref_mode` parameter.  However crypto operations may complete synchronously
+even if an asynchronous preference is indicated, and applications must examine
+the `posted` output parameter from `odp_crypto_operation()` to determine
+whether the operation has completed or if an `ODP_EVENT_CRYPTO_COMPL`
+notification is expected. In the case of an async operation, the `posted`
+output parameter will be set to true.
 
 The operation arguments specify for each packet the areas that are to be
 encrypted or decrypted and authenticated. Also, there is an option of 

[lng-odp] [PATCH API-NEXT v4 0/1] doc: userguide: document new packet-oriented crypto operations

2017-09-05 Thread Github ODP bot
Crypto now offers two complementary sets of cryptographic APIs: the
original parameter-driven API and a new packet-oriented API designed to
be more flexible and consistent with the protocol-aware APIs introduced
as part of IPsec support. Update the ODP User Guide to include these
new APIs.
Signed-off-by: Bill Fischofer bill.fischo...@linaro.org

github
/** Email created from pull request 150 (Bill-Fischofer-Linaro:crypto-doc)
 ** https://github.com/Linaro/odp/pull/150
 ** Patch: https://github.com/Linaro/odp/pull/150.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: bc91736c78cded105b471e5b17a99f5f46fd3810
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 146 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
/checkpatch.pl


[lng-odp] [PATCH API-NEXT v1 1/2] api: schedule: add schedule order unlock lock api

2017-09-05 Thread Github ODP bot
From: Balasubramanian Manoharan 

Adds odp_schedule_order_unlock_lock() api. This API combines schedule order
unlock and lock into a single api for performance optimization in HW.

Signed-off-by: Balasubramanian Manoharan 
---
/** Email created from pull request 160 (bala-manoharan:api_sched_order_lock)
 ** https://github.com/Linaro/odp/pull/160
 ** Patch: https://github.com/Linaro/odp/pull/160.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: ac7f94d8a80fbad8a99ab45d7ea089bc3166e776
 **/
 include/odp/api/spec/schedule.h | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h
index 8244746d..0997315e 100644
--- a/include/odp/api/spec/schedule.h
+++ b/include/odp/api/spec/schedule.h
@@ -368,6 +368,25 @@ void odp_schedule_order_lock(unsigned lock_index);
 void odp_schedule_order_unlock(unsigned lock_index);
 
 /**
+ * Release ordered context lock and acquires new lock
+ *
+ * This call is valid only when holding an ordered synchronization context.
+ * Release a previously locked ordered context lock and acquires
+ * a new ordered context lock.
+ * This call is valid only when there is a single ordered context lock active.
+ * Results are undefined if this call is made when multiple ordered context
+ * locks are acquired in nested fashion.
+ *
+ * @param lock_index   Index of the ordered lock in the current context to be
+ * acquired. Previously acquired ordered lock is released.
+ * Must be in the range 0...odp_queue_lock_count() - 1.
+ *
+ * @see odp_schedule_order_lock(), odp_schedule_order_unlock()
+ *
+ */
+void odp_schedule_order_unlock_lock(uint32_t lock_index);
+
+/**
  * @}
  */
 



[lng-odp] [PATCH API-NEXT v1 0/2] api: add schedule order unlock lock

2017-09-05 Thread Github ODP bot
Adds odp_schedule_order_unlock_lock() api.
This API combines schedule order unlock and lock into a single api for HW 
performance optimisation.

github
/** Email created from pull request 160 (bala-manoharan:api_sched_order_lock)
 ** https://github.com/Linaro/odp/pull/160
 ** Patch: https://github.com/Linaro/odp/pull/160.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: ac7f94d8a80fbad8a99ab45d7ea089bc3166e776
 **/
/github

checkpatch.pl
total: 0 errors, 0 warnings, 0 checks, 25 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
WARNING: line over 80 characters
#102: FILE: platform/linux-generic/odp_schedule.c:1152:
+sched->queue[queue_index].order_lock_count + 
1);

total: 0 errors, 1 warnings, 0 checks, 220 lines checked


to_send-p-001.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
/checkpatch.pl


[lng-odp] Regarding github pull (RE: [Linaro/odp] [PATCH API-NEXT v12] comp: compression spec (#102))

2017-09-05 Thread Verma, Shally
HI Maxim

So that I can better take care of problem raised below, help me to understand 
this.

Currently I have two commits in my local branch :1st-as of today, 2nd: older 
commit having older spec version (already pushed to branch and pull request v1 
raised on it).

So, before I push it to my pull request branch, do I need to squash them ? Or 
just push will do.?

As I understand, current push should generate v2 with latest commit log and it 
should just suffice.


Thanks
Shally

From: Shally Verma [mailto:notificati...@github.com]
Sent: 31 August 2017 14:00
To: Linaro/odp 
Cc: Verma, Shally ; Your activity 

Subject: Re: [Linaro/odp] [PATCH API-NEXT v12] comp: compression spec (#102)

Yea I realise that part and I tried to squash them however since I am new to 
github so taking more time with all this. I am trying to understand how best to 
resolve them and make it one smooth flow until then, Please bear with me on 
these issues.

If Maxim (or any other) don’t mind to share his chat ID to me, then I can work 
with him and get past these issues fast.

Thanks
Shally

From: Petri Savolainen [mailto:notificati...@github.com]
Sent: 31 August 2017 13:54
To: Linaro/odp 
Cc: Verma, Shally ; Mention 

Subject: Re: [Linaro/odp] [PATCH API-NEXT v12] comp: compression spec (#102)


There should be only one API spec commit. It seems now that there are 6 
commits. Please, squash all commits into one. It's pretty much impossible to 
review / comment this spec now.

Change commit subject to "api: comp: introduce compression API". All API spec 
file changing commits MUST start with "api: " prefix.

It seems that commit log text is empty. It should have rationale for the 
change. In this case describe the intended usage on the new API, etc. E.g. 5 
sentences of text what problem comp API solves, for what problem application 
should use it, etc.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on 
GitHub, or mute 
the 
thread.


—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on 
GitHub, or mute 
the 
thread.


Re: [lng-odp] [PATCH API-NEXT v4] api: pool: add min and max headroom in pool capability

2017-09-05 Thread Github ODP bot
Balasubramanian Manoharan(bala-manoharan) replied on github web page:

platform/linux-generic/odp_pool.c
line 9
@@ -348,6 +348,11 @@ static odp_pool_t pool_create(const char *name, 
odp_pool_param_t *params,
break;
 
case ODP_POOL_PACKET:
+   if (params->pkt.min_headroom > CONFIG_PACKET_HEADROOM) {
+   ODP_ERR("Headroom size not supported");
+   return ODP_POOL_INVALID;
+   }
+
headroom= CONFIG_PACKET_HEADROOM;


Comment:
This PR helps implementation which have the ability to maintain zero headroom 
size and our linux-generic implementation does not violate the API spec. We can 
change linux-generic in future also.

https://github.com/Linaro/odp/pull/152#discussion_r136922240
updated_at 2017-09-05 08:22:53