From patchwork Thu May 19 16:26:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 68145 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3276111qge; Thu, 19 May 2016 08:44:44 -0700 (PDT) X-Received: by 10.140.234.130 with SMTP id f124mr14973972qhc.65.1463672684055; Thu, 19 May 2016 08:44:44 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 59si13152450qgb.51.2016.05.19.08.44.43; Thu, 19 May 2016 08:44:44 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 98DEA617F5; Thu, 19 May 2016 15:44:43 +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 CAC8161869; Thu, 19 May 2016 15:31:17 +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 8C89761850; Thu, 19 May 2016 15:31:05 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by lists.linaro.org (Postfix) with ESMTPS id 7CD2C61808 for ; Thu, 19 May 2016 15:28:44 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id m64so38675208lfd.1 for ; Thu, 19 May 2016 08:28:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vix4NM/pYlrlc7UxHHugok9eGUMgFeYOUiUF1wDUof8=; b=Va9jhNd8mJrRYgXa/Jqm9HQQqaqA8YktmCAOgywQxpMjmeXjggA60Y3SkY8SI9/ULQ y1c9LM42njz6+GZApL3vHOlJnNcZOxcyhO0XaxZH2dGzVQguOj0cz5lqkq9M9iNYbpfz pKndmtslVcjeN2dJQDvZrjDNZpO2VXnK45iLn0efCBibRUPrlU4kO7Z5ISxgduM9B3lZ 3MFacIpSqC/xYkOhKaCqM8hiB8rJxmctTN9CbQP7sfV3klJbCJXX4C73T+jkEeqbcb8s JG8XqqgZVEkJLUPona2MRO36MbLmgwG71EMA1KEKDVgbcABhBzaF+P5L9pJmlu5xl+uh G+pg== X-Gm-Message-State: AOPr4FWIGKngXmllp6LF9oGk5+KPdYki94zEW9/SYT4+p2Uyn36YZdbrslMXAFRySvRxzqbzklM= X-Received: by 10.25.79.12 with SMTP id d12mr4961104lfb.68.1463671723460; Thu, 19 May 2016 08:28:43 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id cv11sm2366290lbb.49.2016.05.19.08.28.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 May 2016 08:28:42 -0700 (PDT) From: Christophe Milard To: brian.brooks@linaro.org, maxim.uvarov@linaro.com, lng-odp@lists.linaro.org Date: Thu, 19 May 2016 18:26:54 +0200 Message-Id: <1463675234-6739-16-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1463675234-6739-1-git-send-email-christophe.milard@linaro.org> References: <1463675234-6739-1-git-send-email-christophe.milard@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCHv8 15/35] performance: crypto: using agnostic function for ODP threads X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" odp_crypto is changed to use the implementation agnostic ODP thread create and join functions, from helpers. odp_crypto is hence no longer aware on how the odpthread is implemented. Signed-off-by: Christophe Milard --- test/performance/odp_crypto.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/performance/odp_crypto.c b/test/performance/odp_crypto.c index 595a266..893a5a3 100644 --- a/test/performance/odp_crypto.c +++ b/test/performance/odp_crypto.c @@ -704,13 +704,13 @@ typedef struct thr_arg { crypto_alg_config_t *crypto_alg_config; } thr_arg_t; -static void *run_thr_func(void *arg) +static int run_thr_func(void *arg) { thr_arg_t *thr_args = (thr_arg_t *)arg; run_measure_one_config(&thr_args->crypto_args, thr_args->crypto_alg_config); - return NULL; + return 0; } int main(int argc, char *argv[]) @@ -724,7 +724,7 @@ int main(int argc, char *argv[]) odp_cpumask_t cpumask; char cpumaskstr[ODP_CPUMASK_STR_SIZE]; int num_workers = 1; - odph_linux_pthread_t thr[num_workers]; + odph_odpthread_t thr[num_workers]; odp_instance_t instance; memset(&cargs, 0, sizeof(cargs)); @@ -797,7 +797,7 @@ int main(int argc, char *argv[]) memset(thr, 0, sizeof(thr)); if (cargs.alg_config) { - odph_linux_thr_params_t thr_params; + odph_odpthread_params_t thr_params; memset(&thr_params, 0, sizeof(thr_params)); thr_params.start = run_thr_func; @@ -806,8 +806,8 @@ int main(int argc, char *argv[]) thr_params.instance = instance; if (cargs.schedule) { - odph_linux_pthread_create(&thr[0], &cpumask, &thr_params); - odph_linux_pthread_join(&thr[0], num_workers); + odph_odpthreads_create(&thr[0], &cpumask, &thr_params); + odph_odpthreads_join(&thr[0]); } else { run_measure_one_config(&cargs, cargs.alg_config); }