From patchwork Thu Feb 23 13:37:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 94376 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp215415qgi; Thu, 23 Feb 2017 05:37:46 -0800 (PST) X-Received: by 10.36.123.145 with SMTP id q139mr2488323itc.62.1487857066092; Thu, 23 Feb 2017 05:37:46 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r193si4758138itc.42.2017.02.23.05.37.45; Thu, 23 Feb 2017 05:37:46 -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 277D560A1F; Thu, 23 Feb 2017 13:37:45 +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 7295760DD0; Thu, 23 Feb 2017 13:37:41 +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 5A5F860999; Thu, 23 Feb 2017 13:37:39 +0000 (UTC) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by lists.linaro.org (Postfix) with ESMTPS id 6D29B60999 for ; Thu, 23 Feb 2017 13:37:38 +0000 (UTC) Received: by mail-lf0-f48.google.com with SMTP id b80so16307185lfe.3 for ; Thu, 23 Feb 2017 05:37:38 -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:mime-version :content-transfer-encoding; bh=QgMFjpTIxhGbwpa0sd3iORNS3pqwcoUsFuzslp9Yew0=; b=CDYH21odAVkg94Mi2q6uGqMeXb1N733TVbpvWDg2caqKyxrbzxS+roaIZlRsGNvNkX +rhz2G78PVtgoNjF4HogOOFgADzPiot+kFIz6NTo8VF4r8kv+xesiScTf0QS497OWLg6 TQDFjXbMOZImMr9uv413zHpPO2sNGFwwr6cUW/s1AdNp7mjWh/WNRbYI4JhjVpRFFG70 4vkrIpPNc2GUI3bwCci4AnzNgdzmrjYismh6qYT8HmRjtuVxpLMul8wGEQCxzi4XadqF nQf49FJu9delhkt5bfGKExtNThQlFK9y5ZLEWm0SmCGlrunBh1D++NhX2bBxaZ7a7ZQ9 yuUw== X-Gm-Message-State: AMke39lt65Xf5//XARX9Cxsun2gcT8dvRRP0VNLZT6SS0lDBwve0gdibKg3vxykYB8F9036aETY= X-Received: by 10.46.5.70 with SMTP id 67mr1923191ljf.100.1487857057001; 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.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Feb 2017 05:37:36 -0800 (PST) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 23 Feb 2017 16:37:32 +0300 Message-Id: <20170223133734.19436-1-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [lng-odp] [PATCH v3 1/3] linux-generic: crypto: add missing include 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.1.0 headers do not include , so include it manually to fix the following error: In file included from ./include/odp_packet_internal.h:28:0, from odp_classification.c:13: ./include/odp_crypto_internal.h:55:5: error: unknown type name ‘EVP_CIPHER_CTX’ EVP_CIPHER_CTX *ctx; ^~~~~~~~~~~~~~ Signed-off-by: Dmitry Eremin-Solenikov --- platform/linux-generic/include/odp_crypto_internal.h | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 diff --git a/platform/linux-generic/include/odp_crypto_internal.h b/platform/linux-generic/include/odp_crypto_internal.h index c7b893aa..f85b76ea 100644 --- a/platform/linux-generic/include/odp_crypto_internal.h +++ b/platform/linux-generic/include/odp_crypto_internal.h @@ -13,6 +13,7 @@ extern "C" { #include #include +#include #define MAX_IV_LEN 64 #define OP_RESULT_MAGIC 0x91919191 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); } From patchwork Thu Feb 23 13:37:34 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: 94377 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp215572qgi; Thu, 23 Feb 2017 05:38:09 -0800 (PST) X-Received: by 10.107.169.170 with SMTP id f42mr11123002ioj.223.1487857089706; Thu, 23 Feb 2017 05:38:09 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m194si4719195itb.75.2017.02.23.05.38.09; Thu, 23 Feb 2017 05:38:09 -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 3378A60EA1; Thu, 23 Feb 2017 13:38:09 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 3EB9E609A0; Thu, 23 Feb 2017 13:37:47 +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 E433D60EFA; Thu, 23 Feb 2017 13:37:42 +0000 (UTC) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by lists.linaro.org (Postfix) with ESMTPS id 2FF7060999 for ; Thu, 23 Feb 2017 13:37:40 +0000 (UTC) Received: by mail-lf0-f44.google.com with SMTP id g134so16349965lfe.1 for ; Thu, 23 Feb 2017 05:37:40 -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=2yIOl+cx9mN4O4x0hHqxw4zglV4ZM8j7f7LvD/oOHz0=; b=D10V8FBwiKJj8yoVNI8Px/vp4IQsGwKbTAuvnuV47dClyaP1NfrntIf4W/FhHQ4G0n CXz2xNoVAzP4TOV/gCBeRkT0ZJkW0zX/rdplwqHw2+zg8cXpFtnwrOx4V/xIymmsldzb dz+ypFvW7BO9TdWxnWt4DctCCw2v+bWaBlkwyk4Bg9Ix5Lr61wkmsljHD9Jt7FmuuFbH NZajg11ryXW4RcQNobo1jN9Jm5KSVMzKfGeFw8V6U9jo3wugEmVfk0cWozOuqhRMzYaa tVigchLOPtmQGhO3gObOEqaDuuoufUSguRXOoskq99UZYd1XvctlAxF54zFdTWACWn+S 6s6A== X-Gm-Message-State: AMke39lzW6fgufe1bhDu7IqfheybgshpUNwxzMI/3Un/e2DGcrtae2eERl3KukLTx+2Z2Sx7Oy0= X-Received: by 10.46.69.139 with SMTP id s133mr10601084lja.56.1487857058843; Thu, 23 Feb 2017 05:37:38 -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:38 -0800 (PST) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 23 Feb 2017 16:37:34 +0300 Message-Id: <20170223133734.19436-3-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 3/3] linux-generic: crypto: support OpenSSL 1.1.0 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.1.0 uses new threading API. It is no longer necessary to set locking callbacks to use OpenSSL in a multi-threaded environment. OpenSSL provides compatibility callbacks, but ODP compilation still fails with unused function/argument errors. So, to support compiling ODP with OpenSSL 1.1.x, add ODP_UNUSED annotiations to lock/thread_id callbacks. Signed-off-by: Dmitry Eremin-Solenikov --- platform/linux-generic/odp_crypto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index adadbf97..54b222fd 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -949,14 +949,14 @@ odp_crypto_operation(odp_crypto_op_param_t *param, return 0; } -static void openssl_thread_id(CRYPTO_THREADID *id) +static void ODP_UNUSED openssl_thread_id(CRYPTO_THREADID ODP_UNUSED *id) { CRYPTO_THREADID_set_numeric(id, odp_thread_id()); } -static void openssl_lock(int mode, int n, - const char *file ODP_UNUSED, - int line ODP_UNUSED) +static void ODP_UNUSED openssl_lock(int mode, int n, + const char *file ODP_UNUSED, + int line ODP_UNUSED) { if (mode & CRYPTO_LOCK) odp_ticketlock_lock((odp_ticketlock_t *)