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, api-next has been updated via 0bc071471f0466b6c821d561c5b4aadb7a548a36 (commit) via bf65cf6e5d0385262e317c7931a68d61301cb042 (commit) via 5ffbdadc12513adb3e8847692d51963cab223084 (commit) via c709c9f1f235551c27f8db14f7c947f334b10d98 (commit) via 5d2595d1b470497c7fa04fe698f79a5f0346e5b8 (commit) via ad6219e3682d94fb8971261936ace46399ed2085 (commit) via 47b343a8f508b1dad511a1498999caa876c12eb5 (commit) via 5d35ffb5d02c6d3f4cabd170969846b56878f8fd (commit) via 24c6e10cba9d6efeaf13e4ea2a7a422764ae5eb2 (commit) via b18dc645a68fd0ae50f1a361aa408b3e74e46c0d (commit) via 29dde30264da8106d64328b0d81eb19dad0065ac (commit) via 92ae191876c39a3f5d4fba63e58dd9e8c444239b (commit) via 6104182f253161f17fd3ca5a377ed1bac62e366e (commit) via 0142d42744e606257c083ec0ac0077e0cd554e21 (commit) via 2b2ff3f281e17d19a3a7a00a3c8ca5460751cd6f (commit) from 23e46735f93fa6dfc02b3fe78000b137f3c2d983 (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 0bc071471f0466b6c821d561c5b4aadb7a548a36 Merge: 23e4673 bf65cf6 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Fri Jan 13 17:23:54 2017 +0300
Merge branch 'master' into api-next
commit bf65cf6e5d0385262e317c7931a68d61301cb042 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Fri Jan 13 16:22:57 2017 +0300
example: hello: do not pin control thread
hello word app should not use any linux specific things. Pinning thread to core is also optional and should not be in minimal app. This also fixes bug with cgroups env where core 0 is not available.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/example/hello/odp_hello.c b/example/hello/odp_hello.c index 6d114ee..0b75b58 100644 --- a/example/hello/odp_hello.c +++ b/example/hello/odp_hello.c @@ -10,21 +10,12 @@ * anything else than the ODP API header file. */
-/* Linux CPU affinity */ -#define _GNU_SOURCE -#include <sched.h> - -/* Linux PID */ -#include <sys/types.h> -#include <unistd.h> - #include <stdio.h> #include <string.h>
#include <odp_api.h>
typedef struct { - int cpu; int num; } options_t;
@@ -36,17 +27,12 @@ static int parse_args(int argc, char *argv[], options_t *opt) for (i = 1; i < argc; i++) { if ((strcmp(argv[i], args[0]) == 0) && (sscanf(argv[i + 1], "%i", &tmp) == 1)) { - opt->cpu = tmp; - i++; - } else if ((strcmp(argv[i], args[1]) == 0) && - (sscanf(argv[i + 1], "%i", &tmp) == 1)) { opt->num = tmp; i++; } else { printf("\nUsage:\n" - " %s CPU number\n" " %s Number of iterations\n\n", - args[0], args[1]); + args[0]); return -1; } } @@ -58,26 +44,14 @@ int main(int argc, char *argv[]) { odp_instance_t inst; options_t opt; - pid_t pid; - cpu_set_t cpu_set; int i;
memset(&opt, 0, sizeof(opt)); - opt.cpu = 0; opt.num = 1;
if (parse_args(argc, argv, &opt)) return -1;
- pid = getpid(); - CPU_ZERO(&cpu_set); - CPU_SET(opt.cpu, &cpu_set); - - if (sched_setaffinity(pid, sizeof(cpu_set_t), &cpu_set)) { - printf("Set CPU affinity failed.\n"); - return -1; - } - if (odp_init_global(&inst, NULL, NULL)) { printf("Global init failed.\n"); return -1; @@ -85,6 +59,7 @@ int main(int argc, char *argv[])
if (odp_init_local(inst, ODP_THREAD_CONTROL)) { printf("Local init failed.\n"); + (void)odp_term_global(inst); return -1; }
-----------------------------------------------------------------------
Summary of changes: .travis.yml | 6 +- example/generator/odp_generator.c | 2 + example/hello/odp_hello.c | 29 +- example/ipsec/odp_ipsec.c | 26 ++ example/l3fwd/odp_l3fwd.c | 17 ++ example/switch/odp_switch.c | 5 + helper/include/odp/helper/ip.h | 11 +- helper/linux.c | 4 - scripts/build-pktio-dpdk | 4 +- test/common_plat/performance/odp_l2fwd.c | 302 +++++++++++---------- test/common_plat/performance/odp_pktio_perf.c | 8 + test/common_plat/validation/api/atomic/atomic.c | 24 ++ test/common_plat/validation/api/atomic/atomic.h | 1 + test/common_plat/validation/api/barrier/barrier.c | 24 ++ test/common_plat/validation/api/barrier/barrier.h | 1 + test/common_plat/validation/api/lock/lock.c | 24 ++ test/common_plat/validation/api/lock/lock.h | 1 + test/common_plat/validation/api/pktio/pktio.c | 9 +- .../validation/api/scheduler/scheduler.c | 9 + .../validation/api/traffic_mngr/traffic_mngr.c | 4 +- 20 files changed, 329 insertions(+), 182 deletions(-)
hooks/post-receive