From patchwork Fri May 20 16:30:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 68264 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3855223qge; Fri, 20 May 2016 08:48:16 -0700 (PDT) X-Received: by 10.55.71.76 with SMTP id u73mr4067086qka.6.1463759296915; Fri, 20 May 2016 08:48:16 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m90si13209308qgd.4.2016.05.20.08.48.16; Fri, 20 May 2016 08:48:16 -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 847BD6178D; Fri, 20 May 2016 15:48:16 +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 7CE89617EA; Fri, 20 May 2016 15:34:37 +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 481D561866; Fri, 20 May 2016 15:34:35 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id 4D5DE617EA for ; Fri, 20 May 2016 15:32:17 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id m64so50919182lfd.1 for ; Fri, 20 May 2016 08:32:17 -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=SaQrwfkEPlLV2S/6lmw7YOcrPRwKFx3rkL0hJ6L7puTcxVl5n/mnOlS2lUZULvWgIV n/mTlJKH2kQ6D5EuawGvgsvaFdpFDWn/JPZReg4HwWtbbMbWZCwfCvBszkEX6kk1ATnq E8PbzS6yipv0KJ9ikZZs6qquu7pC6Wp/QmLBtJmjcis5W/8GDSoC5dVVQ4n5N9b36kec 94G6ivwI0RaeADtGBTzZKdVgFmWLHFsrCxm1kpRmf1y7smZaV5eymu/T1LSQpc3Rdazq p+RBGrd2Ha+fxMhyg31SxKpn0+brREmKowVKHNo00JSpuuQLG4S2S2FktNv/wuaH1c4H cozQ== X-Gm-Message-State: AOPr4FWedSaq18JUsmAjWnW5T2IqKVEBE6LfhQuEZtq/fEO/9FvaZCsmKkjL+7uxiLIvJw6oEqI= X-Received: by 10.25.21.96 with SMTP id l93mr1313659lfi.41.1463758336159; Fri, 20 May 2016 08:32:16 -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 tg1sm3348847lbb.7.2016.05.20.08.32.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 May 2016 08:32:15 -0700 (PDT) From: Christophe Milard To: maxim.uvarov@linaro.com, lng-odp@lists.linaro.org Date: Fri, 20 May 2016 18:30:31 +0200 Message-Id: <1463761851-37121-16-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1463761851-37121-1-git-send-email-christophe.milard@linaro.org> References: <1463761851-37121-1-git-send-email-christophe.milard@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCHv9 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); }