From patchwork Tue Sep 8 10:31:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 53257 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 52B8622B05 for ; Tue, 8 Sep 2015 10:32:20 +0000 (UTC) Received: by lamp12 with SMTP id p12sf34540804lam.2 for ; Tue, 08 Sep 2015 03:32:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=di9oRr8qOXfqT9fcCKedJwszhfUnTqHtA6w3vLbwO2g=; b=D6Doe/OEkGNj45XaNCQVMQwKv7BF1iQKKzqvBWPGc/D58hYD7ag1WCzA7TF4y5BrAn zxu43tU3vGvqQElCbdAz8e3XOu1vHkUFMGQ/Ip7n7zja788FV0FZIx0f7Eqg0M7kRJEw 06C9m4oqkiwAEOUdPgnyBc9sEprttplyVktHSK4G4xfjNSerXG6GJzYdKxJiQ5BN945V IcR75xMf/EmGmTGrIFxSioGMBiJpRObkxSMenJSLlKL8MvLDV0AiXt29WMsI0KFll8Q6 Y8v+zHrU0ADUzXoG2D6wTnbVIX3PMUfw8aXj/glqz0KY11nYYqYv0Z8QqW5lvmZTgsAo 7kfQ== X-Gm-Message-State: ALoCoQn1D8hQClQDYvI7dDPe1NsBtKWvfWMCg+PkZxHhBRHrD/IEfWejbiTkTyj6muyXa/mTw9+m X-Received: by 10.180.96.226 with SMTP id dv2mr6368938wib.2.1441708339333; Tue, 08 Sep 2015 03:32:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.137 with SMTP id d9ls216488laf.42.gmail; Tue, 08 Sep 2015 03:32:19 -0700 (PDT) X-Received: by 10.152.27.70 with SMTP id r6mr2041498lag.67.1441708339154; Tue, 08 Sep 2015 03:32:19 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id y9si2820820lae.11.2015.09.08.03.32.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 03:32:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by lagj9 with SMTP id j9so66701054lag.2 for ; Tue, 08 Sep 2015 03:32:19 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr22057361lbb.56.1441708339026; Tue, 08 Sep 2015 03:32:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp879664lbq; Tue, 8 Sep 2015 03:32:18 -0700 (PDT) X-Received: by 10.140.27.130 with SMTP id 2mr6885009qgx.72.1441708337938; Tue, 08 Sep 2015 03:32:17 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i30si3187329qkh.117.2015.09.08.03.32.17; Tue, 08 Sep 2015 03:32:17 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 03DDC61823; Tue, 8 Sep 2015 10:32:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id BFDDC61966; Tue, 8 Sep 2015 10:31:42 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3B97861966; Tue, 8 Sep 2015 10:31:36 +0000 (UTC) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by lists.linaro.org (Postfix) with ESMTPS id E2A7C61823 for ; Tue, 8 Sep 2015 10:31:33 +0000 (UTC) Received: by lbpo4 with SMTP id o4so50851806lbp.2 for ; Tue, 08 Sep 2015 03:31:32 -0700 (PDT) X-Received: by 10.112.235.130 with SMTP id um2mr21775931lbc.72.1441708292484; Tue, 08 Sep 2015 03:31:32 -0700 (PDT) Received: from localhost.localdomain (ppp91-76-161-180.pppoe.mtu-net.ru. [91.76.161.180]) by smtp.gmail.com with ESMTPSA id c6sm810079lbp.2.2015.09.08.03.31.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Sep 2015 03:31:32 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 8 Sep 2015 13:31:21 +0300 Message-Id: <1441708283-29002-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441708283-29002-1-git-send-email-maxim.uvarov@linaro.org> References: <1441708283-29002-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 2/4] linux-generic/validation/example/helper: rename to odp_cpumask_default_worker X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Do renames to odp_cpumask_default_worker and odp_cpumask_default_control. Signed-off-by: Maxim Uvarov --- example/classifier/odp_classifier.c | 2 +- example/generator/odp_generator.c | 4 ++-- example/ipsec/odp_ipsec.c | 2 +- example/packet/odp_pktio.c | 2 +- example/timer/odp_timer_test.c | 2 +- helper/test/odp_process.c | 2 +- helper/test/odp_thread.c | 2 +- test/api_test/odp_common.c | 2 +- test/performance/odp_atomic.c | 2 +- test/performance/odp_l2fwd.c | 2 +- test/performance/odp_pktio_perf.c | 5 +++-- test/performance/odp_scheduling.c | 2 +- test/validation/common/odp_cunit_common.c | 2 +- test/validation/cpumask/cpumask.c | 8 ++++---- test/validation/scheduler/scheduler.c | 2 +- test/validation/synchronizers/synchronizers.c | 2 +- 16 files changed, 22 insertions(+), 21 deletions(-) diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index 3123936..2d90ae7 100644 --- a/example/classifier/odp_classifier.c +++ b/example/classifier/odp_classifier.c @@ -431,7 +431,7 @@ int main(int argc, char *argv[]) num_workers = args->cpu_count; /* Get default worker cpumask */ - num_workers = odp_cpumask_def_worker(&cpumask, num_workers); + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); (void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr)); printf("num worker threads: %i\n", num_workers); diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index f7aed76..3bb6c4f 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -692,7 +692,7 @@ int main(int argc, char *argv[]) if (args->appl.cpu_count) num_workers = args->appl.cpu_count; - num_workers = odp_cpumask_def_worker(&cpumask, num_workers); + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); if (args->appl.mask) { odp_cpumask_from_str(&cpumask, args->appl.mask); num_workers = odp_cpumask_count(&cpumask); @@ -918,7 +918,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) case 'c': appl_args->mask = optarg; odp_cpumask_from_str(&cpumask_args, args->appl.mask); - num_workers = odp_cpumask_def_worker(&cpumask, 0); + num_workers = odp_cpumask_default_worker(&cpumask, 0); odp_cpumask_and(&cpumask_and, &cpumask_args, &cpumask); if (odp_cpumask_count(&cpumask_and) < odp_cpumask_count(&cpumask_args)) { diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index 96effe2..998e51d 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example/ipsec/odp_ipsec.c @@ -1296,7 +1296,7 @@ main(int argc, char *argv[]) num_workers = args->appl.cpu_count; /* Get default worker cpumask */ - num_workers = odp_cpumask_def_worker(&cpumask, num_workers); + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); (void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr)); printf("num worker threads: %i\n", num_workers); diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index df53ea2..ce53ee3 100644 --- a/example/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -386,7 +386,7 @@ int main(int argc, char *argv[]) num_workers = args->appl.cpu_count; /* Get default worker cpumask */ - num_workers = odp_cpumask_def_worker(&cpumask, num_workers); + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); (void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr)); printf("num worker threads: %i\n", num_workers); diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c index 49630b0..ce9faf9 100644 --- a/example/timer/odp_timer_test.c +++ b/example/timer/odp_timer_test.c @@ -381,7 +381,7 @@ int main(int argc, char *argv[]) num_workers = gbls->args.cpu_count; /* Get default worker cpumask */ - num_workers = odp_cpumask_def_worker(&cpumask, num_workers); + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); (void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr)); printf("num worker threads: %i\n", num_workers); diff --git a/helper/test/odp_process.c b/helper/test/odp_process.c index d3a5943..cb9b328 100644 --- a/helper/test/odp_process.c +++ b/helper/test/odp_process.c @@ -39,7 +39,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED) } /* discover how many processes this system can support */ - num_workers = odp_cpumask_def_worker(&cpu_mask, NUMBER_WORKERS); + num_workers = odp_cpumask_default_worker(&cpu_mask, NUMBER_WORKERS); if (num_workers < NUMBER_WORKERS) { printf("System can only support %d processes and not the %d requested\n", num_workers, NUMBER_WORKERS); diff --git a/helper/test/odp_thread.c b/helper/test/odp_thread.c index 1de30ab..592f856 100644 --- a/helper/test/odp_thread.c +++ b/helper/test/odp_thread.c @@ -40,7 +40,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED) } /* discover how many threads this system can support */ - num_workers = odp_cpumask_def_worker(&cpu_mask, NUMBER_WORKERS); + num_workers = odp_cpumask_default_worker(&cpu_mask, NUMBER_WORKERS); if (num_workers < NUMBER_WORKERS) { printf("System can only support %d threads and not the %d requested\n", num_workers, NUMBER_WORKERS); diff --git a/test/api_test/odp_common.c b/test/api_test/odp_common.c index 0dbefa5..681d915 100644 --- a/test/api_test/odp_common.c +++ b/test/api_test/odp_common.c @@ -74,7 +74,7 @@ int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg) odp_cpumask_t cpumask; /* Create and init additional threads */ - odp_cpumask_def_worker(&cpumask, arg->numthrds); + odp_cpumask_default_worker(&cpumask, arg->numthrds); odph_linux_pthread_create(thread_tbl, &cpumask, func_ptr, (void *)arg); diff --git a/test/performance/odp_atomic.c b/test/performance/odp_atomic.c index eefce06..1402a0c 100644 --- a/test/performance/odp_atomic.c +++ b/test/performance/odp_atomic.c @@ -284,7 +284,7 @@ int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg) odp_cpumask_t cpumask; /* Create and init additional threads */ - odp_cpumask_def_worker(&cpumask, arg->numthrds); + odp_cpumask_default_worker(&cpumask, arg->numthrds); odph_linux_pthread_create(thread_tbl, &cpumask, func_ptr, (void *)arg); diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 64fc1b2..5155599 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -418,7 +418,7 @@ int main(int argc, char *argv[]) num_workers = gbl_args->appl.cpu_count; /* Get default worker cpumask */ - num_workers = odp_cpumask_def_worker(&cpumask, num_workers); + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); (void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr)); printf("num worker threads: %i\n", num_workers); diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 709becf..4437008 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -544,8 +544,9 @@ static int setup_txrx_masks(odp_cpumask_t *thd_mask_tx, int num_workers, num_tx_workers, num_rx_workers; int i, cpu; - num_workers = odp_cpumask_def_worker(&cpumask, - gbl_args->args.cpu_count); + num_workers = + odp_cpumask_default_worker(&cpumask, + gbl_args->args.cpu_count); if (num_workers < 2) { LOG_ERR("Need at least two cores\n"); return -1; diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index 2a7e531..18540fc 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -891,7 +891,7 @@ int main(int argc, char *argv[]) num_workers = args.cpu_count; /* Get default worker cpumask */ - num_workers = odp_cpumask_def_worker(&cpumask, num_workers); + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); (void)odp_cpumask_to_str(&cpumask, cpumaskstr, sizeof(cpumaskstr)); printf("num worker threads: %i\n", num_workers); diff --git a/test/validation/common/odp_cunit_common.c b/test/validation/common/odp_cunit_common.c index d995ad3..0f79199 100644 --- a/test/validation/common/odp_cunit_common.c +++ b/test/validation/common/odp_cunit_common.c @@ -28,7 +28,7 @@ int odp_cunit_thread_create(void *func_ptr(void *), pthrd_arg *arg) odp_cpumask_t cpumask; /* Create and init additional threads */ - odp_cpumask_def_worker(&cpumask, arg->numthrds); + odp_cpumask_default_worker(&cpumask, arg->numthrds); return odph_linux_pthread_create(thread_tbl, &cpumask, func_ptr, (void *)arg); diff --git a/test/validation/cpumask/cpumask.c b/test/validation/cpumask/cpumask.c index 6d57028..d09744a 100644 --- a/test/validation/cpumask/cpumask.c +++ b/test/validation/cpumask/cpumask.c @@ -20,7 +20,7 @@ void cpumask_test_odp_cpumask_def_control(void) unsigned max_cpus = mask_capacity(); odp_cpumask_t mask; - num = odp_cpumask_def_control(&mask, ALL_AVAILABLE); + num = odp_cpumask_default_control(&mask, ALL_AVAILABLE); mask_count = odp_cpumask_count(&mask); CU_ASSERT(mask_count == num); @@ -35,7 +35,7 @@ void cpumask_test_odp_cpumask_def_worker(void) unsigned max_cpus = mask_capacity(); odp_cpumask_t mask; - num = odp_cpumask_def_worker(&mask, ALL_AVAILABLE); + num = odp_cpumask_default_worker(&mask, ALL_AVAILABLE); mask_count = odp_cpumask_count(&mask); CU_ASSERT(mask_count == num); @@ -59,11 +59,11 @@ void cpumask_test_odp_cpumask_def(void) requested_cpus = available_cpus - 1; else requested_cpus = available_cpus; - num_worker = odp_cpumask_def_worker(&mask, requested_cpus); + num_worker = odp_cpumask_default_worker(&mask, requested_cpus); mask_count = odp_cpumask_count(&mask); CU_ASSERT(mask_count == num_worker); - num_control = odp_cpumask_def_control(&mask, 1); + num_control = odp_cpumask_default_control(&mask, 1); mask_count = odp_cpumask_count(&mask); CU_ASSERT(mask_count == num_control); diff --git a/test/validation/scheduler/scheduler.c b/test/validation/scheduler/scheduler.c index 1874889..d94de6b 100644 --- a/test/validation/scheduler/scheduler.c +++ b/test/validation/scheduler/scheduler.c @@ -1017,7 +1017,7 @@ int scheduler_suite_init(void) memset(globals, 0, sizeof(test_globals_t)); - globals->num_workers = odp_cpumask_def_worker(&mask, 0); + globals->num_workers = odp_cpumask_default_worker(&mask, 0); if (globals->num_workers > MAX_WORKERS) globals->num_workers = MAX_WORKERS; diff --git a/test/validation/synchronizers/synchronizers.c b/test/validation/synchronizers/synchronizers.c index 0a31a40..06977f9 100644 --- a/test/validation/synchronizers/synchronizers.c +++ b/test/validation/synchronizers/synchronizers.c @@ -1082,7 +1082,7 @@ int synchronizers_init(void) global_mem->g_iterations = MAX_ITERATIONS; global_mem->g_verbose = VERBOSE; - workers_count = odp_cpumask_def_worker(&mask, 0); + workers_count = odp_cpumask_default_worker(&mask, 0); max_threads = (workers_count >= MAX_WORKERS) ? MAX_WORKERS : workers_count;