From patchwork Tue May 17 13:04:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 67963 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2077911qge; Tue, 17 May 2016 06:32:29 -0700 (PDT) X-Received: by 10.55.23.29 with SMTP id i29mr1404798qkh.201.1463491948969; Tue, 17 May 2016 06:32:28 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h140si2244607qhc.40.2016.05.17.06.32.28; Tue, 17 May 2016 06:32:28 -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 93F0861786; Tue, 17 May 2016 13:32:28 +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 9473261818; Tue, 17 May 2016 13:15:44 +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 D51D66180E; Tue, 17 May 2016 13:15:27 +0000 (UTC) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by lists.linaro.org (Postfix) with ESMTPS id 677BD61792 for ; Tue, 17 May 2016 13:05:24 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id ww9so5668211lbc.2 for ; Tue, 17 May 2016 06:05:24 -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=USSWenTnWHk5JpZIc6SRDzaUn0Dua33ygeqP1U4dKBTzyekEM9b67d72cz48/OmRI4 hPRYdg0kCfzLEsHUiYv9aOOVsIdVz2tb9k3zBD55mJbpZ9rlQnouDL2hlI6JprCdXRTs /g621Z55U7ezhf6h8WO+ChgVhU9pGSNvlicTE8JXfTTzvDrJ088B7LM3pxaVn2pC3bWq ADUxuFgMLfilzvEOE0x3SR9MmeOSykpwuWaQSAJCZbvTOk0eafkHQEb03C3OpbTgaY2w D0wPTX7bDAzb2hQusDxdEaR1XQi+p/rR0dqm2CnbPvf7Hl475zfIzGLTHLG4s6/H4Umo D+2w== X-Gm-Message-State: AOPr4FW1Gx7nJkFtengB2J9cub+Zp2fcg8X2btOGMLi1E/ZU7s8pXD4Z0AhySmxx9eIyTiUDK8M= X-Received: by 10.112.16.98 with SMTP id f2mr444193lbd.32.1463490323319; Tue, 17 May 2016 06:05:23 -0700 (PDT) Received: from localhost.localdomain (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id q1sm506536lbo.4.2016.05.17.06.05.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 May 2016 06:05:22 -0700 (PDT) From: Christophe Milard To: lng-odp@lists.linaro.org, brian.brooks@linaro.org, mike.holmes@linaro.org Date: Tue, 17 May 2016 15:04:22 +0200 Message-Id: <1463490282-23277-16-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1463490282-23277-1-git-send-email-christophe.milard@linaro.org> References: <1463490282-23277-1-git-send-email-christophe.milard@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCHv7 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); }