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
--
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 78364dc1d53a1a4c4918ce0a82d02fe56f0abb54 (commit)
from 9bdd6ed64a1603f15c869be637093abb88f196a8 (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 78364dc1d53a1a4c4918ce0a82d02fe56f0abb54
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Thu May 16 12:56:48 2019 +0300
configure: add option to disable pcap pktio support
Add '--without-pcap' option to explicitly build ODP without PCAP pktio
regardless of if the library is available on the build host.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen(a)nokia.com>
Suggested-by: Risto Reittinen <risto.teittinen(a)nokia-bell-labs.com>
diff --git a/.travis.yml b/.travis.yml
index ea26ddedd..a32b48e0b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -71,7 +71,7 @@ env:
- CONF="--disable-host-optimization --disable-abi-compat"
- CHECK=0 ARCH="x86_64" CONF="--enable-pcapng-support"
- CHECK=0 ARCH="x86_64" OS="centos_7"
- - CONF="--without-openssl"
+ - CONF="--without-openssl --without-pcap"
- OS="ubuntu_18.04"
matrix:
diff --git a/platform/linux-generic/m4/odp_pcap.m4 b/m4/odp_pcap.m4
similarity index 65%
rename from platform/linux-generic/m4/odp_pcap.m4
rename to m4/odp_pcap.m4
index 0a8f35186..239ce385f 100644
--- a/platform/linux-generic/m4/odp_pcap.m4
+++ b/m4/odp_pcap.m4
@@ -1,3 +1,7 @@
+# ODP_PCAP([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# --------------------------------------------------
+AC_DEFUN([ODP_PCAP],
+[dnl
#########################################################################
# Check for libpcap availability
#########################################################################
@@ -11,10 +15,15 @@ AC_CHECK_HEADER(pcap/pcap.h,
if test "$have_pcap" = "yes"; then
AC_DEFINE([HAVE_PCAP], 1, [Define to 1 if you have pcap library])
PCAP_LIBS="-lpcap"
+else
+ PCAP_LIBS=""
fi
AC_SUBST([PCAP_LIBS])
-AC_CONFIG_COMMANDS_PRE([dnl
-AM_CONDITIONAL([HAVE_PCAP], [test x$have_pcap = xyes])
-])
+if test "x$have_pcap" = "xyes" ; then
+ m4_default([$1], [:])
+else
+ m4_default([$2], [:])
+fi
+]) # ODP_PCAP
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4
index 1dd14cd4d..3ab01f2b7 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -13,8 +13,17 @@ AC_ARG_WITH([openssl],
AS_IF([test "$with_openssl" != "no"],
[ODP_OPENSSL])
AM_CONDITIONAL([WITH_OPENSSL], [test x$with_openssl != xno])
+
+AC_ARG_WITH([pcap],
+ [AS_HELP_STRING([--without-pcap],
+ [compile without PCAP])],
+ [],
+ [with_pcap=yes])
+AS_IF([test "x$with_pcap" != xno],
+ [ODP_PCAP([with_pcap=yes]‚[with_pcap=no])])
+AM_CONDITIONAL([HAVE_PCAP], [test x$have_pcap = xyes])
+
ODP_LIBCONFIG([linux-generic])
-m4_include([platform/linux-generic/m4/odp_pcap.m4])
m4_include([platform/linux-generic/m4/odp_pcapng.m4])
m4_include([platform/linux-generic/m4/odp_netmap.m4])
m4_include([platform/linux-generic/m4/odp_dpdk.m4])
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 2 +-
{platform/linux-generic/m4 => m4}/odp_pcap.m4 | 15 ++++++++++++---
platform/linux-generic/m4/configure.m4 | 11 ++++++++++-
3 files changed, 23 insertions(+), 5 deletions(-)
rename {platform/linux-generic/m4 => m4}/odp_pcap.m4 (65%)
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 7f0d32bbbbac6ecd321044cf2e9945bf0a3aba8e (commit)
from c4fb7b94edc770c66fd46ba32df586f1a74a3a37 (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 7f0d32bbbbac6ecd321044cf2e9945bf0a3aba8e
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Mon May 6 16:32:10 2019 +0300
test: sched_latency: resume scheduling only on main thread
Prevent pre-scheduling events to terminating threads.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Stanislaw Kardach <skardach(a)marvell.com>
diff --git a/test/performance/odp_sched_latency.c b/test/performance/odp_sched_latency.c
index b5be1a163..ee5d0f417 100644
--- a/test/performance/odp_sched_latency.c
+++ b/test/performance/odp_sched_latency.c
@@ -425,11 +425,10 @@ static int test_schedule(int thr, test_globals_t *globals)
}
}
- odp_schedule_resume();
-
odp_barrier_wait(&globals->barrier);
if (thr == MAIN_THREAD) {
+ odp_schedule_resume();
clear_sched_queues(globals);
print_results(globals);
}
-----------------------------------------------------------------------
Summary of changes:
test/performance/odp_sched_latency.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
hooks/post-receive
--