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 6b581d0633209527f2fb3f63fcd5a4986f5c0891 (commit)
via e2b2e2357d6999f62ccecdd5a34adefb7a8735fa (commit)
from c317e53fa7268154ca5a50cc2685ca9cdf2a89d8 (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 6b581d0633209527f2fb3f63fcd5a4986f5c0891
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Thu Jun 20 16:18:34 2019 +0300
configure: print CXXFLAGS
In addition to CFLAGS print also CXXFLAGS after configure.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Dmitry Eremin-Solenikov <deremin-solenikov(a)cavium.com>
diff --git a/configure.ac b/configure.ac
index ab5393dbf..536999386 100644
--- a/configure.ac
+++ b/configure.ac
@@ -428,6 +428,7 @@ AC_MSG_RESULT([
cc version: ${CC_VERSION}
cppflags: ${CPPFLAGS}
cflags: ${CFLAGS}
+ cxxflags: ${CXXFLAGS}
ld: ${LD}
ldflags: ${LDFLAGS}
libs: ${LIBS}
commit e2b2e2357d6999f62ccecdd5a34adefb7a8735fa
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Thu Jun 20 16:13:34 2019 +0300
configure: default CFLAGS definition
If user defines CFLAGS do not add -march option as user defined
flags may contain another -march or other related options.
Automake sets CFLAGS to "-g -O2" by default, so CFLAGS check
must to be done before AM_INIT.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Dmitry Eremin-Solenikov <deremin-solenikov(a)cavium.com>
diff --git a/configure.ac b/configure.ac
index 8f9de1489..ab5393dbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,13 @@ AC_SUBST(ODPH_VERSION_MAJOR)
ODPH_VERSION_MINOR=odph_version_minor
AC_SUBST(ODPH_VERSION_MINOR)
+##########################################################################
+# Test if user has set CFLAGS. Automake initializes CFLAGS to "-g -O2"
+# by default.
+##########################################################################
+AS_IF([test "$ac_cv_env_CFLAGS_set" = ""], [user_cflags=0], [user_cflags=1])
+
+# Initialize automake
AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects foreign nostdinc -Wall -Werror])
AC_CONFIG_SRCDIR([include/odp/api/spec/init.h])
AM_CONFIG_HEADER([include/config.h])
@@ -216,12 +223,16 @@ AC_ARG_ENABLE([abi-compat],
[if test "x$enableval" = "xno"; then
ODP_ABI_COMPAT=0
abi_compat=no
+
#if there is no ABI compatibility the .so numbers are meaningless
ODP_LIBSO_VERSION=0:0:0
- # do not try -march=native for clang due to possible failures on
- # clang optimizations
+
+ # do not use -march=native with clang (due to possible failures on
+ # clang optimizations) or when user have defined CFLAGS (may contain
+ # another -march option).
$CC --version | grep -q clang
- if test $? -ne 0; then
+
+ if test $? -ne 0 -a $user_cflags -eq 0; then
ODP_CHECK_CFLAG([-march=native])
fi
fi])
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 18 +++++++++++++++---
1 file changed, 15 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 feac45e3ed8fa871ae7f9826d0c045591f22ce42 (commit)
via e4ef7a3b32d375e3e1872a43697d407413ae87aa (commit)
via 762e4c51fc0d61bee8e740370fa6c64f86a5ee6c (commit)
from 6a30a1beb7ec2182239ea3ba1ef71a6f9a944df9 (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 feac45e3ed8fa871ae7f9826d0c045591f22ce42
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Wed Jun 5 14:26:13 2019 +0300
example: time: include into make check
Run time example as part of 'make check'.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/example/time/Makefile.am b/example/time/Makefile.am
index bda908761..5621ef99e 100644
--- a/example/time/Makefile.am
+++ b/example/time/Makefile.am
@@ -2,4 +2,8 @@ include $(top_srcdir)/example/Makefile.inc
bin_PROGRAMS = odp_time_global
+if test_example
+TESTS = odp_time_global
+endif
+
odp_time_global_SOURCES = time_global_test.c
commit e4ef7a3b32d375e3e1872a43697d407413ae87aa
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Thu Jun 6 10:32:23 2019 +0300
example: time: fix deadlock with single worker
Random id calculation did get stuck when there's only single
worker (as id is always one).
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/example/time/time_global_test.c b/example/time/time_global_test.c
index efcd22984..1e5cb0bd4 100644
--- a/example/time/time_global_test.c
+++ b/example/time/time_global_test.c
@@ -84,20 +84,23 @@ static void print_log(test_globals_t *gbls)
printf("Number of errors: %u\n", err_num);
}
-static void
-generate_next_queue(test_globals_t *gbls, odp_queue_t *queue, unsigned int id)
+static void generate_next_queue(test_globals_t *gbls, odp_queue_t *queue,
+ unsigned int id)
{
int thr;
- unsigned int rand_id;
+ uint8_t rand_u8;
char queue_name[sizeof(QUEUE_NAME_PREFIX) + 2];
+ unsigned int rand_id = 1;
thr = odp_thread_id();
/* generate next random id */
- do {
- odp_random_data((uint8_t *)&rand_id, sizeof(rand_id), 1);
- rand_id = rand_id % gbls->thread_num + 1;
- } while (rand_id == id);
+ if (gbls->thread_num > 1) {
+ do {
+ odp_random_data(&rand_u8, 1, ODP_RANDOM_BASIC);
+ rand_id = rand_u8 % gbls->thread_num + 1;
+ } while (rand_id == id);
+ }
sprintf(queue_name, QUEUE_NAME_PREFIX "%d", rand_id);
*queue = odp_queue_lookup(queue_name);
commit 762e4c51fc0d61bee8e740370fa6c64f86a5ee6c
Author: Petri Savolainen <petri.savolainen(a)nokia.com>
Date: Wed Jun 5 14:15:19 2019 +0300
example: time: increase pool size
Since pool implementation may stash buffers per thread, pool size of
one buffer per thread is not enough to ensure that every thread can
allocate a buffer. Use similar pool size than other multi-threaded
test applications.
Signed-off-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Reviewed-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/example/time/time_global_test.c b/example/time/time_global_test.c
index 0c4b5286c..efcd22984 100644
--- a/example/time/time_global_test.c
+++ b/example/time/time_global_test.c
@@ -11,6 +11,7 @@
#include <odp/helper/odph_api.h>
#define MAX_WORKERS 32
+#define MAX_NUM_BUF 8192
#define ITERATION_NUM 2048
#define LOG_BASE 8
#define LOG_ENTRY_SIZE 19
@@ -250,7 +251,8 @@ int main(int argc, char *argv[])
int num_workers;
test_globals_t *gbls;
odp_cpumask_t cpumask;
- odp_pool_param_t params;
+ odp_pool_capability_t pool_capa;
+ odp_pool_param_t pool_param;
odp_shm_t shm_glbls = ODP_SHM_INVALID;
odp_shm_t shm_log = ODP_SHM_INVALID;
int log_size, log_enries_num;
@@ -319,12 +321,23 @@ int main(int argc, char *argv[])
odp_barrier_init(&gbls->end_barrier, num_workers);
memset(gbls->log, 0, log_size);
- params.buf.size = sizeof(timestamp_event_t);
- params.buf.align = ODP_CACHE_LINE_SIZE;
- params.buf.num = num_workers;
- params.type = ODP_POOL_BUFFER;
+ if (odp_pool_capability(&pool_capa)) {
+ err = 1;
+ EXAMPLE_ERR("Error: pool capability failed.\n");
+ goto err;
+ }
+
+ odp_pool_param_init(&pool_param);
+
+ pool_param.buf.size = sizeof(timestamp_event_t);
+ pool_param.buf.align = ODP_CACHE_LINE_SIZE;
+ pool_param.buf.num = MAX_NUM_BUF;
+ pool_param.type = ODP_POOL_BUFFER;
+
+ if (pool_capa.buf.max_num && MAX_NUM_BUF > pool_capa.buf.max_num)
+ pool_param.buf.num = pool_capa.buf.max_num;
- pool = odp_pool_create("time buffers pool", ¶ms);
+ pool = odp_pool_create("time buffers pool", &pool_param);
if (pool == ODP_POOL_INVALID) {
err = 1;
EXAMPLE_ERR("Pool create failed.\n");
-----------------------------------------------------------------------
Summary of changes:
example/time/Makefile.am | 4 ++++
example/time/time_global_test.c | 42 ++++++++++++++++++++++++++++-------------
2 files changed, 33 insertions(+), 13 deletions(-)
hooks/post-receive
--