From patchwork Tue Mar 7 11:52:23 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: 94980 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp1849372qgd; Tue, 7 Mar 2017 03:53:27 -0800 (PST) X-Received: by 10.237.36.153 with SMTP id t25mr21524837qtc.134.1488887606945; Tue, 07 Mar 2017 03:53:26 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p64si17736846qkd.41.2017.03.07.03.53.26; Tue, 07 Mar 2017 03:53:26 -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 561E6635D5; Tue, 7 Mar 2017 11:53:26 +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 A90B562D18; Tue, 7 Mar 2017 11:52: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 5843460F3B; Tue, 7 Mar 2017 11:52:44 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by lists.linaro.org (Postfix) with ESMTPS id A1C9362D40 for ; Tue, 7 Mar 2017 11:52:28 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id t189so2551780wmt.1 for ; Tue, 07 Mar 2017 03:52:28 -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=OZOyY/wA+7z3XAEdowBVRMBOILfzRDNfOiLsM5T4Oes=; b=MHdOZyKfqdzwJYivVUTT+QEoiSUFILGFYKOHQdnLv/HEO81UJD4B33WBaKnN2u01vr tDUwq3k84zT3LsrqHwxGavItr1sSqj/cJu3yvWw6g5pndQhK0z34u2bXnOYQsapiLWX5 63Nv66nhoD5IjJpk7qXYrlGYwcXawNbpABUMT9UVRTpKuyeSLMC4bOR08gEuU3kJSJQj zccGl2jQ33F/0WPb1c5m2uTqVsbmxJkJo1VriW9NmeJk0vYRgslLFUmOcyqVFuVGoh2P V+/91Psxjo2111w8KE6rVJ3V4Ia3iLAgAs0viHCsANBa4k9a6z1bPu43ujAIM9CyRiWU tjDg== X-Gm-Message-State: AMke39na/LEmrAl7R4AGlpMXfmTtegE5Kh8Y/r4ugLsj4JJnsUFQErMzA+ZolTvjlpMbWfz/XciXHA== X-Received: by 10.28.29.201 with SMTP id d192mr18482389wmd.94.1488887547524; Tue, 07 Mar 2017 03:52:27 -0800 (PST) Received: from forlindon.c.hoisthospitality.com ([109.74.56.122]) by smtp.gmail.com with ESMTPSA id y145sm18652299wmc.17.2017.03.07.03.52.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2017 03:52:27 -0800 (PST) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Tue, 7 Mar 2017 14:52:23 +0300 Message-Id: <20170307115225.29225-2-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170307115225.29225-1-dmitry.ereminsolenikov@linaro.org> References: <20170307115225.29225-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [API-NEXT 1/3] api: hints: rework ODP_DEPRECATED 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" The ODP_DEPRECATED macro uses the deprecated attribute which works only for types and functions, but not e.g. for fields of structure. So let's add ODP_DEPRECATED_FIELD macro suitable for fields, variables and enum values. Also make ODP_DEPRECATED{,_FIELD} macros to be a no-op if ODP_ALLOW_DEPRECATED is defined. ODP code MUST be compiled with this macro, so that it supports deprecated API. Examples SHOULD be compiled without this macro defined, so that they show best current practice of using API but still MAY use the macro untill particular application is ported to new API. User applications SHOULD try to compile without ODP_ALLOW_DEPRECATED macro defined. Signed-off-by: Dmitry Eremin-Solenikov --- doc/helper-guide/Doxyfile | 1 + doc/platform-api-guide/Doxyfile | 1 + helper/Makefile.am | 1 + include/odp/api/spec/hints.h | 13 +++++++++++++ platform/linux-generic/Makefile.am | 1 + 5 files changed, 17 insertions(+) -- 2.11.0 diff --git a/doc/helper-guide/Doxyfile b/doc/helper-guide/Doxyfile index bcc24539..62c1f862 100644 --- a/doc/helper-guide/Doxyfile +++ b/doc/helper-guide/Doxyfile @@ -40,6 +40,7 @@ PREDEFINED = __GNUC__ \ __LITTLE_ENDIAN_BITFIELD \ __x86_64__ \ ODP_PACKED \ + ODP_DEPRECATED_FIELD(x)=x \ "ODP_HANDLE_T(type)=odp_handle_t type" INTERNAL_DOCS = YES DOT_IMAGE_FORMAT = svg diff --git a/doc/platform-api-guide/Doxyfile b/doc/platform-api-guide/Doxyfile index fbe7c936..37175e09 100644 --- a/doc/platform-api-guide/Doxyfile +++ b/doc/platform-api-guide/Doxyfile @@ -17,4 +17,5 @@ PREDEFINED = __GNUC__ \ __LITTLE_ENDIAN_BITFIELD \ __x86_64__ \ ODP_PACKED \ + ODP_DEPRECATED_FIELD(x)=x \ "ODP_HANDLE_T(type)=odp_handle_t type" diff --git a/helper/Makefile.am b/helper/Makefile.am index 2c5452dc..3bd38a46 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -10,6 +10,7 @@ AM_CFLAGS += -I$(top_srcdir)/include AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include AM_CFLAGS += -I$(top_builddir)/include +AM_CFLAGS += -DODP_ALLOW_DEPRECATED AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)' diff --git a/include/odp/api/spec/hints.h b/include/odp/api/spec/hints.h index 82400f07..3b70db6f 100644 --- a/include/odp/api/spec/hints.h +++ b/include/odp/api/spec/hints.h @@ -54,7 +54,20 @@ extern "C" { /** * Indicate deprecated variables, functions or types */ +#ifdef ODP_ALLOW_DEPRECATED #define ODP_DEPRECATED __attribute__((__deprecated__)) +#else +#define ODP_DEPRECATED +#endif + +/** + * Indicate deprecated field, bitfield or enum value + */ +#ifndef ODP_ALLOW_DEPRECATED +#define ODP_DEPRECATED_FIELD(x) __odp_deprecated_ ## x +#else +#define ODP_DEPRECATED_FIELD(x) x +#endif /** * Intentionally unused variables of functions diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index b21df449..800bf5e8 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -10,6 +10,7 @@ AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ AM_CFLAGS += -I$(top_builddir)/include AM_CFLAGS += -Iinclude AM_CFLAGS += -DSYSCONFDIR=\"@sysconfdir@\" +AM_CFLAGS += -DODP_ALLOW_DEPRECATED include_HEADERS = \ $(top_srcdir)/include/odp.h \ From patchwork Tue Mar 7 11:52:24 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: 94982 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp1849672qgd; Tue, 7 Mar 2017 03:54:28 -0800 (PST) X-Received: by 10.200.34.37 with SMTP id o34mr20440111qto.213.1488887668122; Tue, 07 Mar 2017 03:54:28 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w6si9056891qtd.210.2017.03.07.03.54.27; Tue, 07 Mar 2017 03:54:28 -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 B163262D2D; Tue, 7 Mar 2017 11:54:27 +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 7F91862D4D; Tue, 7 Mar 2017 11:52:53 +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 D93C060F3B; Tue, 7 Mar 2017 11:52:44 +0000 (UTC) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by lists.linaro.org (Postfix) with ESMTPS id 7EAA362CC1 for ; Tue, 7 Mar 2017 11:52:29 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id t189so2552065wmt.1 for ; Tue, 07 Mar 2017 03:52:29 -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=9xptw5fEdhnChjozADqAtDW7y4yaXWwZ1kwBjJSqzxw=; b=D/kGy6QetdQWOMRbxMOIPxwj7nkNIfEXpRTki/ZO5EuNMZgKapUQhr8n8Nt3M5Q09f 7Oq1+iFftuNSkg5nuUE8MT6hfWKXcRRLPNE9qNaUwYiLtybLinoTCyALY9mQqDCVwTnZ 2/gkbOS/SXeoLNs2NGBxzm++SSM7nD6qirJOiLDdG3zvRAUEje6Q9RzTQBjZflYeJTf5 BV2K1be+P/WAW1kaKlLqvhpMqZngq8U2EHYwt9hieX9e3CbgaNX4Ph6PwAUs3zkh8LPn n5i1naq8PifkZb3J3IdkSd6qqwun+y6y+z0d6n6AbHwmtvRVShDzXYlbgMRxdvmAUO74 Oycg== X-Gm-Message-State: AMke39n9iqrTL+S9FqVRTM7Tn3W+lb1psZ6sroezr4ZSRaQ7r3IWpKor5KUjWYxHkq9sjyvH93k8Dw== X-Received: by 10.28.44.66 with SMTP id s63mr418603wms.77.1488887548421; Tue, 07 Mar 2017 03:52:28 -0800 (PST) Received: from forlindon.c.hoisthospitality.com ([109.74.56.122]) by smtp.gmail.com with ESMTPSA id y145sm18652299wmc.17.2017.03.07.03.52.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2017 03:52:27 -0800 (PST) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Tue, 7 Mar 2017 14:52:24 +0300 Message-Id: <20170307115225.29225-3-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170307115225.29225-1-dmitry.ereminsolenikov@linaro.org> References: <20170307115225.29225-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [API-NEXT 2/3] api: crypto: use ODP_DEPRECATED{, _FIELD} declarations 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" Add ODP_DEPRECATED and ODP_DEPRECATED_FIELD declarations to crypto API header, actually urging applications to switch to newer API. Signed-off-by: Dmitry Eremin-Solenikov --- include/odp/api/spec/crypto.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) -- 2.11.0 diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index d30f050f..177f8444 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -19,6 +19,8 @@ extern "C" { #endif +#include + /** @defgroup odp_crypto ODP CRYPTO * Macros, enums, types and operations to utilise crypto. * @{ @@ -82,10 +84,10 @@ typedef enum { ODP_CIPHER_ALG_AES_GCM, /** @deprecated Use ODP_CIPHER_ALG_AES_CBC instead */ - ODP_CIPHER_ALG_AES128_CBC, + ODP_DEPRECATED_FIELD(ODP_CIPHER_ALG_AES128_CBC), /** @deprecated Use ODP_CIPHER_ALG_AES_GCM instead */ - ODP_CIPHER_ALG_AES128_GCM + ODP_DEPRECATED_FIELD(ODP_CIPHER_ALG_AES128_GCM) } odp_cipher_alg_t; @@ -127,13 +129,13 @@ typedef enum { ODP_AUTH_ALG_AES_GCM, /** @deprecated Use ODP_AUTH_ALG_MD5_HMAC instead */ - ODP_AUTH_ALG_MD5_96, + ODP_DEPRECATED_FIELD(ODP_AUTH_ALG_MD5_96), /** @deprecated Use ODP_AUTH_ALG_SHA256_HMAC instead */ - ODP_AUTH_ALG_SHA256_128, + ODP_DEPRECATED_FIELD(ODP_AUTH_ALG_SHA256_128), /** @deprecated Use ODP_AUTH_ALG_AES_GCM instead */ - ODP_AUTH_ALG_AES128_GCM + ODP_DEPRECATED_FIELD(ODP_AUTH_ALG_AES128_GCM) } odp_auth_alg_t; /** @@ -158,10 +160,10 @@ typedef union odp_crypto_cipher_algos_t { uint32_t aes_gcm : 1; /** @deprecated Use aes_cbc instead */ - uint32_t aes128_cbc : 1; + uint32_t ODP_DEPRECATED_FIELD(aes128_cbc) : 1; /** @deprecated Use aes_gcm instead */ - uint32_t aes128_gcm : 1; + uint32_t ODP_DEPRECATED_FIELD(aes128_gcm) : 1; } bit; /** All bits of the bit field structure @@ -196,13 +198,13 @@ typedef union odp_crypto_auth_algos_t { uint32_t aes_gcm : 1; /** @deprecated Use md5_hmac instead */ - uint32_t md5_96 : 1; + uint32_t ODP_DEPRECATED_FIELD(md5_96) : 1; /** @deprecated Use sha256_hmac instead */ - uint32_t sha256_128 : 1; + uint32_t ODP_DEPRECATED_FIELD(sha256_128) : 1; /** @deprecated Use aes_gcm instead */ - uint32_t aes128_gcm : 1; + uint32_t ODP_DEPRECATED_FIELD(aes128_gcm) : 1; } bit; /** All bits of the bit field structure @@ -317,7 +319,7 @@ typedef struct odp_crypto_session_param_t { } odp_crypto_session_param_t; /** @deprecated Use odp_crypto_session_param_t instead */ -typedef odp_crypto_session_param_t odp_crypto_session_params_t; +typedef odp_crypto_session_param_t odp_crypto_session_params_t ODP_DEPRECATED; /** * Crypto API per packet operation parameters @@ -373,7 +375,7 @@ typedef struct odp_crypto_op_param_t { } odp_crypto_op_param_t; /** @deprecated Use odp_crypto_op_param_t instead */ -typedef odp_crypto_op_param_t odp_crypto_op_params_t; +typedef odp_crypto_op_param_t odp_crypto_op_params_t ODP_DEPRECATED; /** * Crypto API session creation return code From patchwork Tue Mar 7 11:52:25 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: 94981 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp1849520qgd; Tue, 7 Mar 2017 03:53:57 -0800 (PST) X-Received: by 10.55.197.18 with SMTP id p18mr18081834qki.289.1488887637094; Tue, 07 Mar 2017 03:53:57 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d204si17731138qka.207.2017.03.07.03.53.56; Tue, 07 Mar 2017 03:53:57 -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 B9F1A60F3B; Tue, 7 Mar 2017 11:53:56 +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 29D8260F4C; Tue, 7 Mar 2017 11:52:51 +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 827CC60F4C; Tue, 7 Mar 2017 11:52:44 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by lists.linaro.org (Postfix) with ESMTPS id 4A19B62D18 for ; Tue, 7 Mar 2017 11:52:30 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id t189so2552330wmt.1 for ; Tue, 07 Mar 2017 03:52:30 -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:cc:subject:date:message-id:in-reply-to :references; bh=bK8HuQh96Z0bzSwjyb+TfvJfH5z/ujWppAAKsCIms+I=; b=hUOkOpeu3Dz3PQYDYOmkfvM7mE7FhcfvvE+OXeLFpJmDI/2xFhcHoJDbWTloIs0xku ghkUYpMgrEgektoBkMmRtN7kyIJC4EAnL9u4CW085IuwcYm0ifdtQdum0NYEBA4bwcmF MfcTWbalvfkwJ4BzO/3Ki9Bn6c8rCR0e8DgVkX+LVM/hVIUnJrNGMTfUJvt40opmXDtD KNhO1zeA4DGFOlW9Hktrwk/YhHoUMipgIRjzkkhJdEwidxXbNQQ6EB+kZmqwONj83QT/ m/JBCjjwQbVystu7xZAr91wZFuAeRQceO9AR1lPBuOz5PPpHJItfqnn03KduD/QGD55B kCgQ== X-Gm-Message-State: AMke39mRKTuZqQm/wWubxwqr8AjuuPIWd2IZtxf18MikyrB6LZ9FLlydE2xjaun83cQF86RDn4o= X-Received: by 10.28.148.143 with SMTP id w137mr1126877wmd.72.1488887549434; Tue, 07 Mar 2017 03:52:29 -0800 (PST) Received: from forlindon.c.hoisthospitality.com ([109.74.56.122]) by smtp.gmail.com with ESMTPSA id y145sm18652299wmc.17.2017.03.07.03.52.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2017 03:52:28 -0800 (PST) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Tue, 7 Mar 2017 14:52:25 +0300 Message-Id: <20170307115225.29225-4-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170307115225.29225-1-dmitry.ereminsolenikov@linaro.org> References: <20170307115225.29225-1-dmitry.ereminsolenikov@linaro.org> Cc: Petri Savolainen Subject: [lng-odp] [API-NEXT 3/3] test: crypto: remove references to deprecated crypto apis 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" From: Petri Savolainen Remove last remaining references to deprecated API definitions. Signed-off-by: Petri Savolainen --- example/ipsec/odp_ipsec_misc.h | 4 ++-- example/ipsec/odp_ipsec_sa_db.c | 4 ++-- example/ipsec/odp_ipsec_stream.c | 6 +++--- test/common_plat/performance/odp_crypto.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) -- 2.11.0 diff --git a/example/ipsec/odp_ipsec_misc.h b/example/ipsec/odp_ipsec_misc.h index e0320eb4..45cb022e 100644 --- a/example/ipsec/odp_ipsec_misc.h +++ b/example/ipsec/odp_ipsec_misc.h @@ -98,10 +98,10 @@ int parse_key_string(char *keystring, key->length = key_bits_in / 8; } else { - if ((alg->u.auth == ODP_AUTH_ALG_MD5_96) && + if ((alg->u.auth == ODP_AUTH_ALG_MD5_HMAC) && (KEY_BITS_MD5_96 == key_bits_in)) key->length = key_bits_in / 8; - else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_128) && + else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_HMAC) && (KEY_BITS_SHA256_128 == key_bits_in)) key->length = key_bits_in / 8; } diff --git a/example/ipsec/odp_ipsec_sa_db.c b/example/ipsec/odp_ipsec_sa_db.c index 28215b5b..10bbcb8f 100644 --- a/example/ipsec/odp_ipsec_sa_db.c +++ b/example/ipsec/odp_ipsec_sa_db.c @@ -111,11 +111,11 @@ int create_sa_db_entry(char *input, odp_bool_t cipher) } else { if (0 == strcmp(token, "md5")) { entry->alg.u.auth = - ODP_AUTH_ALG_MD5_96; + ODP_AUTH_ALG_MD5_HMAC; entry->icv_len = 12; } else if (!strcmp(token, "sha256")) { entry->alg.u.auth = - ODP_AUTH_ALG_SHA256_128; + ODP_AUTH_ALG_SHA256_HMAC; entry->icv_len = 16; } else { entry->alg.u.auth = ODP_AUTH_ALG_NULL; diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c index 428ec04d..15087cbe 100644 --- a/example/ipsec/odp_ipsec_stream.c +++ b/example/ipsec/odp_ipsec_stream.c @@ -227,8 +227,8 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream, /* AH (if specified) */ if (entry && (entry == stream->input.entry) && (ODP_AUTH_ALG_NULL != entry->ah.alg)) { - if (entry->ah.alg != ODP_AUTH_ALG_MD5_96 && - entry->ah.alg != ODP_AUTH_ALG_SHA256_128) + if (entry->ah.alg != ODP_AUTH_ALG_MD5_HMAC && + entry->ah.alg != ODP_AUTH_ALG_SHA256_HMAC) abort(); ah = (odph_ahhdr_t *)data; @@ -424,7 +424,7 @@ odp_bool_t verify_ipv4_packet(stream_db_entry_t *stream, return FALSE; if (odp_be_to_cpu_32(ah->spi) != entry->ah.spi) return FALSE; - if (ODP_AUTH_ALG_MD5_96 != entry->ah.alg) + if (ODP_AUTH_ALG_MD5_HMAC != entry->ah.alg) abort(); } else { if (entry && (ODP_AUTH_ALG_NULL != entry->ah.alg)) diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c index 954bdb79..b3857973 100644 --- a/test/common_plat/performance/odp_crypto.c +++ b/test/common_plat/performance/odp_crypto.c @@ -205,7 +205,7 @@ static crypto_alg_config_t algs_config[] = { .data = test_iv, .length = 8, }, - .auth_alg = ODP_AUTH_ALG_MD5_96, + .auth_alg = ODP_AUTH_ALG_MD5_HMAC, .auth_key = { .data = test_key16, .length = sizeof(test_key16) @@ -217,7 +217,7 @@ static crypto_alg_config_t algs_config[] = { .name = "null-hmac-md5-96", .session = { .cipher_alg = ODP_CIPHER_ALG_NULL, - .auth_alg = ODP_AUTH_ALG_MD5_96, + .auth_alg = ODP_AUTH_ALG_MD5_HMAC, .auth_key = { .data = test_key16, .length = sizeof(test_key16)