From patchwork Thu Feb 23 13:37:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 94378 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp215698qgi; Thu, 23 Feb 2017 05:38:31 -0800 (PST) X-Received: by 10.36.66.141 with SMTP id i135mr2810551itb.86.1487857111868; Thu, 23 Feb 2017 05:38:31 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y67si4727450iof.62.2017.02.23.05.38.31; Thu, 23 Feb 2017 05:38:31 -0800 (PST) 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 sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4985660EA7; Thu, 23 Feb 2017 13:38:31 +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 9866260F22; Thu, 23 Feb 2017 13:37:54 +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 3BE7A60EAA; Thu, 23 Feb 2017 13:37:43 +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 3860B609A0 for ; Thu, 23 Feb 2017 13:37:39 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id l12so16345891lfe.0 for ; Thu, 23 Feb 2017 05:37:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=GSwXU9OsTr4zWffHFp5S3KTSaGfo+sTPqTnP8ByYodc=; b=cGHOytD0tH9IBjxbb5A/gY6gvvbLdQ1vcba6TS8iqN2ORcd+ckzHlGZ4Y4Fp5b9zZ4 5Lnlur1ClFC8QdeIGR+V9Kxx6YAIebRBKOUapFbVUqlCjT8fLaOzzG0eixGNtcu6e1/D hYtl9f4G9gIcsOKfUic8sN2gXQ+OnIhrx1Dg6OZCuMJgtetqu6iF9GOZxH7kC5ZMgcyZ xAIBSQMI35jIMFnAM7uZMLrtqFh9xd2NxRG1jZw6hxwtL4MaREFjDdWF/J9F4peTtRxI ThuFhMrvrhCYNL4KEMq4yHeOok2OncU06ysvOU5CY2IuHOprEg4NzxwZ7Q+tJKUo0zNj mZlw== X-Gm-Message-State: AMke39k7EvSqz42NQ/ZG1P87BzZYXmGWQigRxrLmFVBH/e/WnegoScLidjAUuCriXNOIgvJGvhM= X-Received: by 10.46.87.26 with SMTP id l26mr1443764ljb.0.1487857057848; Thu, 23 Feb 2017 05:37:37 -0800 (PST) Received: from forlindon.lumag.auriga.ru ([89.223.65.198]) by smtp.gmail.com with ESMTPSA id e86sm8062893lji.32.2017.02.23.05.37.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Feb 2017 05:37:37 -0800 (PST) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 23 Feb 2017 16:37:33 +0300 Message-Id: <20170223133734.19436-2-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170223133734.19436-1-dmitry.ereminsolenikov@linaro.org> References: <20170223133734.19436-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH v3 2/3] linux-generic: crypto: port to OpenSSL 1.0.x thread id API 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" OpenSSL 1.0.x has deperecated old 0.9.x thread id callbacks. If the library is compiled without deprecated functions, compiling ODP fails with missing functions errors. So, let's port odp_crypto to OpenSSL 1.0 thread ID API. Signed-off-by: Dmitry Eremin-Solenikov --- platform/linux-generic/odp_crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index b53b0fc1..adadbf97 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -949,9 +949,9 @@ odp_crypto_operation(odp_crypto_op_param_t *param, return 0; } -static unsigned long openssl_thread_id(void) +static void openssl_thread_id(CRYPTO_THREADID *id) { - return (unsigned long)odp_thread_id(); + CRYPTO_THREADID_set_numeric(id, odp_thread_id()); } static void openssl_lock(int mode, int n, @@ -1003,7 +1003,7 @@ odp_crypto_init_global(void) odp_ticketlock_init((odp_ticketlock_t *) &global->openssl_lock[idx]); - CRYPTO_set_id_callback(openssl_thread_id); + CRYPTO_THREADID_set_callback(openssl_thread_id); CRYPTO_set_locking_callback(openssl_lock); }