This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 9dced3ede96b81f883172bad827054bd796c13b4 (commit)
via 371491363d62b151f7036eecfc97b9b86c2b2faa (commit)
via 5b3020ba35230c8dc7beb15fe48fe6064c92810b (commit)
via 0c2ac5119b3015e223357d168b00515a822728cc (commit)
from a45047e728ca1cc0c97e0201eb9900daae5730b6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9dced3ede96b81f883172bad827054bd796c13b4
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Thu Apr 18 15:56:44 2019 +0300
travis: update distribution to ubuntu xenial
Travis default distribution is updated to Ubuntu Xenial (Trusty standard
support is ending). Miscellaneous comment typos have been fixed.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen(a)nokia.com>
diff --git a/.travis.yml b/.travis.yml
index 607e89477..dec6b25c8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,21 +1,22 @@
# Copyright (c) 2016-2019, Linaro Limited
+# Copyright (c) 2019, Nokia
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
#
-# Please update xxxx for your coverity token and notification email if required
+# Please update xxxx for your Coverity token and notification email if required
# pushing to github/master will run make check
# pushing to github/coverity_scan will also launch a static analysis
# See https://scan.coverity.com/travis_ci
#
-# Travis uses Docker images which mainained here:
+# Travis uses Docker images which are maintained here:
# https://github.com/OpenDataPlane/odp-docker-images
-# CI scirpts are maintained under ./scripts/ci/ directory
-# which passed into container during the test run.
+# CI scripts are maintained under ./scripts/ci/ directory
+# which is passed to the containers during a test run.
language: c
sudo: required
-dist: trusty
+dist: xenial
stages:
- "build only"
- test
@@ -43,9 +44,10 @@ compiler:
env:
global:
#
- # By default Linaro CODECOV_TOKEN token is used. It's ok to use it to see
- # for individual commit validation. But you you want to track tests history
- # you need generated new one at https://codecov.io specific for your repo.
+ # By default, OpenDataPlane CODECOV_TOKEN token is used. It's OK to use
+ # it for individual commit validation. If you want to track test history
+ # you need to generate a new one at https://codecov.io specific for your
+ # repo.
- CODECOV_TOKEN=a733c34c-5f5c-4ff1-af4b-e9f5edb1ab5e
- OS="ubuntu_16.04"
- CHECK=1
@@ -232,7 +234,7 @@ jobs:
- pushd doc
- make
- popd
- # doxygen does not trap on warnings, check for them here.
+ # Doxygen does not trap on warnings, check for them here.
- make doxygen-doc 2>&1 |tee doxygen.log
- |
fgrep -rq warning ./doxygen.log
commit 371491363d62b151f7036eecfc97b9b86c2b2faa
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Tue Apr 16 15:57:30 2019 +0300
api: update version number to 1.21.4
Increment version number to reflect queue API specification
update.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/configure.ac b/configure.ac
index ae135261e..29ffef29e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_PREREQ([2.5])
##########################################################################
m4_define([odpapi_generation_version], [1])
m4_define([odpapi_major_version], [21])
-m4_define([odpapi_minor_version], [3])
+m4_define([odpapi_minor_version], [4])
m4_define([odpapi_point_version], [0])
m4_define([odpapi_version],
[odpapi_generation_version.odpapi_major_version.odpapi_minor_version.odpapi_point_version])
commit 5b3020ba35230c8dc7beb15fe48fe6064c92810b
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Tue Apr 16 15:54:36 2019 +0300
validation: queue: check default context value
Check that queue context pointer value is NULL by default.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/test/validation/api/queue/queue.c b/test/validation/api/queue/queue.c
index aab95bab2..b58ccfb15 100644
--- a/test/validation/api/queue/queue.c
+++ b/test/validation/api/queue/queue.c
@@ -623,6 +623,7 @@ static void queue_test_param(void)
CU_ASSERT(ODP_SCHED_SYNC_PARALLEL == odp_queue_sched_type(queue));
CU_ASSERT(ODP_SCHED_GROUP_WORKER == odp_queue_sched_group(queue));
+ CU_ASSERT(odp_queue_context(queue) == NULL);
CU_ASSERT(0 == odp_queue_context_set(queue, &queue_context,
sizeof(queue_context)));
@@ -633,6 +634,7 @@ static void queue_test_param(void)
odp_queue_param_init(&qparams);
null_queue = odp_queue_create(NULL, &qparams);
CU_ASSERT(ODP_QUEUE_INVALID != null_queue);
+ CU_ASSERT(odp_queue_context(null_queue) == NULL);
/* Plain type queue */
odp_queue_param_init(&qparams);
commit 0c2ac5119b3015e223357d168b00515a822728cc
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Tue Apr 16 15:40:52 2019 +0300
api: queue: context default value NULL
Highlight that queue context default value is NULL. This was
defined already in odp_queue_param_t specification.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h
index 605831c50..f40eb7afa 100644
--- a/include/odp/api/spec/queue.h
+++ b/include/odp/api/spec/queue.h
@@ -116,10 +116,16 @@ int odp_queue_context_set(odp_queue_t queue, void *context, uint32_t len);
/**
* Get queue context
*
+ * Returns previously stored queue context pointer. The context pointer may
+ * be set with odp_queue_context_set() or during queue creation
+ * (see odp_queue_param_t). The pointer value is set to NULL by default.
+ *
* @param queue Queue handle
*
* @return pointer to the queue context
* @retval NULL on failure
+ *
+ * @see odp_queue_context_set(), odp_queue_create()
*/
void *odp_queue_context(odp_queue_t queue);
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 20 +++++++++++---------
configure.ac | 2 +-
include/odp/api/spec/queue.h | 6 ++++++
test/validation/api/queue/queue.c | 2 ++
4 files changed, 20 insertions(+), 10 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via a45047e728ca1cc0c97e0201eb9900daae5730b6 (commit)
via 11a190a3909c06c7c2042826e6a96d2396cd4428 (commit)
via 5062afae2d8dc38c1f7db8b089d22fcc9ed17fb2 (commit)
via 88aff57e9b06af8919aaa01b548813f0828f9af0 (commit)
via 3e7aa57be6450ed30b2e1706d3dbf9658eabf185 (commit)
via f20eb25eb2300884170900c265c845740b8b51c6 (commit)
from 86b4f6a67ce8c167ae960978fdb0e43e4a870c2d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a45047e728ca1cc0c97e0201eb9900daae5730b6
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Tue Apr 16 11:04:42 2019 +0300
api: update version number to 1.21.3
Update version number to reflect init API text modifications.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/configure.ac b/configure.ac
index 878110ab2..ae135261e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_PREREQ([2.5])
##########################################################################
m4_define([odpapi_generation_version], [1])
m4_define([odpapi_major_version], [21])
-m4_define([odpapi_minor_version], [2])
+m4_define([odpapi_minor_version], [3])
m4_define([odpapi_point_version], [0])
m4_define([odpapi_version],
[odpapi_generation_version.odpapi_major_version.odpapi_minor_version.odpapi_point_version])
commit 11a190a3909c06c7c2042826e6a96d2396cd4428
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Tue Apr 16 11:01:31 2019 +0300
validation: buffer: output test result
This test suite missed to output return value of odp_cunit_run().
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/test/validation/api/buffer/buffer.c b/test/validation/api/buffer/buffer.c
index e774c1b39..9f2049034 100644
--- a/test/validation/api/buffer/buffer.c
+++ b/test/validation/api/buffer/buffer.c
@@ -304,7 +304,7 @@ int main(int argc, char *argv[])
ret = odp_cunit_register(buffer_suites);
if (ret == 0)
- odp_cunit_run();
+ ret = odp_cunit_run();
return ret;
}
commit 5062afae2d8dc38c1f7db8b089d22fcc9ed17fb2
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Tue Apr 16 10:50:53 2019 +0300
validation: init: add features test case
Added test case to set not used features flags in init parameters.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/test/validation/api/Makefile.am b/test/validation/api/Makefile.am
index 8a57b254e..071499f18 100644
--- a/test/validation/api/Makefile.am
+++ b/test/validation/api/Makefile.am
@@ -47,6 +47,7 @@ TESTS = \
init/init_abort$(EXEEXT) \
init/init_log$(EXEEXT) \
init/init_num_thr$(EXEEXT) \
+ init/init_feature$(EXEEXT) \
ipsec/ipsec_sync$(EXEEXT) \
ipsec/ipsec_async$(EXEEXT) \
ipsec/ipsec_inline_in$(EXEEXT) \
diff --git a/test/validation/api/init/.gitignore b/test/validation/api/init/.gitignore
index e2f102ad0..8311f2c3f 100644
--- a/test/validation/api/init/.gitignore
+++ b/test/validation/api/init/.gitignore
@@ -2,3 +2,4 @@ init_defaults
init_abort
init_log
init_num_thr
+init_feature
diff --git a/test/validation/api/init/Makefile.am b/test/validation/api/init/Makefile.am
index 2f668504e..6c0ef301f 100644
--- a/test/validation/api/init/Makefile.am
+++ b/test/validation/api/init/Makefile.am
@@ -2,14 +2,16 @@ include ../Makefile.inc
# Keep init test cases in separate binaries. Some implementations may not allow
# the same application process to call odp_init_global() multiple times.
-test_PROGRAMS = init_defaults init_abort init_log init_num_thr
+test_PROGRAMS = init_defaults init_abort init_log init_num_thr init_feature
init_defaults_CPPFLAGS = -DINIT_TEST=0 $(AM_CPPFLAGS)
init_abort_CPPFLAGS = -DINIT_TEST=1 $(AM_CPPFLAGS)
init_log_CPPFLAGS = -DINIT_TEST=2 $(AM_CPPFLAGS)
init_num_thr_CPPFLAGS = -DINIT_TEST=3 $(AM_CPPFLAGS)
+init_feature_CPPFLAGS = -DINIT_TEST=4 $(AM_CPPFLAGS)
init_defaults_SOURCES = init_main.c
init_abort_SOURCES = init_main.c
init_log_SOURCES = init_main.c
init_num_thr_SOURCES = init_main.c
+init_feature_SOURCES = init_main.c
diff --git a/test/validation/api/init/init_main.c b/test/validation/api/init/init_main.c
index 2fd3faf8c..742f02522 100644
--- a/test/validation/api/init/init_main.c
+++ b/test/validation/api/init/init_main.c
@@ -125,11 +125,41 @@ static void init_test_num_thr(void)
CU_ASSERT(ret == 0);
}
+static void init_test_feature(void)
+{
+ int ret;
+ odp_instance_t instance;
+ odp_init_t param;
+
+ odp_init_param_init(¶m);
+ param.not_used.all_feat = 0;
+ param.not_used.feat.cls = 1;
+ param.not_used.feat.crypto = 1;
+ param.not_used.feat.ipsec = 1;
+ param.not_used.feat.schedule = 1;
+ param.not_used.feat.time = 1;
+ param.not_used.feat.timer = 1;
+ param.not_used.feat.tm = 1;
+
+ ret = odp_init_global(&instance, ¶m, NULL);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_init_local(instance, ODP_THREAD_CONTROL);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_local();
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_global(instance);
+ CU_ASSERT(ret == 0);
+}
+
odp_testinfo_t testinfo[] = {
ODP_TEST_INFO(init_test_defaults),
ODP_TEST_INFO(init_test_abort),
ODP_TEST_INFO(init_test_log),
- ODP_TEST_INFO(init_test_num_thr)
+ ODP_TEST_INFO(init_test_num_thr),
+ ODP_TEST_INFO(init_test_feature)
};
odp_testinfo_t init_suite[] = {
commit 88aff57e9b06af8919aaa01b548813f0828f9af0
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Mon Apr 15 14:41:31 2019 +0300
validation: init: add num threads test case
Added test case to set num_worker and num_control parameters.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/test/validation/api/Makefile.am b/test/validation/api/Makefile.am
index eb8832f4f..8a57b254e 100644
--- a/test/validation/api/Makefile.am
+++ b/test/validation/api/Makefile.am
@@ -46,6 +46,7 @@ TESTS = \
init/init_defaults$(EXEEXT) \
init/init_abort$(EXEEXT) \
init/init_log$(EXEEXT) \
+ init/init_num_thr$(EXEEXT) \
ipsec/ipsec_sync$(EXEEXT) \
ipsec/ipsec_async$(EXEEXT) \
ipsec/ipsec_inline_in$(EXEEXT) \
diff --git a/test/validation/api/init/.gitignore b/test/validation/api/init/.gitignore
index 6a466ddac..e2f102ad0 100644
--- a/test/validation/api/init/.gitignore
+++ b/test/validation/api/init/.gitignore
@@ -1,3 +1,4 @@
init_defaults
init_abort
init_log
+init_num_thr
diff --git a/test/validation/api/init/Makefile.am b/test/validation/api/init/Makefile.am
index 141420e82..2f668504e 100644
--- a/test/validation/api/init/Makefile.am
+++ b/test/validation/api/init/Makefile.am
@@ -2,12 +2,14 @@ include ../Makefile.inc
# Keep init test cases in separate binaries. Some implementations may not allow
# the same application process to call odp_init_global() multiple times.
-test_PROGRAMS = init_defaults init_abort init_log
+test_PROGRAMS = init_defaults init_abort init_log init_num_thr
init_defaults_CPPFLAGS = -DINIT_TEST=0 $(AM_CPPFLAGS)
init_abort_CPPFLAGS = -DINIT_TEST=1 $(AM_CPPFLAGS)
init_log_CPPFLAGS = -DINIT_TEST=2 $(AM_CPPFLAGS)
+init_num_thr_CPPFLAGS = -DINIT_TEST=3 $(AM_CPPFLAGS)
init_defaults_SOURCES = init_main.c
init_abort_SOURCES = init_main.c
init_log_SOURCES = init_main.c
+init_num_thr_SOURCES = init_main.c
diff --git a/test/validation/api/init/init_main.c b/test/validation/api/init/init_main.c
index cce4dcac6..2fd3faf8c 100644
--- a/test/validation/api/init/init_main.c
+++ b/test/validation/api/init/init_main.c
@@ -99,10 +99,37 @@ static void init_test_log(void)
CU_ASSERT(ret == 0);
}
+static void init_test_num_thr(void)
+{
+ int ret;
+ odp_instance_t instance;
+ odp_init_t param;
+
+ odp_init_param_init(¶m);
+ param.mem_model = ODP_MEM_MODEL_THREAD;
+ param.num_worker = 1;
+ param.num_control = 1;
+ param.worker_cpus = NULL;
+ param.control_cpus = NULL;
+
+ ret = odp_init_global(&instance, ¶m, NULL);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_init_local(instance, ODP_THREAD_WORKER);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_local();
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_global(instance);
+ CU_ASSERT(ret == 0);
+}
+
odp_testinfo_t testinfo[] = {
ODP_TEST_INFO(init_test_defaults),
ODP_TEST_INFO(init_test_abort),
ODP_TEST_INFO(init_test_log),
+ ODP_TEST_INFO(init_test_num_thr)
};
odp_testinfo_t init_suite[] = {
commit 3e7aa57be6450ed30b2e1706d3dbf9658eabf185
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Mon Apr 15 14:25:35 2019 +0300
validation: init: remove separate files per test case
Combining all test cases into a single source file
(init_main.c). Create (still) separate binaries per test
case as some implementations may assume that an application
process won't call odp_global_init() more than once.
Added missing local init/term calls to all test cases. Removed
non-API compatible assumptions from log test:
- ODP_DEBUG_PRINT is not defined in the API
- API does not require odp_init_global() to output anything
to the log
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/doc/implementers-guide/implementers-guide.adoc b/doc/implementers-guide/implementers-guide.adoc
index 36b143b9e..d25843f81 100644
--- a/doc/implementers-guide/implementers-guide.adoc
+++ b/doc/implementers-guide/implementers-guide.adoc
@@ -320,9 +320,7 @@ TESTS = validation/api/pktio/pktio_run.sh \
$(ALL_API_VALIDATION)/crypto/crypto_main$(EXEEXT) \
$(ALL_API_VALIDATION)/errno/errno_main$(EXEEXT) \
$(ALL_API_VALIDATION)/hash/hash_main$(EXEEXT) \
- $(ALL_API_VALIDATION)/init/init_main_ok$(EXEEXT) \
- $(ALL_API_VALIDATION)/init/init_main_abort$(EXEEXT) \
- $(ALL_API_VALIDATION)/init/init_main_log$(EXEEXT) \
+ $(ALL_API_VALIDATION)/init/init_defaults$(EXEEXT) \
$(ALL_API_VALIDATION)/lock/lock_main$(EXEEXT) \
$(ALL_API_VALIDATION)/packet/packet_main$(EXEEXT) \
$(ALL_API_VALIDATION)/pool/pool_main$(EXEEXT) \
diff --git a/test/validation/api/Makefile.am b/test/validation/api/Makefile.am
index 257764648..eb8832f4f 100644
--- a/test/validation/api/Makefile.am
+++ b/test/validation/api/Makefile.am
@@ -43,9 +43,9 @@ TESTS = \
errno/errno_main$(EXEEXT) \
event/event_main$(EXEEXT) \
hash/hash_main$(EXEEXT) \
- init/init_main_ok$(EXEEXT) \
- init/init_main_abort$(EXEEXT) \
- init/init_main_log$(EXEEXT) \
+ init/init_defaults$(EXEEXT) \
+ init/init_abort$(EXEEXT) \
+ init/init_log$(EXEEXT) \
ipsec/ipsec_sync$(EXEEXT) \
ipsec/ipsec_async$(EXEEXT) \
ipsec/ipsec_inline_in$(EXEEXT) \
diff --git a/test/validation/api/init/.gitignore b/test/validation/api/init/.gitignore
index f433708b0..6a466ddac 100644
--- a/test/validation/api/init/.gitignore
+++ b/test/validation/api/init/.gitignore
@@ -1,3 +1,3 @@
-init_main_abort
-init_main_log
-init_main_ok
+init_defaults
+init_abort
+init_log
diff --git a/test/validation/api/init/Makefile.am b/test/validation/api/init/Makefile.am
index 5af2e00bc..141420e82 100644
--- a/test/validation/api/init/Makefile.am
+++ b/test/validation/api/init/Makefile.am
@@ -1,9 +1,13 @@
include ../Makefile.inc
-# most platforms are expected not to support multiple ODP inits
-# following each other: therefore 3 separate binaries are
-# created, each containing its ODP init test.
-test_PROGRAMS = init_main_abort init_main_log init_main_ok
-init_main_abort_SOURCES = init_main_abort.c
-init_main_log_SOURCES = init_main_log.c
-init_main_ok_SOURCES = init_main_ok.c
+# Keep init test cases in separate binaries. Some implementations may not allow
+# the same application process to call odp_init_global() multiple times.
+test_PROGRAMS = init_defaults init_abort init_log
+
+init_defaults_CPPFLAGS = -DINIT_TEST=0 $(AM_CPPFLAGS)
+init_abort_CPPFLAGS = -DINIT_TEST=1 $(AM_CPPFLAGS)
+init_log_CPPFLAGS = -DINIT_TEST=2 $(AM_CPPFLAGS)
+
+init_defaults_SOURCES = init_main.c
+init_abort_SOURCES = init_main.c
+init_log_SOURCES = init_main.c
diff --git a/test/validation/api/init/init_main.c b/test/validation/api/init/init_main.c
new file mode 100644
index 000000000..cce4dcac6
--- /dev/null
+++ b/test/validation/api/init/init_main.c
@@ -0,0 +1,153 @@
+/* Copyright (c) 2015-2018, Linaro Limited
+ * Copyright (c) 2019, Nokia
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "config.h"
+
+#include <odp_api.h>
+#include <odp_cunit_common.h>
+
+#include <stdarg.h>
+#include <stdlib.h>
+
+/* Replacement abort function */
+static void ODP_NORETURN my_abort_func(void)
+{
+ abort();
+}
+
+/* Replacement log function */
+ODP_PRINTF_FORMAT(2, 3)
+static int my_log_func(odp_log_level_t level __attribute__((unused)),
+ const char *fmt, ...)
+{
+ va_list args;
+ int r;
+
+ va_start(args, fmt);
+ r = vfprintf(stderr, fmt, args);
+ va_end(args);
+
+ return r;
+}
+
+static void init_test_defaults(void)
+{
+ int ret;
+ odp_instance_t instance;
+ odp_init_t param;
+
+ odp_init_param_init(¶m);
+
+ ret = odp_init_global(&instance, ¶m, NULL);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_init_local(instance, ODP_THREAD_WORKER);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_local();
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_global(instance);
+ CU_ASSERT(ret == 0);
+}
+
+static void init_test_abort(void)
+{
+ int ret;
+ odp_instance_t instance;
+ odp_init_t param;
+
+ odp_init_param_init(¶m);
+ param.abort_fn = &my_abort_func;
+
+ ret = odp_init_global(&instance, ¶m, NULL);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_init_local(instance, ODP_THREAD_WORKER);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_local();
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_global(instance);
+ CU_ASSERT(ret == 0);
+}
+
+static void init_test_log(void)
+{
+ int ret;
+ odp_instance_t instance;
+ odp_init_t param;
+
+ odp_init_param_init(¶m);
+ param.log_fn = &my_log_func;
+
+ ret = odp_init_global(&instance, ¶m, NULL);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_init_local(instance, ODP_THREAD_WORKER);
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_local();
+ CU_ASSERT_FATAL(ret == 0);
+
+ ret = odp_term_global(instance);
+ CU_ASSERT(ret == 0);
+}
+
+odp_testinfo_t testinfo[] = {
+ ODP_TEST_INFO(init_test_defaults),
+ ODP_TEST_INFO(init_test_abort),
+ ODP_TEST_INFO(init_test_log),
+};
+
+odp_testinfo_t init_suite[] = {
+ ODP_TEST_INFO_NULL,
+ ODP_TEST_INFO_NULL
+};
+
+odp_suiteinfo_t init_suites[] = {
+ {"Init", NULL, NULL, init_suite},
+ ODP_SUITE_INFO_NULL,
+};
+
+static int fill_testinfo(odp_testinfo_t *info, unsigned int test_case)
+{
+ if (test_case >= (sizeof(testinfo) / sizeof(odp_testinfo_t))) {
+ printf("Bad test case number %u\n", test_case);
+ return -1;
+ }
+
+ *info = testinfo[test_case];
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ int ret;
+
+ if (fill_testinfo(&init_suite[0], INIT_TEST))
+ return -1;
+
+ /* Parse common options */
+ if (odp_cunit_parse_options(argc, argv))
+ return -1;
+
+ /* Prevent default ODP init */
+ odp_cunit_register_global_init(NULL);
+ odp_cunit_register_global_term(NULL);
+
+ /* Register the tests */
+ ret = odp_cunit_register(init_suites);
+
+ /* Run the tests */
+ if (ret == 0)
+ ret = odp_cunit_run();
+
+ return ret;
+}
diff --git a/test/validation/api/init/init_main_abort.c b/test/validation/api/init/init_main_abort.c
deleted file mode 100644
index 339fba1d0..000000000
--- a/test/validation/api/init/init_main_abort.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) 2015-2018, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <odp_api.h>
-#include <odp_cunit_common.h>
-
-/* replacement abort function: */
-static void ODP_NORETURN odp_init_abort(void)
-{
- abort();
-}
-
-/* test ODP global init, with alternate abort function */
-static void init_test_odp_init_global_replace_abort(void)
-{
- int status;
- odp_init_t init_data;
- odp_instance_t instance;
-
- odp_init_param_init(&init_data);
- init_data.abort_fn = &odp_init_abort;
-
- status = odp_init_global(&instance, &init_data, NULL);
- CU_ASSERT_FATAL(status == 0);
-
- status = odp_term_global(instance);
- CU_ASSERT(status == 0);
-}
-
-odp_testinfo_t init_suite_abort[] = {
- ODP_TEST_INFO(init_test_odp_init_global_replace_abort),
- ODP_TEST_INFO_NULL,
-};
-
-odp_suiteinfo_t init_suites_abort[] = {
- {"Init", NULL, NULL, init_suite_abort},
- ODP_SUITE_INFO_NULL,
-};
-
-int main(int argc, char *argv[])
-{
- int ret;
-
- /* parse common options: */
- if (odp_cunit_parse_options(argc, argv))
- return -1;
-
- /* prevent default ODP init: */
- odp_cunit_register_global_init(NULL);
- odp_cunit_register_global_term(NULL);
-
- /* run the tests: */
- ret = odp_cunit_register(init_suites_abort);
-
- if (ret == 0)
- ret = odp_cunit_run();
-
- return ret;
-}
diff --git a/test/validation/api/init/init_main_log.c b/test/validation/api/init/init_main_log.c
deleted file mode 100644
index 9ada02289..000000000
--- a/test/validation/api/init/init_main_log.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (c) 2015-2018, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "config.h"
-
-#include <stdarg.h>
-#include <odp_api.h>
-#include <odp_cunit_common.h>
-
-/* flag set when the replacement logging function is used */
-int replacement_logging_used;
-
-/* replacement log function: */
-ODP_PRINTF_FORMAT(2, 3)
-static int odp_init_log(odp_log_level_t level __attribute__((unused)),
- const char *fmt, ...)
-{
- va_list args;
- int r;
-
- /* just set a flag to be sure the replacement fn was used */
- replacement_logging_used = 1;
-
- va_start(args, fmt);
- r = vfprintf(stderr, fmt, args);
- va_end(args);
-
- return r;
-}
-
-/* test ODP global init, with alternate log function */
-static void init_test_odp_init_global_replace_log(void)
-{
- int status;
- odp_init_t init_data;
- odp_instance_t instance;
-
- odp_init_param_init(&init_data);
- init_data.log_fn = &odp_init_log;
-
- replacement_logging_used = 0;
-
- status = odp_init_global(&instance, &init_data, NULL);
- CU_ASSERT_FATAL(status == 0);
-
- CU_ASSERT_TRUE(replacement_logging_used || ODP_DEBUG_PRINT == 0);
-
- status = odp_term_global(instance);
- CU_ASSERT(status == 0);
-}
-
-odp_testinfo_t init_suite_log[] = {
- ODP_TEST_INFO(init_test_odp_init_global_replace_log),
- ODP_TEST_INFO_NULL,
-};
-
-odp_suiteinfo_t init_suites_log[] = {
- {"Init", NULL, NULL, init_suite_log},
- ODP_SUITE_INFO_NULL,
-};
-
-int main(int argc, char *argv[])
-{
- int ret;
-
- /* parse common options: */
- if (odp_cunit_parse_options(argc, argv))
- return -1;
-
- /* prevent default ODP init: */
- odp_cunit_register_global_init(NULL);
- odp_cunit_register_global_term(NULL);
-
- /* register the tests: */
- ret = odp_cunit_register(init_suites_log);
-
- /* run the tests: */
- if (ret == 0)
- ret = odp_cunit_run();
-
- return ret;
-}
diff --git a/test/validation/api/init/init_main_ok.c b/test/validation/api/init/init_main_ok.c
deleted file mode 100644
index 651989aeb..000000000
--- a/test/validation/api/init/init_main_ok.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) 2015-2018, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "config.h"
-
-#include <odp_api.h>
-#include <odp_cunit_common.h>
-
-/* test normal ODP global init */
-static void init_test_odp_init_global(void)
-{
- int status;
- odp_instance_t instance;
- odp_init_t init_data;
-
- odp_init_param_init(&init_data);
- init_data.mem_model = ODP_MEM_MODEL_THREAD;
-
- status = odp_init_global(&instance, &init_data, NULL);
- CU_ASSERT_FATAL(status == 0);
-
- status = odp_term_global(instance);
- CU_ASSERT(status == 0);
-}
-
-odp_testinfo_t init_suite_ok[] = {
- ODP_TEST_INFO(init_test_odp_init_global),
- ODP_TEST_INFO_NULL,
-};
-
-odp_suiteinfo_t init_suites_ok[] = {
- {"Init", NULL, NULL, init_suite_ok},
- ODP_SUITE_INFO_NULL,
-};
-
-int main(int argc, char *argv[])
-{
- int ret;
-
- /* parse common options: */
- if (odp_cunit_parse_options(argc, argv))
- return -1;
-
- /* prevent default ODP init: */
- odp_cunit_register_global_init(NULL);
- odp_cunit_register_global_term(NULL);
-
- /* register the tests: */
- ret = odp_cunit_register(init_suites_ok);
-
- /* run the tests: */
- if (ret == 0)
- ret = odp_cunit_run();
-
- return ret;
-}
commit f20eb25eb2300884170900c265c845740b8b51c6
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Fri Apr 12 17:00:32 2019 +0300
api: init: calls to cpumask functions before init
Improve specification of initialization and termination steps.
Explicitly list those functions that may be used before global
init (those that are needed for setting up parameters). No
change to functionality.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Bill Fischofer <billf(a)me.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h
index 70249d138..916f19388 100644
--- a/include/odp/api/spec/init.h
+++ b/include/odp/api/spec/init.h
@@ -1,4 +1,5 @@
/* Copyright (c) 2013-2018, Linaro Limited
+ * Copyright (c) 2019, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -6,16 +7,6 @@
/**
* @file
- *
- * ODP initialization.
- * ODP requires a global level init for the process and a local init per
- * thread before the other ODP APIs may be called.
- * - odp_init_global()
- * - odp_init_local()
- *
- * For a graceful termination the matching termination APIs exit
- * - odp_term_global()
- * - odp_term_local()
*/
#ifndef ODP_API_SPEC_INIT_H_
@@ -234,13 +225,25 @@ void odp_init_param_init(odp_init_t *param);
/**
* Global ODP initialization
*
- * This function must be called once (per instance) before calling any other
- * ODP API functions. A successful call creates a new ODP instance into the
- * system and outputs a handle for it. The handle is used in other calls
- * (e.g. odp_init_local()) as a reference to the instance. When user provides
- * configuration parameters, the platform may configure and optimize the
- * instance to match user requirements. A failure is returned if requirements
- * cannot be met.
+ * An ODP instance is created with an odp_init_global() call. By default, each
+ * thread of the instance must call odp_init_local() before calling any other
+ * ODP API functions. Exceptions to this are functions that are needed for
+ * setting up parameters for odp_init_global() and odp_init_local() calls:
+ * - odp_init_param_init()
+ * - odp_cpumask_zero(), odp_cpumask_set(), etc functions to format
+ * odp_cpumask_t. However, these cpumask functions are excluded as their
+ * behaviour depend on global initialization parameters:
+ * odp_cpumask_default_worker(), odp_cpumask_default_control() and
+ * odp_cpumask_all_available()
+ *
+ * A successful odp_init_global() call outputs a handle for the new instance.
+ * The handle is used in other initialization and termination calls.
+ * For a graceful termination, odp_term_local() must be called first on each
+ * thread and then odp_term_global() only once.
+ *
+ * When user provides configuration parameters, the platform may configure and
+ * optimize the instance to match user requirements. A failure is returned if
+ * requirements cannot be met.
*
* Configuration parameters are divided into standard and platform specific
* parts. Standard parameters are supported by any ODP platform, where as
@@ -260,46 +263,25 @@ void odp_init_param_init(odp_init_t *param);
* @retval 0 on success
* @retval <0 on failure
*
- * @see odp_term_global()
- * @see odp_init_local() which is required per thread before use.
+ * @see odp_init_local(), odp_term_global(), odp_init_param_init()
*/
int odp_init_global(odp_instance_t *instance,
const odp_init_t *params,
const odp_platform_init_t *platform_params);
-/**
- * Global ODP termination
- *
- * This function is the final ODP call made when terminating
- * an ODP application in a controlled way. It cannot handle exceptional
- * circumstances. In general it calls the API modules terminate functions in
- * the reverse order to that which the module init functions were called
- * during odp_init_global().
- *
- * This function must be called only after all threads of the instance have
- * executed odp_term_local(). To simplify synchronization between threads
- * odp_term_local() identifies which one is the last thread of an instance.
- *
- * @param instance Instance handle
- *
- * @retval 0 on success
- * @retval <0 on failure
- *
- * @warning The unwinding of HW resources to allow them to be reused without
- * resetting the device is a complex task that the application is expected to
- * coordinate. This api may have platform dependent implications.
- *
- * @see odp_init_global()
- * @see odp_term_local() which must have been called prior to this.
- */
-int odp_term_global(odp_instance_t instance);
-
/**
* Thread local ODP initialization
*
* All threads must call this function before calling any other ODP API
- * functions. The instance parameter specifies which ODP instance the thread
- * joins. A thread may be simultaneously part of single ODP instance only.
+ * functions. See odp_init_global() documentation for exceptions to this rule.
+ * Global initialization (odp_init_global()) must have completed prior calling
+ * this function.
+ *
+ * The instance parameter specifies which ODP instance the thread joins.
+ * A thread may only join a single ODP instance at a time. The thread
+ * type parameter indicates if the thread does most part of application
+ * processing (ODP_THREAD_WORKER), or if it performs mostly background
+ * tasks (ODP_THREAD_CONTROL).
*
* @param instance Instance handle
* @param thr_type Thread type
@@ -307,8 +289,7 @@ int odp_term_global(odp_instance_t instance);
* @retval 0 on success
* @retval <0 on failure
*
- * @see odp_term_local()
- * @see odp_init_global() which must have been called prior to this.
+ * @see odp_init_global(), odp_term_local()
*/
int odp_init_local(odp_instance_t instance, odp_thread_type_t thr_type);
@@ -317,24 +298,40 @@ int odp_init_local(odp_instance_t instance, odp_thread_type_t thr_type);
*
* This function is the second to final ODP call made when terminating
* an ODP application in a controlled way. It cannot handle exceptional
- * circumstances. In general it calls the API modules per thread terminate
- * functions in the reverse order to that which the module init functions were
- * called during odp_init_local().
+ * circumstances. It is recommended that all ODP resources are freed before
+ * the last thread (of the instance) calls this function. This helps ODP
+ * to avoid memory and other resource leaks.
+ *
+ * odp_term_global() may be called only after all threads of the instance have
+ * executed odp_term_local(). To simplify synchronization between threads
+ * a return value identifies which one is the last thread of an instance.
*
* @retval 1 on success and more ODP threads exist
* @retval 0 on success and this is the last ODP thread
* @retval <0 on failure
*
- * @warning The unwinding of HW resources to allow them to be reused without
- * resetting the device is a complex task that the application is expected
- * to coordinate.
- *
- * @see odp_init_local()
- * @see odp_term_global() should be called by the last ODP thread before exit
- * of an application.
+ * @see odp_init_local(), odp_term_global()
*/
int odp_term_local(void);
+/**
+ * Global ODP termination
+ *
+ * This function is the final ODP call made when terminating an ODP application
+ * in a controlled way. It cannot handle exceptional circumstances.
+ *
+ * This function must be called only after all threads of the instance have
+ * executed odp_term_local().
+ *
+ * @param instance Instance handle
+ *
+ * @retval 0 on success
+ * @retval <0 on failure
+ *
+ * @see odp_init_global(), odp_term_local()
+ */
+int odp_term_global(odp_instance_t instance);
+
/**
* @}
*/
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
doc/implementers-guide/implementers-guide.adoc | 4 +-
include/odp/api/spec/init.h | 117 +++++++-------
test/validation/api/Makefile.am | 8 +-
test/validation/api/buffer/buffer.c | 2 +-
test/validation/api/init/.gitignore | 8 +-
test/validation/api/init/Makefile.am | 22 ++-
test/validation/api/init/init_main.c | 210 +++++++++++++++++++++++++
test/validation/api/init/init_main_abort.c | 65 --------
test/validation/api/init/init_main_log.c | 85 ----------
test/validation/api/init/init_main_ok.c | 59 -------
11 files changed, 295 insertions(+), 287 deletions(-)
create mode 100644 test/validation/api/init/init_main.c
delete mode 100644 test/validation/api/init/init_main_abort.c
delete mode 100644 test/validation/api/init/init_main_log.c
delete mode 100644 test/validation/api/init/init_main_ok.c
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 86b4f6a67ce8c167ae960978fdb0e43e4a870c2d (commit)
from 5cab9bd4190cec9535f4784c57c9ea9001543516 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 86b4f6a67ce8c167ae960978fdb0e43e4a870c2d
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Thu Apr 18 11:05:09 2019 +0300
linux-gen: shm: increase amount of pre-reserved single va memory
Due to changes in pool implementation (linux-gen: pool: use pointer ring to
store buffer headers) additional single va memory is required for process
mode operation.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Carl Wallen <carl.wallen(a)nokia.com>
Reported-by: Carl Wallen <carl.wallen(a)nokia.com>
diff --git a/config/odp-linux-generic.conf b/config/odp-linux-generic.conf
index fcc5d75aa..9a5dbea69 100644
--- a/config/odp-linux-generic.conf
+++ b/config/odp-linux-generic.conf
@@ -40,7 +40,7 @@ shm: {
huge_page_limit_kb = 64
# Amount of memory pre-reserved for ODP_SHM_SINGLE_VA usage in kilobytes
- single_va_size_kb = 131072
+ single_va_size_kb = 262144
}
# Pool options
diff --git a/scripts/ci/check.sh b/scripts/ci/check.sh
index 85cee498c..948149300 100755
--- a/scripts/ci/check.sh
+++ b/scripts/ci/check.sh
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
-echo 1000 | tee /proc/sys/vm/nr_hugepages
+echo 1500 | tee /proc/sys/vm/nr_hugepages
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
-----------------------------------------------------------------------
Summary of changes:
config/odp-linux-generic.conf | 2 +-
scripts/ci/check.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via b3cacf62c188e2d2696bb6993a9328127274b9b0 (commit)
from 6811aabac773f935d5eedcd7d781eeb3cf06056f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b3cacf62c188e2d2696bb6993a9328127274b9b0
Author: Dmitry Eremin-Solenikov <deremin-solenikov(a)cavium.com>
Date: Sat Apr 6 12:28:30 2019 +0300
linux-gen: crypto: fix AES-GMAC with OpenSSL 1.1.1b
OpenSSL 1.1.1b (and master branches) have changed semantics of
EVP_En/Decrypt operations by diallowing now to call EVP_Decrypt on the
context initialized with EVP_EncryptInit_ex (which was allowed before).
Fix this by calling corresponding function for data processing.
Signed-off-by: Dmitry Eremin-Solenikov <deremin-solenikov(a)cavium.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/platform/linux-generic/odp_crypto_openssl.c b/platform/linux-generic/odp_crypto_openssl.c
index 7507f1aa8..b7cce4a39 100644
--- a/platform/linux-generic/odp_crypto_openssl.c
+++ b/platform/linux-generic/odp_crypto_openssl.c
@@ -621,7 +621,8 @@ odp_crypto_alg_err_t auth_cmac_check(odp_packet_t pkt,
static
int internal_aad(EVP_CIPHER_CTX *ctx,
odp_packet_t pkt,
- const odp_crypto_packet_op_param_t *param)
+ const odp_crypto_packet_op_param_t *param,
+ odp_bool_t encrypt)
{
uint32_t offset = param->auth_range.offset;
uint32_t len = param->auth_range.length;
@@ -635,12 +636,18 @@ int internal_aad(EVP_CIPHER_CTX *ctx,
void *mapaddr = odp_packet_offset(pkt, offset, &seglen, NULL);
uint32_t maclen = len > seglen ? seglen : len;
- EVP_EncryptUpdate(ctx, NULL, &dummy_len, mapaddr, maclen);
+ if (encrypt)
+ EVP_EncryptUpdate(ctx, NULL, &dummy_len, mapaddr, maclen);
+ else
+ EVP_DecryptUpdate(ctx, NULL, &dummy_len, mapaddr, maclen);
offset += maclen;
len -= maclen;
}
- ret = EVP_EncryptFinal_ex(ctx, NULL, &dummy_len);
+ if (encrypt)
+ ret = EVP_EncryptFinal_ex(ctx, NULL, &dummy_len);
+ else
+ ret = EVP_DecryptFinal_ex(ctx, NULL, &dummy_len);
return ret;
}
@@ -1019,7 +1026,7 @@ odp_crypto_alg_err_t aes_gmac_gen(odp_packet_t pkt,
EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv_ptr);
- ret = internal_aad(ctx, pkt, param);
+ ret = internal_aad(ctx, pkt, param, true);
EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG,
session->p.auth_digest_len, block);
@@ -1068,7 +1075,7 @@ odp_crypto_alg_err_t aes_gmac_check(odp_packet_t pkt,
_odp_packet_set_data(pkt, param->hash_result_offset,
0, session->p.auth_digest_len);
- ret = internal_aad(ctx, pkt, param);
+ ret = internal_aad(ctx, pkt, param, false);
return ret <= 0 ? ODP_CRYPTO_ALG_ERR_ICV_CHECK :
ODP_CRYPTO_ALG_ERR_NONE;
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_crypto_openssl.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 6811aabac773f935d5eedcd7d781eeb3cf06056f (commit)
from 939166d4414609717264e6f51f51d4b22cdd022a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6811aabac773f935d5eedcd7d781eeb3cf06056f
Author: Dmitry Eremin-Solenikov <deremin-solenikov(a)cavium.com>
Date: Thu Mar 14 00:35:51 2019 +0300
build: support platforms that do not use config
Support platforms that do not use config file.
Signed-off-by: Dmitry Eremin-Solenikov <deremin-solenikov(a)cavium.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Stanislaw Kardach <Stanislaw.Kardach(a)cavium.com>
diff --git a/Makefile.am b/Makefile.am
index f651e9ca..b2e828ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ endif
@DX_RULES@
-EXTRA_DIST = bootstrap CHANGELOG config/README config/odp-$(with_platform).conf
+EXTRA_DIST = bootstrap CHANGELOG config/README
distcheck-hook:
if test -n "$(DX_CLEANFILES)" ; \
diff --git a/configure.ac b/configure.ac
index f4ad79f5..878110ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -231,6 +231,8 @@ AS_IF([test "${with_platform}" = "linux-generic"],
AC_DEFINE_UNQUOTED([ODP_IMPLEMENTATION_NAME], ["$ODP_IMPLEMENTATION_NAME"],
[Define to the name of the implementation])
+AM_CONDITIONAL([ODP_USE_CONFIG], [test "x$odp_use_config" = "xtrue"])
+
##########################################################################
# Build examples/tests dynamically
##########################################################################
diff --git a/m4/odp_libconfig.m4 b/m4/odp_libconfig.m4
index 302dc506..6b5bca26 100644
--- a/m4/odp_libconfig.m4
+++ b/m4/odp_libconfig.m4
@@ -14,6 +14,7 @@ AC_CHECK_PROGS([OD], [od])
AC_PROG_SED
AS_IF([test -z "$OD"], [AC_MSG_ERROR([Could not find 'od'])])
+odp_use_config=true
##########################################################################
# Create a header file odp_libconfig_config.h which containins null
# terminated hex dump of odp-linux.conf
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index ae4d52f2..f99d39ff 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -3,8 +3,13 @@ include $(top_srcdir)/Makefile.inc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libodp-linux.pc
+EXTRA_DIST = doc/platform_specific.dox
+
configdir = $(sysconfdir)/odp
+if ODP_USE_CONFIG
config_DATA = $(top_srcdir)/config/odp-$(with_platform).conf
+EXTRA_DIST += $(top_srcdir)/config/odp-$(with_platform).conf
+endif
VPATH = $(srcdir) $(builddir)
lib_LTLIBRARIES = $(LIB)/libodp-linux.la
@@ -21,5 +26,3 @@ AM_CFLAGS = "-DODP_VERSION_BUILD=$(VERSION)"
AM_CFLAGS += $(VISIBILITY_CFLAGS)
AM_CFLAGS += @PTHREAD_CFLAGS@
-
-EXTRA_DIST = doc/platform_specific.dox
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 2 +-
configure.ac | 2 ++
m4/odp_libconfig.m4 | 1 +
platform/Makefile.inc | 7 +++++--
4 files changed, 9 insertions(+), 3 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 12eaa3d2ce51cc5cd48e54deded2740161162022 (commit)
via 36009b1444af036c189046ee4edb50d13d861120 (commit)
from 0178075e5e16e843034ac59ad4978e6a70ef86b5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 12eaa3d2ce51cc5cd48e54deded2740161162022
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Wed Apr 10 10:28:24 2019 +0300
validation: pktio: improve debug info on magic number miss
Linux IPv6 stack sends additional packets during test. Test
filters out these with a magic number in test packets. Some
times Linux veth bridge interface overflows due to these extra
packets and test packets are lost. Added debug information
for easier debug of these kind of issues.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-and-tested-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/test/validation/api/pktio/pktio.c b/test/validation/api/pktio/pktio.c
index a4f7cecd2..15f58e95a 100644
--- a/test/validation/api/pktio/pktio.c
+++ b/test/validation/api/pktio/pktio.c
@@ -219,8 +219,9 @@ static uint32_t pktio_pkt_seq_hdr(odp_packet_t pkt, size_t l4_hdr_len)
}
if (head.magic != TEST_SEQ_MAGIC) {
- fprintf(stderr, "error: header magic invalid %" PRIu32 "\n",
+ fprintf(stderr, "error: header magic invalid 0x%" PRIx32 "\n",
head.magic);
+ odp_packet_print(pkt);
return TEST_SEQ_INVALID;
}
@@ -237,7 +238,7 @@ static uint32_t pktio_pkt_seq_hdr(odp_packet_t pkt, size_t l4_hdr_len)
CU_ASSERT(seq != TEST_SEQ_INVALID);
} else {
fprintf(stderr,
- "error: tail magic invalid %" PRIu32 "\n",
+ "error: tail magic invalid 0x%" PRIx32 "\n",
tail.magic);
}
} else {
@@ -592,20 +593,24 @@ static int wait_for_packets_hdr(pktio_info_t *pktio_rx, odp_packet_t pkt_tbl[],
uint32_t seq_tbl[], int num, txrx_mode_e mode,
uint64_t ns, size_t l4_hdr_len)
{
- odp_time_t wait_time, end;
+ odp_time_t wait_time, end, start;
int num_rx = 0;
int i;
odp_packet_t pkt_tmp[num];
wait_time = odp_time_local_from_ns(ns);
- end = odp_time_sum(odp_time_local(), wait_time);
+ start = odp_time_local();
+ end = odp_time_sum(start, wait_time);
- do {
+ while (num_rx < num && odp_time_cmp(end, odp_time_local()) > 0) {
int n = get_packets(pktio_rx, pkt_tmp, num - num_rx, mode);
if (n < 0)
break;
+ if (n == 0)
+ continue;
+
for (i = 0; i < n; ++i) {
if (pktio_pkt_seq_hdr(pkt_tmp[i], l4_hdr_len) ==
seq_tbl[num_rx])
@@ -613,7 +618,7 @@ static int wait_for_packets_hdr(pktio_info_t *pktio_rx, odp_packet_t pkt_tbl[],
else
odp_packet_free(pkt_tmp[i]);
}
- } while (num_rx < num && odp_time_cmp(end, odp_time_local()) > 0);
+ }
return num_rx;
}
@@ -795,6 +800,10 @@ static void pktio_txrx_multi(pktio_info_t *pktio_a, pktio_info_t *pktio_b,
num_rx = wait_for_packets(pktio_b, rx_pkt, tx_seq,
num_pkts, mode, ODP_TIME_SEC_IN_NS);
CU_ASSERT(num_rx == num_pkts);
+ if (num_rx != num_pkts) {
+ fprintf(stderr, "error: received %i, out of %i packets\n",
+ num_rx, num_pkts);
+ }
for (i = 0; i < num_rx; ++i) {
odp_packet_data_range_t range;
commit 36009b1444af036c189046ee4edb50d13d861120
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Tue Apr 9 14:36:56 2019 +0300
linux-gen: packet: print packet input flags
Print packet input flag names to improve readability of
odp_packet_print() output.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-and-tested-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index f4c99ce15..be62557d5 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -1736,6 +1736,40 @@ int _odp_packet_cmp_data(odp_packet_t pkt, uint32_t offset,
* ********************************************************
*
*/
+static int packet_print_input_flags(odp_packet_hdr_t *hdr, char *str, int max)
+{
+ int len = 0;
+
+ if (hdr->p.input_flags.l2)
+ len += snprintf(&str[len], max - len, "l2 ");
+ if (hdr->p.input_flags.l3)
+ len += snprintf(&str[len], max - len, "l3 ");
+ if (hdr->p.input_flags.l4)
+ len += snprintf(&str[len], max - len, "l4 ");
+ if (hdr->p.input_flags.eth)
+ len += snprintf(&str[len], max - len, "eth ");
+ if (hdr->p.input_flags.vlan)
+ len += snprintf(&str[len], max - len, "vlan ");
+ if (hdr->p.input_flags.arp)
+ len += snprintf(&str[len], max - len, "arp ");
+ if (hdr->p.input_flags.ipv4)
+ len += snprintf(&str[len], max - len, "ipv4 ");
+ if (hdr->p.input_flags.ipv6)
+ len += snprintf(&str[len], max - len, "ipv6 ");
+ if (hdr->p.input_flags.ipsec)
+ len += snprintf(&str[len], max - len, "ipsec ");
+ if (hdr->p.input_flags.udp)
+ len += snprintf(&str[len], max - len, "udp ");
+ if (hdr->p.input_flags.tcp)
+ len += snprintf(&str[len], max - len, "tcp ");
+ if (hdr->p.input_flags.sctp)
+ len += snprintf(&str[len], max - len, "sctp ");
+ if (hdr->p.input_flags.icmp)
+ len += snprintf(&str[len], max - len, "icmp ");
+
+ return len;
+}
+
void odp_packet_print(odp_packet_t pkt)
{
odp_packet_seg_t seg;
@@ -1753,7 +1787,12 @@ void odp_packet_print(odp_packet_t pkt)
len += odp_buffer_snprint(&str[len], n - len, buf);
len += snprintf(&str[len], n - len, " input_flags 0x%" PRIx64 "\n",
hdr->p.input_flags.all);
- len += snprintf(&str[len], n - len, " flags 0x%" PRIx32 "\n",
+ if (hdr->p.input_flags.all) {
+ len += snprintf(&str[len], n - len, " ");
+ len += packet_print_input_flags(hdr, &str[len], n - len);
+ len += snprintf(&str[len], n - len, "\n");
+ }
+ len += snprintf(&str[len], n - len, " flags 0x%" PRIx32 "\n",
hdr->p.flags.all_flags);
len += snprintf(&str[len], n - len,
" l2_offset %" PRIu32 "\n", hdr->p.l2_offset);
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_packet.c | 41 ++++++++++++++++++++++++++++++++++++-
test/validation/api/pktio/pktio.c | 21 +++++++++++++------
2 files changed, 55 insertions(+), 7 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 0178075e5e16e843034ac59ad4978e6a70ef86b5 (commit)
from d102056f2e93940946f39d5da160c2c0684b3a2e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0178075e5e16e843034ac59ad4978e6a70ef86b5
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Wed Apr 3 14:15:10 2019 +0300
linux-gen: crypto: disable openssl locking callbacks
Starting from OpenSSL versions 1.1.0 the locking callbacks are no longer
required.
Fixes: https://github.com/OpenDataPlane/odp/issues/817
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reported-by: Jussi Kerttula <jussi.kerttula(a)nokia.com>
diff --git a/platform/linux-generic/odp_crypto_openssl.c b/platform/linux-generic/odp_crypto_openssl.c
index 8feebefb3..7507f1aa8 100644
--- a/platform/linux-generic/odp_crypto_openssl.c
+++ b/platform/linux-generic/odp_crypto_openssl.c
@@ -1828,6 +1828,7 @@ odp_crypto_operation(odp_crypto_op_param_t *param,
return 0;
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
static void ODP_UNUSED openssl_thread_id(CRYPTO_THREADID ODP_UNUSED *id)
{
CRYPTO_THREADID_set_numeric(id, odp_thread_id());
@@ -1842,6 +1843,7 @@ static void ODP_UNUSED openssl_lock(int mode, int n,
else
odp_ticketlock_unlock(&global->openssl_lock[n]);
}
+#endif
int
odp_crypto_init_global(void)
@@ -1880,8 +1882,10 @@ odp_crypto_init_global(void)
for (idx = 0; idx < nlocks; idx++)
odp_ticketlock_init(&global->openssl_lock[idx]);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
CRYPTO_THREADID_set_callback(openssl_thread_id);
CRYPTO_set_locking_callback(openssl_lock);
+#endif
}
return 0;
@@ -1901,8 +1905,10 @@ int odp_crypto_term_global(void)
rc = -1;
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
CRYPTO_set_locking_callback(NULL);
CRYPTO_set_id_callback(NULL);
+#endif
ret = odp_shm_free(odp_shm_lookup("_odp_crypto_pool_ssl"));
if (ret < 0) {
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_crypto_openssl.c | 6 ++++++
1 file changed, 6 insertions(+)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via d102056f2e93940946f39d5da160c2c0684b3a2e (commit)
from 6a45a52beaab49ab30a06a4cafe60bb869c1800d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d102056f2e93940946f39d5da160c2c0684b3a2e
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Tue Apr 2 15:53:38 2019 +0300
validation: classification: check handles before calling destroy
Some of the array elements may not be set if the number of supported
scheduling priorities is low.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Stanislaw Kardach <skardach(a)marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen(a)nokia.com>
diff --git a/test/validation/api/classification/odp_classification_tests.c b/test/validation/api/classification/odp_classification_tests.c
index 4f7221403..3951d8bed 100644
--- a/test/validation/api/classification/odp_classification_tests.c
+++ b/test/validation/api/classification/odp_classification_tests.c
@@ -119,17 +119,25 @@ int classification_suite_term(void)
retcode = -1;
}
- for (i = 0; i < CLS_ENTRIES; i++)
- odp_cos_destroy(cos_list[i]);
+ for (i = 0; i < CLS_ENTRIES; i++) {
+ if (cos_list[i] != ODP_COS_INVALID)
+ odp_cos_destroy(cos_list[i]);
+ }
- for (i = 0; i < CLS_ENTRIES; i++)
- odp_cls_pmr_destroy(pmr_list[i]);
+ for (i = 0; i < CLS_ENTRIES; i++) {
+ if (pmr_list[i] != ODP_PMR_INVALID)
+ odp_cls_pmr_destroy(pmr_list[i]);
+ }
- for (i = 0; i < CLS_ENTRIES; i++)
- odp_queue_destroy(queue_list[i]);
+ for (i = 0; i < CLS_ENTRIES; i++) {
+ if (queue_list[i] != ODP_QUEUE_INVALID)
+ odp_queue_destroy(queue_list[i]);
+ }
- for (i = 0; i < CLS_ENTRIES; i++)
- odp_pool_destroy(pool_list[i]);
+ for (i = 0; i < CLS_ENTRIES; i++) {
+ if (pool_list[i] != ODP_POOL_INVALID)
+ odp_pool_destroy(pool_list[i]);
+ }
return retcode;
}
-----------------------------------------------------------------------
Summary of changes:
.../api/classification/odp_classification_tests.c | 24 ++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
hooks/post-receive
--