From patchwork Thu Jul 13 22:00:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 107708 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp67759qge; Thu, 13 Jul 2017 15:01:09 -0700 (PDT) X-Received: by 10.55.168.206 with SMTP id r197mr7961214qke.142.1499983269476; Thu, 13 Jul 2017 15:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499983269; cv=none; d=google.com; s=arc-20160816; b=CGHoV7npC6eirlCqG/aettUULIWI06EVi2Wgh0PSY2o8CspokGYEnV0NWgs8hLgrW7 9L6eHMhZ9fwAb9RReO19RmgTkuwYNDbujijyf/s2zHEZ9vjKrDSUy+YbjIdJOR8mEWSL ZkjwfoZaxUmAF/GaQKRpfy5jn1XD2WD7MOEc9t+Oc/RBBphR9O5OBXml1rhTSv39tP1g njFMl/k5UsDJhuqm0NiinCPFo7K0/OHMUXIn7B5x99meA5RBXxz2VY8ytjT2B1kRowsS eIBdlQCiVIIzDHMWfAPzwTnziArs8xmeqnc3358HmPErVhQn01tnnjxAAGf0eEgMx1Gp Q1KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=a1sPVhJqtQopy+7cMCaxlChY+NmAspW19jSg++A0xBA=; b=eOrgkSl9ykS1eHKYQP+nQBTN4dICJniekkfPiL50e8/4NsJSMeIoDE+oa785LIIqrA WeWw9zzHn4rs/hUAAnokobEr/oBj4b5lM0VtG0aUpxaR0UQpNv6/dwZ/srnO5Hlm48SI JQ7zsZJnqnu5YuomC5jABXIwP4lLjM6mzoS8zN3+SZk5tEmLkJvmvfQOORo3eRafBMTS a8ntXF4th6in/aGlnO4btZTiBQRXM/yfT7ae4GxXMgn04OtwnuUaGvb0syHkaUPu0nnR mi9Qye+KYxbAzDHgiysJRjqttWFvlrFk0agpDXmmTVO8INur7sjccJR5FQQLd9IEfty4 NQ9w== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v123si6165909qkc.115.2017.07.13.15.01.09; Thu, 13 Jul 2017 15:01:09 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 169D96072E; Thu, 13 Jul 2017 22:01: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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 6D53B608B0; Thu, 13 Jul 2017 22:00:38 +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 375746068E; Thu, 13 Jul 2017 22:00:32 +0000 (UTC) Received: from forward3j.cmail.yandex.net (forward3j.cmail.yandex.net [5.255.227.21]) by lists.linaro.org (Postfix) with ESMTPS id E3DD76068E for ; Thu, 13 Jul 2017 22:00:30 +0000 (UTC) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [IPv6:2a02:6b8:0:1402::15:6]) by forward3j.cmail.yandex.net (Yandex) with ESMTP id 5A181203AD for ; Fri, 14 Jul 2017 01:00:29 +0300 (MSK) Received: from smtp4p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4p.mail.yandex.net (Yandex) with ESMTP id 31F1565011F5 for ; Fri, 14 Jul 2017 01:00:28 +0300 (MSK) Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ICqqG72gbP-0SsaBQEG; Fri, 14 Jul 2017 01:00:28 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 14 Jul 2017 01:00:13 +0300 Message-Id: <1499983216-15415-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> References: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 74 Subject: [lng-odp] [PATCH API-NEXT v3 1/4] validation: crypto: fix unitialized variable error 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: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 74 (lumag:crypto-packet) ** https://github.com/Linaro/odp/pull/74 ** Patch: https://github.com/Linaro/odp/pull/74.patch ** Base sha: f49ce736d461c3e8c2534ed216e8a70e8bee954e ** Merge commit sha: 668e2e51ec1fae14a324a67371babeeb8ecdaeda **/ test/common_plat/validation/api/crypto/odp_crypto_test_inp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c index d5549493..716bd952 100644 --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c @@ -303,7 +303,7 @@ static void alg_test(odp_crypto_op_t op, odp_crypto_capability_t capa; int rc; odp_crypto_ses_create_err_t status; - odp_bool_t ok; + odp_bool_t ok = false; odp_crypto_session_param_t ses_params; uint8_t *data_addr; odp_crypto_cipher_capability_t cipher_capa[MAX_ALG_CAPA]; From patchwork Thu Jul 13 22:00:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 107710 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp68408qge; Thu, 13 Jul 2017 15:01:38 -0700 (PDT) X-Received: by 10.200.56.98 with SMTP id r31mr8314622qtb.174.1499983298786; Thu, 13 Jul 2017 15:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499983298; cv=none; d=google.com; s=arc-20160816; b=IFWej7Xf2UbLkDCGAzI+MtQYnNOzF5sWQEpUrWOxlmoewuUZ1KRsEPGAnxWvxSBWsj Wq7DVCWoFdiNWEBL/05VqmfFcq1Ab6uFGRK9dzeSawkB2JvI3mliyvlSI0ChyuXtuE74 VSUh0oVTlRnKyVzrzUYEj2PyjN2RFhhGH29rOsVLV/k1MlFI7fSODAHpgwRTR/qWPNo4 hmDEiDOnjC2vqFAO651CPivS4uYCZ3vxMaIh8C7BIpHVBMg/1ejNG7AGtf3tOlT9L2j5 k159gsFAkprH7iFio+gRksh4UIa9zQT8vJyLRjR9FWDDvcW7zL+Zm5qXmQSbGoIerbQo vDzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=xJn7zLCqlAP7aZyOkbJKCrdqs2deklo0lE+W8+5d2g4=; b=GkLVxd4sTV3HsHF/SMDGkPKkY0q54kr2iwQodQrxaI7zzGXwQ+8ymk+yCyhp0+sZm0 Oxfg/euTaVLn40icGP0HytKqLvpsASqujjnaLXOuTIj4IVJfg/NmbSSgXBYYBZqJqNJj IGZepaBvZoZ8RvSFsCRgMS0x+17u4YXj0DVqPmxOQr0Yim588DRTBR23OOG74nHKX7Eh Us0u0EzC+b+jipfGf18fYqboSTHIf1Nu6kHrLCUFzg6psZd30xertN1vHJ+GdmHPu2Sy VxqJuRfH/5I4WCZLsBj+WzO7/wM5lgTh176mXlw94Zz9BVSQfp0UUWgHIRONnLmcDqLz cOKQ== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 41si6471000qtg.277.2017.07.13.15.01.38; Thu, 13 Jul 2017 15:01:38 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 1618A65BFB; Thu, 13 Jul 2017 22:01:38 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 E190565BE0; Thu, 13 Jul 2017 22:00: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 8FE716072E; Thu, 13 Jul 2017 22:00:33 +0000 (UTC) Received: from forward3h.cmail.yandex.net (forward3h.cmail.yandex.net [87.250.230.18]) by lists.linaro.org (Postfix) with ESMTPS id 02FD060679 for ; Thu, 13 Jul 2017 22:00:32 +0000 (UTC) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [IPv6:2a02:6b8:0:1402::15:6]) by forward3h.cmail.yandex.net (Yandex) with ESMTP id 920892133E for ; Fri, 14 Jul 2017 01:00:30 +0300 (MSK) Received: from smtp4p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4p.mail.yandex.net (Yandex) with ESMTP id 6965165010B1 for ; Fri, 14 Jul 2017 01:00:29 +0300 (MSK) Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ICqqG72gbP-0TsCCs7a; Fri, 14 Jul 2017 01:00:29 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 14 Jul 2017 01:00:14 +0300 Message-Id: <1499983216-15415-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> References: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 74 Subject: [lng-odp] [PATCH API-NEXT v3 2/4] doc: move PREDEFINED to common place 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: Dmitry Eremin-Solenikov It is easy to update PREDEFINED definitions in one Doxyfile, while forgetting about the others, as happened e.g. with ODP_DEPRECATE(x) definition. Move PREDEFINED definitions into Doxyfile_common, so that it is included by the rest of Doxyfiles. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 74 (lumag:crypto-packet) ** https://github.com/Linaro/odp/pull/74 ** Patch: https://github.com/Linaro/odp/pull/74.patch ** Base sha: f49ce736d461c3e8c2534ed216e8a70e8bee954e ** Merge commit sha: 668e2e51ec1fae14a324a67371babeeb8ecdaeda **/ doc/Doxyfile_common | 12 ++++++++++++ doc/application-api-guide/Doxyfile | 2 -- doc/driver-api-guide/Doxyfile | 8 -------- doc/helper-guide/Doxyfile | 8 -------- doc/platform-api-guide/Doxyfile | 9 --------- 5 files changed, 12 insertions(+), 27 deletions(-) diff --git a/doc/Doxyfile_common b/doc/Doxyfile_common index 59558535..0471dcf3 100644 --- a/doc/Doxyfile_common +++ b/doc/Doxyfile_common @@ -30,3 +30,15 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES INTERNAL_DOCS = YES DOT_IMAGE_FORMAT = svg +PREDEFINED = __GNUC__ \ + __attribute__(x)= \ + ODP_ALIGNED(x)= \ + ODPDRV_ALIGNED(x)= \ + __BIG_ENDIAN_BITFIELD \ + __LITTLE_ENDIAN_BITFIELD \ + __x86_64__ \ + ODP_PACKED \ + ODPDRV_PACKED \ + ODP_DEPRECATE(x)=x \ + "ODP_HANDLE_T(type)=odp_handle_t type" \ + "ODPDRV_HANDLE_T(type)=odpdrv_handle_t type" diff --git a/doc/application-api-guide/Doxyfile b/doc/application-api-guide/Doxyfile index 9cb183c1..2709f6fd 100644 --- a/doc/application-api-guide/Doxyfile +++ b/doc/application-api-guide/Doxyfile @@ -7,6 +7,4 @@ INPUT = $(SRCDIR)/doc/application-api-guide \ $(SRCDIR)/include EXCLUDE_PATTERNS = drv* odp_drv.h EXAMPLE_PATH = $(SRCDIR)/example $(SRCDIR) -PREDEFINED = __GNUC__ \ - "ODP_HANDLE_T(type)=odp_handle_t type" WARNINGS = NO diff --git a/doc/driver-api-guide/Doxyfile b/doc/driver-api-guide/Doxyfile index b5f7260e..28794ef0 100644 --- a/doc/driver-api-guide/Doxyfile +++ b/doc/driver-api-guide/Doxyfile @@ -7,11 +7,3 @@ INPUT = $(SRCDIR)/doc/driver-api-guide \ $(SRCDIR)/include/odp/drv \ $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp/drv \ $(SRCDIR)/include/odp_drv.h -PREDEFINED = __GNUC__ \ - __attribute__(x)= \ - ODPDRV_ALIGNED(x)= \ - __BIG_ENDIAN_BITFIELD \ - __LITTLE_ENDIAN_BITFIELD \ - __x86_64__ \ - ODPDRV_PACKED \ - "ODPDRV_HANDLE_T(type)=odpdrv_handle_t type" diff --git a/doc/helper-guide/Doxyfile b/doc/helper-guide/Doxyfile index bcc24539..bb9bd8e6 100644 --- a/doc/helper-guide/Doxyfile +++ b/doc/helper-guide/Doxyfile @@ -33,13 +33,5 @@ LAYOUT_FILE = $(SRCDIR)/doc/doxygenlayout.xml ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -PREDEFINED = __GNUC__ \ - __attribute__(x)= \ - ODP_ALIGNED(x)= \ - __BIG_ENDIAN_BITFIELD \ - __LITTLE_ENDIAN_BITFIELD \ - __x86_64__ \ - ODP_PACKED \ - "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 1f2d49a4..d716b4a3 100644 --- a/doc/platform-api-guide/Doxyfile +++ b/doc/platform-api-guide/Doxyfile @@ -10,12 +10,3 @@ INPUT = $(SRCDIR)/doc/application-api-guide \ $(SRCDIR)/platform/$(WITH_PLATFORM)/include/odp/api \ $(SRCDIR)/platform/$(WITH_PLATFORM)/arch/$(WITH_ARCH) EXAMPLE_PATH = $(SRCDIR)/example $(SRCDIR)/platform $(SRCDIR) -PREDEFINED = __GNUC__ \ - __attribute__(x)= \ - ODP_ALIGNED(x)= \ - __BIG_ENDIAN_BITFIELD \ - __LITTLE_ENDIAN_BITFIELD \ - __x86_64__ \ - ODP_PACKED \ - ODP_DEPRECATE(x)=x \ - "ODP_HANDLE_T(type)=odp_handle_t type" From patchwork Thu Jul 13 22:00:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 107711 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp70214qge; Thu, 13 Jul 2017 15:03:01 -0700 (PDT) X-Received: by 10.237.37.52 with SMTP id v49mr8072972qtc.97.1499983380915; Thu, 13 Jul 2017 15:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499983380; cv=none; d=google.com; s=arc-20160816; b=yNlnEE9+/z+Zm9DBCDofAUKHJudo+HWgmnVhtIEkC/5uEjqUTOwwVEN6uyNotUDyI+ peGfRnmY7oIACAe6To3BY048SwWYwacLj4X7FKLCdGSsJsEKtsSSl8iyo9lXEEyr0enM 42yGf8wkmrzMkpHqzMT+cn3OxRj51teRNPqcOf97Oev7/QIJDLVHoH6ro0VLX+ccXsOW rMzjsNKOICRIFBxwXFhdWnGiey3BnZo9x5ccFiOC91L7zX1GreW+a5BMLfHWuyo+C6oV eoroV/l5/hqsxdmRlEHS9SW927oqE91sKvukt7Q4bdPT0naTosZgc0YzCm72DWvsphkJ T6Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=sp3xWlUGjM0Dw7aX04fzIfrnV+QBeFdF7uhoTAcsoLU=; b=NDtTy/ZrZEm+PvmXZn6+Rp219H7uyoSEhMxZgYxor+y+gR+J0EkSBgtZFCmHX1wNOc cP6DpCZDJwzaGe3D03Ok84PkZbdRGHebH7+yL5AX+X+Isb0g5YP8EA8VaIXMYGT8x9zx /cq6UAmZiefr236r5vU/6SGOKFN8YtJi6z78BaAECtHHZW/58o3ZutXjoNAoAomvYfNZ nTwwcppgk4qeLwQ2wVS92r86dEV7VjPtIlETVyC2A+MHRlfvsfAv7wvoU+bkis/xkdoa 96s8ZNQ7iqpj5sAEeLp2mYstYbiI2R+X7X801X9/OFnH5WJwLKhbLm7mWSQe6UQDdaBB JKKw== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o11si6187376qtg.78.2017.07.13.15.03.00; Thu, 13 Jul 2017 15:03:00 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 88B1D65BF1; Thu, 13 Jul 2017 22:03:00 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 5557565BF6; Thu, 13 Jul 2017 22:00:48 +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 E140665BD3; Thu, 13 Jul 2017 22:00:38 +0000 (UTC) Received: from forward4o.cmail.yandex.net (forward4o.cmail.yandex.net [37.9.109.248]) by lists.linaro.org (Postfix) with ESMTPS id 687826068E for ; Thu, 13 Jul 2017 22:00:33 +0000 (UTC) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [95.108.252.166]) by forward4o.cmail.yandex.net (Yandex) with ESMTP id BC357206C6 for ; Fri, 14 Jul 2017 01:00:31 +0300 (MSK) Received: from smtp4p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4p.mail.yandex.net (Yandex) with ESMTP id 61B5B6501168 for ; Fri, 14 Jul 2017 01:00:30 +0300 (MSK) Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ICqqG72gbP-0UsK7g5r; Fri, 14 Jul 2017 01:00:30 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 14 Jul 2017 01:00:15 +0300 Message-Id: <1499983216-15415-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> References: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 74 Subject: [lng-odp] [PATCH API-NEXT v3 3/4] api: crypto: replace redundant packet_ prefixes from definitions 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: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 74 (lumag:crypto-packet) ** https://github.com/Linaro/odp/pull/74 ** Patch: https://github.com/Linaro/odp/pull/74.patch ** Base sha: f49ce736d461c3e8c2534ed216e8a70e8bee954e ** Merge commit sha: 668e2e51ec1fae14a324a67371babeeb8ecdaeda **/ example/ipsec/odp_ipsec.c | 16 ++++----- example/ipsec/odp_ipsec_cache.c | 4 +-- include/odp/api/spec/crypto.h | 30 ++++++++--------- platform/linux-generic/odp_crypto.c | 38 +++++++++++----------- test/common_plat/performance/odp_crypto.c | 14 ++++---- .../validation/api/crypto/odp_crypto_test_inp.c | 18 +++++----- 6 files changed, 60 insertions(+), 60 deletions(-) diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index 5df8f154..52a5fdcd 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example/ipsec/odp_ipsec.c @@ -698,12 +698,12 @@ pkt_disposition_e do_ipsec_in_classify(odp_packet_t *pkt, *skip = FALSE; ctx->state = PKT_STATE_IPSEC_IN_FINISH; if (entry->async) { - if (odp_crypto_packet_op_enq(pkt, &out_pkt, ¶ms, 1)) + if (odp_crypto_op_enq(pkt, &out_pkt, ¶ms, 1)) abort(); return PKT_POSTED; } - if (odp_crypto_packet_op(pkt, &out_pkt, ¶ms, 1)) + if (odp_crypto_op(pkt, &out_pkt, ¶ms, 1)) abort(); *pkt = out_pkt; @@ -727,7 +727,7 @@ pkt_disposition_e do_ipsec_in_finish(odp_packet_t pkt, int hdr_len = ctx->ipsec.hdr_len; int trl_len = 0; - odp_crypto_packet_result(&result, pkt); + odp_crypto_result(&result, pkt); /* Check crypto result */ if (!result.ok) { @@ -1001,14 +1001,14 @@ pkt_disposition_e do_ipsec_out_seq(odp_packet_t *pkt, /* Issue crypto request */ if (entry->async) { - if (odp_crypto_packet_op_enq(pkt, &out_pkt, - &ctx->ipsec.params, 1)) + if (odp_crypto_op_enq(pkt, &out_pkt, + &ctx->ipsec.params, 1)) abort(); return PKT_POSTED; } - if (odp_crypto_packet_op(pkt, &out_pkt, - &ctx->ipsec.params, 1)) + if (odp_crypto_op(pkt, &out_pkt, + &ctx->ipsec.params, 1)) abort(); *pkt = out_pkt; @@ -1030,7 +1030,7 @@ pkt_disposition_e do_ipsec_out_finish(odp_packet_t pkt, odph_ipv4hdr_t *ip; odp_crypto_packet_result_t result; - odp_crypto_packet_result(&result, pkt); + odp_crypto_result(&result, pkt); /* Check crypto result */ if (!result.ok) { diff --git a/example/ipsec/odp_ipsec_cache.c b/example/ipsec/odp_ipsec_cache.c index 18a98a29..2a1416b0 100644 --- a/example/ipsec/odp_ipsec_cache.c +++ b/example/ipsec/odp_ipsec_cache.c @@ -66,12 +66,12 @@ int create_ipsec_cache_entry(sa_db_entry_t *cipher_sa, params.op = (in) ? ODP_CRYPTO_OP_DECODE : ODP_CRYPTO_OP_ENCODE; params.auth_cipher_text = TRUE; if (CRYPTO_API_SYNC == api_mode) { - params.packet_op_mode = ODP_CRYPTO_SYNC; + params.op_mode = ODP_CRYPTO_SYNC; params.compl_queue = ODP_QUEUE_INVALID; params.output_pool = ODP_POOL_INVALID; entry->async = FALSE; } else { - params.packet_op_mode = ODP_CRYPTO_ASYNC; + params.op_mode = ODP_CRYPTO_ASYNC; params.compl_queue = completionq; params.output_pool = out_pool; entry->async = TRUE; diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 013507f9..1cd09afd 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -278,7 +278,7 @@ typedef struct odp_crypto_session_param_t { odp_crypto_op_mode_t ODP_DEPRECATE(pref_mode); /** Operation mode when using packet interface: sync or async */ - odp_crypto_op_mode_t packet_op_mode; + odp_crypto_op_mode_t op_mode; /** Cipher algorithm * @@ -315,7 +315,7 @@ typedef struct odp_crypto_session_param_t { /** Async mode completion event queue * - * The completion queue is used to return odp_crypto_packet_op_enq() + * The completion queue is used to return odp_crypto_op_enq() * results to the application. */ odp_queue_t compl_queue; @@ -544,10 +544,10 @@ typedef struct odp_crypto_capability_t { uint32_t max_sessions; /** Supported packet operation in SYNC mode */ - odp_support_t packet_sync_mode; + odp_support_t sync_mode; /** Supported packet operation in ASYNC mode */ - odp_support_t packet_async_mode; + odp_support_t async_mode; /** Supported cipher algorithms */ odp_crypto_cipher_algos_t ciphers; @@ -785,7 +785,7 @@ void odp_crypto_session_param_init(odp_crypto_session_param_t *param); * * Get packet handle to an crypto processed packet event. Event subtype must be * ODP_EVENT_PACKET_CRYPTO. Crypto operation results can be examined with - * odp_crypto_packet_result(). + * odp_crypto_result(). * * Note: any invalid parameters will cause undefined behavior and may cause * the application to abort or crash. @@ -822,8 +822,8 @@ odp_event_t odp_crypto_packet_to_event(odp_packet_t pkt); * @retval 0 On success * @retval <0 On failure */ -int odp_crypto_packet_result(odp_crypto_packet_result_t *result, - odp_packet_t packet); +int odp_crypto_result(odp_crypto_packet_result_t *result, + odp_packet_t packet); /** * Crypto packet operation @@ -841,10 +841,10 @@ int odp_crypto_packet_result(odp_crypto_packet_result_t *result, * @return Number of input packets consumed (0 ... num_pkt) * @retval <0 on failure */ -int odp_crypto_packet_op(const odp_packet_t pkt_in[], - odp_packet_t pkt_out[], - const odp_crypto_packet_op_param_t param[], - int num_pkt); +int odp_crypto_op(const odp_packet_t pkt_in[], + odp_packet_t pkt_out[], + const odp_crypto_packet_op_param_t param[], + int num_pkt); /** * Crypto packet operation @@ -863,10 +863,10 @@ int odp_crypto_packet_op(const odp_packet_t pkt_in[], * @return Number of input packets consumed (0 ... num_pkt) * @retval <0 on failure */ -int odp_crypto_packet_op_enq(const odp_packet_t pkt_in[], - const odp_packet_t pkt_out[], - const odp_crypto_packet_op_param_t param[], - int num_pkt); +int odp_crypto_op_enq(const odp_packet_t pkt_in[], + const odp_packet_t pkt_out[], + const odp_crypto_packet_op_param_t param[], + int num_pkt); /** * @} diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 792c2eca..80ff6f59 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -866,11 +866,11 @@ odp_crypto_operation(odp_crypto_op_param_t *param, packet_param.cipher_range = param->cipher_range; packet_param.auth_range = param->auth_range; - rc = odp_crypto_packet_op(¶m->pkt, &out_pkt, &packet_param, 1); + rc = odp_crypto_op(¶m->pkt, &out_pkt, &packet_param, 1); if (rc < 0) return rc; - rc = odp_crypto_packet_result(&packet_result, out_pkt); + rc = odp_crypto_result(&packet_result, out_pkt); if (rc < 0) return rc; @@ -1101,8 +1101,8 @@ odp_crypto_packet_result_t *get_op_result_from_packet(odp_packet_t pkt) return &hdr->crypto_op_result; } -int odp_crypto_packet_result(odp_crypto_packet_result_t *result, - odp_packet_t packet) +int odp_crypto_result(odp_crypto_packet_result_t *result, + odp_packet_t packet) { odp_crypto_packet_result_t *op_result; @@ -1117,9 +1117,9 @@ int odp_crypto_packet_result(odp_crypto_packet_result_t *result, } static -int odp_crypto_op(odp_packet_t pkt_in, - odp_packet_t *pkt_out, - const odp_crypto_packet_op_param_t *param) +int odp_crypto_int(odp_packet_t pkt_in, + odp_packet_t *pkt_out, + const odp_crypto_packet_op_param_t *param) { odp_crypto_alg_err_t rc_cipher = ODP_CRYPTO_ALG_ERR_NONE; odp_crypto_alg_err_t rc_auth = ODP_CRYPTO_ALG_ERR_NONE; @@ -1197,19 +1197,19 @@ int odp_crypto_op(odp_packet_t pkt_in, return -1; } -int odp_crypto_packet_op(const odp_packet_t pkt_in[], - odp_packet_t pkt_out[], - const odp_crypto_packet_op_param_t param[], - int num_pkt) +int odp_crypto_op(const odp_packet_t pkt_in[], + odp_packet_t pkt_out[], + const odp_crypto_packet_op_param_t param[], + int num_pkt) { int i, rc; odp_crypto_generic_session_t *session; session = (odp_crypto_generic_session_t *)(intptr_t)param->session; - ODP_ASSERT(ODP_CRYPTO_SYNC == session->p.packet_op_mode); + ODP_ASSERT(ODP_CRYPTO_SYNC == session->p.op_mode); for (i = 0; i < num_pkt; i++) { - rc = odp_crypto_op(pkt_in[i], &pkt_out[i], ¶m[i]); + rc = odp_crypto_int(pkt_in[i], &pkt_out[i], ¶m[i]); if (rc < 0) break; } @@ -1217,10 +1217,10 @@ int odp_crypto_packet_op(const odp_packet_t pkt_in[], return i; } -int odp_crypto_packet_op_enq(const odp_packet_t pkt_in[], - const odp_packet_t pkt_out[], - const odp_crypto_packet_op_param_t param[], - int num_pkt) +int odp_crypto_op_enq(const odp_packet_t pkt_in[], + const odp_packet_t pkt_out[], + const odp_crypto_packet_op_param_t param[], + int num_pkt) { odp_packet_t pkt; odp_event_t event; @@ -1228,12 +1228,12 @@ int odp_crypto_packet_op_enq(const odp_packet_t pkt_in[], int i, rc; session = (odp_crypto_generic_session_t *)(intptr_t)param->session; - ODP_ASSERT(ODP_CRYPTO_ASYNC == session->p.packet_op_mode); + ODP_ASSERT(ODP_CRYPTO_ASYNC == session->p.op_mode); ODP_ASSERT(ODP_QUEUE_INVALID != session->p.compl_queue); for (i = 0; i < num_pkt; i++) { pkt = pkt_out[i]; - rc = odp_crypto_op(pkt_in[i], &pkt, ¶m[i]); + rc = odp_crypto_int(pkt_in[i], &pkt, ¶m[i]); if (rc < 0) break; diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c index a129ec98..27d4fd30 100644 --- a/test/common_plat/performance/odp_crypto.c +++ b/test/common_plat/performance/odp_crypto.c @@ -443,10 +443,10 @@ create_session_from_config(odp_crypto_session_t *session, return -1; } params.compl_queue = out_queue; - params.packet_op_mode = ODP_CRYPTO_ASYNC; + params.op_mode = ODP_CRYPTO_ASYNC; } else { params.compl_queue = ODP_QUEUE_INVALID; - params.packet_op_mode = ODP_CRYPTO_SYNC; + params.op_mode = ODP_CRYPTO_SYNC; } if (odp_crypto_session_create(¶ms, session, &ses_create_rc)) { @@ -554,8 +554,8 @@ run_measure_one(crypto_args_t *cargs, } if (cargs->schedule || cargs->poll) { - rc = odp_crypto_packet_op_enq(&pkt, &out_pkt, - ¶ms, 1); + rc = odp_crypto_op_enq(&pkt, &out_pkt, + ¶ms, 1); if (rc <= 0) { app_err("failed odp_crypto_packet_op_enq: rc = %d\n", rc); @@ -563,8 +563,8 @@ run_measure_one(crypto_args_t *cargs, } packets_sent += rc; } else { - rc = odp_crypto_packet_op(&pkt, &out_pkt, - ¶ms, 1); + rc = odp_crypto_op(&pkt, &out_pkt, + ¶ms, 1); if (rc <= 0) { app_err("failed odp_crypto_packet_op: rc = %d\n", rc); @@ -603,7 +603,7 @@ run_measure_one(crypto_args_t *cargs, while (ev != ODP_EVENT_INVALID) { out_pkt = odp_crypto_packet_from_event(ev); - odp_crypto_packet_result(&result, out_pkt); + odp_crypto_result(&result, out_pkt); if (cargs->debug_packets) { mem = odp_packet_data(out_pkt); diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c index 716bd952..ac59744f 100644 --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c @@ -15,7 +15,7 @@ struct suite_context_s { odp_bool_t packet; - odp_crypto_op_mode_t packet_op_mode; + odp_crypto_op_mode_t op_mode; odp_pool_t pool; odp_queue_t queue; }; @@ -165,7 +165,7 @@ static int alg_packet_op(odp_packet_t pkt, op_params.hash_result_offset = plaintext_len; - rc = odp_crypto_packet_op(&pkt, &out_pkt, &op_params, 1); + rc = odp_crypto_op(&pkt, &out_pkt, &op_params, 1); if (rc < 0) { CU_FAIL("Failed odp_crypto_packet_op()"); return rc; @@ -180,7 +180,7 @@ static int alg_packet_op(odp_packet_t pkt, odp_event_types(odp_packet_to_event(pkt), &subtype)); CU_ASSERT(ODP_EVENT_PACKET_CRYPTO == subtype); - rc = odp_crypto_packet_result(&result, pkt); + rc = odp_crypto_result(&result, pkt); if (rc < 0) { CU_FAIL("Failed odp_crypto_packet_result()"); return rc; @@ -233,7 +233,7 @@ static int alg_packet_op_enq(odp_packet_t pkt, op_params.hash_result_offset = plaintext_len; - rc = odp_crypto_packet_op_enq(&pkt, &pkt, &op_params, 1); + rc = odp_crypto_op_enq(&pkt, &pkt, &op_params, 1); if (rc < 0) { CU_FAIL("Failed odp_crypto_op_enq()"); return rc; @@ -260,7 +260,7 @@ static int alg_packet_op_enq(odp_packet_t pkt, odp_event_types(odp_packet_to_event(pkt), &subtype)); CU_ASSERT(ODP_EVENT_PACKET_CRYPTO == subtype); - rc = odp_crypto_packet_result(&result, pkt); + rc = odp_crypto_result(&result, pkt); if (rc < 0) { CU_FAIL("Failed odp_crypto_packet_result()"); return rc; @@ -402,7 +402,7 @@ static void alg_test(odp_crypto_op_t op, odp_crypto_session_param_init(&ses_params); ses_params.op = op; ses_params.auth_cipher_text = false; - ses_params.packet_op_mode = suite_context.packet_op_mode; + ses_params.op_mode = suite_context.op_mode; ses_params.cipher_alg = cipher_alg; ses_params.auth_alg = auth_alg; ses_params.compl_queue = suite_context.queue; @@ -433,7 +433,7 @@ static void alg_test(odp_crypto_op_t op, rc = alg_op(pkt, &ok, session, op_iv_ptr, cipher_range, auth_range, aad, aad_len, plaintext_len); - else if (ODP_CRYPTO_ASYNC == suite_context.packet_op_mode) + else if (ODP_CRYPTO_ASYNC == suite_context.op_mode) rc = alg_packet_op_enq(pkt, &ok, session, op_iv_ptr, cipher_range, auth_range, aad, aad_len, plaintext_len); @@ -1684,7 +1684,7 @@ int crypto_suite_sync_init(void) int crypto_suite_packet_sync_init(void) { suite_context.packet = true; - suite_context.packet_op_mode = ODP_CRYPTO_SYNC; + suite_context.op_mode = ODP_CRYPTO_SYNC; suite_context.pool = odp_pool_lookup("packet_pool"); if (suite_context.pool == ODP_POOL_INVALID) @@ -1697,7 +1697,7 @@ int crypto_suite_packet_sync_init(void) int crypto_suite_packet_async_init(void) { suite_context.packet = true; - suite_context.packet_op_mode = ODP_CRYPTO_ASYNC; + suite_context.op_mode = ODP_CRYPTO_ASYNC; suite_context.pool = odp_pool_lookup("packet_pool"); if (suite_context.pool == ODP_POOL_INVALID) From patchwork Thu Jul 13 22:00:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 107712 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp71924qge; Thu, 13 Jul 2017 15:04:24 -0700 (PDT) X-Received: by 10.55.65.134 with SMTP id o128mr7617124qka.176.1499983464444; Thu, 13 Jul 2017 15:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499983464; cv=none; d=google.com; s=arc-20160816; b=hWXL0hAD34nSACcDGRPqvUy5HZ6z9wtUpk6QWKjYIs5r2GnUI9W50FKS8V8m5tKV42 pOP6/1/5hFk/AlZqaHF8rBFlOUB2cTpRpOe/Wem1CtmuI2D0RmgPglZ0Sm2JXAaCykAA C0rUz21CijY6u9FDJDKMCWsiVJVwKJ5sfrjsuxMXLgczjHs/foe63GYFHA7KybWlS+P2 ajFLNngVkC+0Vxq08/KO3OD70379zOOI3K7czi9BVoVjv4todbF7lBK+3EfbjEH2f938 mHPwMoIFqvTMrHwimaXivROVuRtQU0TmaCca5pSHVwksu8L6+7LHgu/ULByGb1pz0/9c CAUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=sJXlmJD2j+hB4awsQC+YUCFsjgY7Rm43pf0p1fDtaqg=; b=xhB6g0AuPERs2gLxAg2QPdD/qpFPpHaBNrQCQewJGvF71oc7pQpEd1+fYPBCHaWBio 2CmttVHZ7NAwIonBoWk7+DzUSDKf46qfZgCs8x0CUdR1d/0cp74uny5ZUE4wsP5M9ib2 VW+E/BZDJD221u1jAhduzi9TGKa2c1IChZNrSH5exzvT/BBZumFiknj7RA9AB641Iyhw IYQ+A7pYAbadx2ADZVASHngoH0tz7ZaOZqDXTOVOb4V7srrNzYkjFW2OFagfx1jATdJ7 vwB+HCAGL/CJIPqGEfSXlq06LbXQruEvzAhnjWjy3TSiIdA4Zx6T52hde2OldSPTcGjA 7oaA== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h186si6114235qkc.200.2017.07.13.15.04.24; Thu, 13 Jul 2017 15:04:24 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 20ECE65BF2; Thu, 13 Jul 2017 22:04:24 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 BB48365BD3; Thu, 13 Jul 2017 22:01:17 +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 679C9608B0; Thu, 13 Jul 2017 22:01:10 +0000 (UTC) Received: from forward5p.cmail.yandex.net (forward5p.cmail.yandex.net [77.88.31.20]) by lists.linaro.org (Postfix) with ESMTPS id 732D0607D4 for ; Thu, 13 Jul 2017 22:00:35 +0000 (UTC) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [IPv6:2a02:6b8:0:1402::15:6]) by forward5p.cmail.yandex.net (Yandex) with ESMTP id 5DB5820DEA for ; Fri, 14 Jul 2017 01:00:33 +0300 (MSK) Received: from smtp4p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4p.mail.yandex.net (Yandex) with ESMTP id F3FBF65010B1 for ; Fri, 14 Jul 2017 01:00:32 +0300 (MSK) Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ICqqG72gbP-0VseTg2i; Fri, 14 Jul 2017 01:00:31 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 14 Jul 2017 01:00:16 +0300 Message-Id: <1499983216-15415-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> References: <1499983216-15415-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 74 Subject: [lng-odp] [PATCH API-NEXT v3 4/4] api: crypto: revert deprecation of crypto completion 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" From: Dmitry Eremin-Solenikov It was decided that it would be benefitable to live with both API types at this point, as odp_crypto_compl_t was available for some time. So undeprecate odp_crypto_compl_t and related functionality. Validation tests also provide necessary tests for pref_mode and for completion event. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 74 (lumag:crypto-packet) ** https://github.com/Linaro/odp/pull/74 ** Patch: https://github.com/Linaro/odp/pull/74.patch ** Base sha: f49ce736d461c3e8c2534ed216e8a70e8bee954e ** Merge commit sha: 668e2e51ec1fae14a324a67371babeeb8ecdaeda **/ include/odp/api/spec/crypto.h | 38 +++++++------------- include/odp/arch/default/api/abi/crypto.h | 4 +-- include/odp/arch/default/api/abi/event.h | 4 +-- .../include/odp/api/plat/crypto_types.h | 3 +- .../include/odp/api/plat/event_types.h | 3 +- platform/linux-generic/odp_crypto.c | 4 --- platform/linux-generic/odp_event.c | 2 -- test/common_plat/performance/odp_crypto.c | 1 + test/common_plat/validation/api/crypto/crypto.c | 2 ++ .../validation/api/crypto/odp_crypto_test_inp.c | 42 +++++++++++++++++++++- .../validation/api/crypto/odp_crypto_test_inp.h | 2 ++ 11 files changed, 62 insertions(+), 43 deletions(-) diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 1cd09afd..6d4807c4 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -271,11 +271,8 @@ typedef struct odp_crypto_session_param_t { */ odp_bool_t auth_cipher_text; - /** Preferred sync vs. async - * - * @deprecated no-op now, odp_crypto_operation() will always process - * data in non-posted mode */ - odp_crypto_op_mode_t ODP_DEPRECATE(pref_mode); + /** Preferred sync vs. async for odp_crypto_operation() */ + odp_crypto_op_mode_t pref_mode; /** Operation mode when using packet interface: sync or async */ odp_crypto_op_mode_t op_mode; @@ -340,11 +337,8 @@ typedef struct odp_crypto_op_param_t { /** Session handle from creation */ odp_crypto_session_t session; - /** User context - * - * @deprecated No need to pass context around sync calls - * */ - void *ODP_DEPRECATE(ctx); + /** User context */ + void *ctx; /** Input packet * @@ -504,11 +498,8 @@ typedef struct odp_crypto_op_result { /** Request completed successfully */ odp_bool_t ok; - /** User context from request - * - * @deprecated No need to pass context around sync calls - * */ - void *ODP_DEPRECATE(ctx); + /** User context from request */ + void *ctx; /** Output packet */ odp_packet_t pkt; @@ -692,8 +683,7 @@ int odp_crypto_session_destroy(odp_crypto_session_t session); * * @return crypto completion handle */ -ODP_DEPRECATE(odp_crypto_compl_t) ODP_DEPRECATE(odp_crypto_compl_from_event)( - odp_event_t ev); +odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev); /** * Convert crypto completion handle to event handle @@ -702,16 +692,14 @@ ODP_DEPRECATE(odp_crypto_compl_t) ODP_DEPRECATE(odp_crypto_compl_from_event)( * * @return Event handle */ -odp_event_t ODP_DEPRECATE(odp_crypto_compl_to_event)( - ODP_DEPRECATE(odp_crypto_compl_t) completion_event); +odp_event_t odp_crypto_compl_to_event(odp_crypto_compl_t completion_event); /** * Release crypto completion event * * @param completion_event Completion event we are done accessing */ -void ODP_DEPRECATE(odp_crypto_compl_free)( - ODP_DEPRECATE(odp_crypto_compl_t) completion_event); +void odp_crypto_compl_free(odp_crypto_compl_t completion_event); /** * Crypto per packet operation @@ -739,9 +727,8 @@ int odp_crypto_operation(odp_crypto_op_param_t *param, * @param completion_event Event containing operation results * @param result Pointer to result structure */ -void ODP_DEPRECATE(odp_crypto_compl_result)( - ODP_DEPRECATE(odp_crypto_compl_t) completion_event, - odp_crypto_op_result_t *result); +void odp_crypto_compl_result(odp_crypto_compl_t completion_event, + odp_crypto_op_result_t *result); /** * Get printable value for an odp_crypto_session_t @@ -767,8 +754,7 @@ uint64_t odp_crypto_session_to_u64(odp_crypto_session_t hdl); * to enable applications to generate a printable value that represents * an odp_crypto_compl_t handle. */ -uint64_t ODP_DEPRECATE(odp_crypto_compl_to_u64)( - ODP_DEPRECATE(odp_crypto_compl_t) hdl); +uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl); /** * Initialize crypto session parameters diff --git a/include/odp/arch/default/api/abi/crypto.h b/include/odp/arch/default/api/abi/crypto.h index 2d02eee6..f0793a19 100644 --- a/include/odp/arch/default/api/abi/crypto.h +++ b/include/odp/arch/default/api/abi/crypto.h @@ -11,8 +11,6 @@ extern "C" { #endif -#include - #include /** @internal Dummy type for strong typing */ @@ -25,7 +23,7 @@ typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_crypto_compl_t; #define ODP_CRYPTO_SESSION_INVALID (0xffffffffffffffffULL) typedef uint64_t odp_crypto_session_t; -typedef _odp_abi_crypto_compl_t *ODP_DEPRECATE(odp_crypto_compl_t); +typedef _odp_abi_crypto_compl_t *odp_crypto_compl_t; /** * @} diff --git a/include/odp/arch/default/api/abi/event.h b/include/odp/arch/default/api/abi/event.h index 871d2cf9..f86d8e27 100644 --- a/include/odp/arch/default/api/abi/event.h +++ b/include/odp/arch/default/api/abi/event.h @@ -11,8 +11,6 @@ extern "C" { #endif -#include - #include /** @internal Dummy type for strong typing */ @@ -30,7 +28,7 @@ typedef enum odp_event_type_t { ODP_EVENT_BUFFER = 1, ODP_EVENT_PACKET = 2, ODP_EVENT_TIMEOUT = 3, - ODP_DEPRECATE(ODP_EVENT_CRYPTO_COMPL) = 4, + ODP_EVENT_CRYPTO_COMPL = 4, ODP_EVENT_IPSEC_STATUS = 5 } odp_event_type_t; diff --git a/platform/linux-generic/include/odp/api/plat/crypto_types.h b/platform/linux-generic/include/odp/api/plat/crypto_types.h index 23e1cc42..2cc747eb 100644 --- a/platform/linux-generic/include/odp/api/plat/crypto_types.h +++ b/platform/linux-generic/include/odp/api/plat/crypto_types.h @@ -22,7 +22,6 @@ extern "C" { #if ODP_ABI_COMPAT == 1 #include #else -#include /** @ingroup odp_crypto * @{ @@ -31,7 +30,7 @@ extern "C" { #define ODP_CRYPTO_SESSION_INVALID (0xffffffffffffffffULL) typedef uint64_t odp_crypto_session_t; -typedef ODP_HANDLE_T(ODP_DEPRECATE(odp_crypto_compl_t)); +typedef ODP_HANDLE_T(odp_crypto_compl_t); /** * @} diff --git a/platform/linux-generic/include/odp/api/plat/event_types.h b/platform/linux-generic/include/odp/api/plat/event_types.h index 58ce0a8b..4d0efff1 100644 --- a/platform/linux-generic/include/odp/api/plat/event_types.h +++ b/platform/linux-generic/include/odp/api/plat/event_types.h @@ -23,7 +23,6 @@ extern "C" { #include #else -#include #include #include @@ -39,7 +38,7 @@ typedef enum odp_event_type_t { ODP_EVENT_BUFFER = 1, ODP_EVENT_PACKET = 2, ODP_EVENT_TIMEOUT = 3, - ODP_DEPRECATE(ODP_EVENT_CRYPTO_COMPL) = 4, + ODP_EVENT_CRYPTO_COMPL = 4, ODP_EVENT_IPSEC_STATUS = 5 } odp_event_type_t; diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 80ff6f59..ca51bdf0 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -881,9 +881,7 @@ odp_crypto_operation(odp_crypto_op_param_t *param, ODP_EVENT_PACKET_BASIC); /* Fill in result */ -#if ODP_DEPRECATED_API local_result.ctx = param->ctx; -#endif local_result.pkt = out_pkt; local_result.cipher_status = packet_result.cipher_status; local_result.auth_status = packet_result.auth_status; @@ -1030,7 +1028,6 @@ int32_t odp_random_test_data(uint8_t *buf, uint32_t len, uint64_t *seed) return len; } -#if ODP_DEPRECATED_API odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev) { /* This check not mandated by the API specification */ @@ -1067,7 +1064,6 @@ uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl) { return _odp_pri(hdl); } -#endif void odp_crypto_session_param_init(odp_crypto_session_param_t *param) { diff --git a/platform/linux-generic/odp_event.c b/platform/linux-generic/odp_event.c index 56cc90b0..23b410d8 100644 --- a/platform/linux-generic/odp_event.c +++ b/platform/linux-generic/odp_event.c @@ -46,11 +46,9 @@ void odp_event_free(odp_event_t event) case ODP_EVENT_TIMEOUT: odp_timeout_free(odp_timeout_from_event(event)); break; -#if ODP_DEPRECATED_API case ODP_EVENT_CRYPTO_COMPL: odp_crypto_compl_free(odp_crypto_compl_from_event(event)); break; -#endif default: ODP_ABORT("Invalid event type: %d\n", odp_event_type(event)); } diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c index 27d4fd30..7a25ffdc 100644 --- a/test/common_plat/performance/odp_crypto.c +++ b/test/common_plat/performance/odp_crypto.c @@ -427,6 +427,7 @@ create_session_from_config(odp_crypto_session_t *session, odp_crypto_session_param_init(¶ms); memcpy(¶ms, &config->session, sizeof(odp_crypto_session_param_t)); params.op = ODP_CRYPTO_OP_ENCODE; + params.pref_mode = ODP_CRYPTO_SYNC; /* Lookup the packet pool */ pkt_pool = odp_pool_lookup("packet_pool"); diff --git a/test/common_plat/validation/api/crypto/crypto.c b/test/common_plat/validation/api/crypto/crypto.c index 8a6c20ec..04ca527d 100644 --- a/test/common_plat/validation/api/crypto/crypto.c +++ b/test/common_plat/validation/api/crypto/crypto.c @@ -15,6 +15,8 @@ odp_suiteinfo_t crypto_suites[] = { {ODP_CRYPTO_SYNC_INP, crypto_suite_sync_init, crypto_suite_term, crypto_suite}, + {ODP_CRYPTO_ASYNC_INP, crypto_suite_async_init, + crypto_suite_term, crypto_suite}, {ODP_CRYPTO_PACKET_SYNC_INP, crypto_suite_packet_sync_init, crypto_suite_term, crypto_suite}, {ODP_CRYPTO_PACKET_ASYNC_INP, crypto_suite_packet_async_init, diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c index ac59744f..df4ac0c4 100644 --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c @@ -16,6 +16,7 @@ struct suite_context_s { odp_bool_t packet; odp_crypto_op_mode_t op_mode; + odp_crypto_op_mode_t pref_mode; odp_pool_t pool; odp_queue_t queue; }; @@ -81,6 +82,7 @@ static int alg_op(odp_packet_t pkt, op_params.session = session; op_params.pkt = pkt; op_params.out_pkt = pkt; + op_params.ctx = (void *)0xdeadbeef; if (cipher_range) { op_params.cipher_range = *cipher_range; @@ -109,8 +111,31 @@ static int alg_op(odp_packet_t pkt, return rc; } - CU_ASSERT(posted == 0); + if (posted) { + odp_event_t event; + odp_crypto_compl_t compl_event; + + /* Poll completion queue for results */ + do { + event = odp_queue_deq(suite_context.queue); + } while (event == ODP_EVENT_INVALID); + + CU_ASSERT(ODP_EVENT_CRYPTO_COMPL == odp_event_type(event)); + CU_ASSERT(ODP_EVENT_NO_SUBTYPE == odp_event_subtype(event)); + CU_ASSERT(ODP_EVENT_CRYPTO_COMPL == + odp_event_types(event, &subtype)); + CU_ASSERT(ODP_EVENT_NO_SUBTYPE == subtype); + + compl_event = odp_crypto_compl_from_event(event); + CU_ASSERT(odp_crypto_compl_to_u64(compl_event) == + odp_crypto_compl_to_u64( + odp_crypto_compl_from_event(event))); + odp_crypto_compl_result(compl_event, &result); + odp_crypto_compl_free(compl_event); + } + CU_ASSERT(result.pkt == pkt); + CU_ASSERT(result.ctx == (void *)0xdeadbeef); CU_ASSERT(ODP_EVENT_PACKET == odp_event_type(odp_packet_to_event(result.pkt))); CU_ASSERT(ODP_EVENT_PACKET_BASIC == @@ -403,6 +428,7 @@ static void alg_test(odp_crypto_op_t op, ses_params.op = op; ses_params.auth_cipher_text = false; ses_params.op_mode = suite_context.op_mode; + ses_params.pref_mode = suite_context.pref_mode; ses_params.cipher_alg = cipher_alg; ses_params.auth_alg = auth_alg; ses_params.compl_queue = suite_context.queue; @@ -1678,6 +1704,20 @@ int crypto_suite_sync_init(void) return -1; suite_context.queue = ODP_QUEUE_INVALID; + suite_context.pref_mode = ODP_CRYPTO_SYNC; + return 0; +} + +int crypto_suite_async_init(void) +{ + suite_context.pool = odp_pool_lookup("packet_pool"); + if (suite_context.pool == ODP_POOL_INVALID) + return -1; + suite_context.queue = odp_queue_lookup("crypto-out"); + if (suite_context.queue == ODP_QUEUE_INVALID) + return -1; + + suite_context.pref_mode = ODP_CRYPTO_ASYNC; return 0; } diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.h b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.h index 2bc77a94..c50b8493 100644 --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.h +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.h @@ -10,6 +10,7 @@ /* Suite names */ #define ODP_CRYPTO_SYNC_INP "odp_crypto_sync_inp" +#define ODP_CRYPTO_ASYNC_INP "odp_crypto_async_inp" #define ODP_CRYPTO_PACKET_SYNC_INP "odp_crypto_packet_sync_inp" #define ODP_CRYPTO_PACKET_ASYNC_INP "odp_crypto_packet_async_inp" @@ -17,6 +18,7 @@ extern odp_testinfo_t crypto_suite[]; int crypto_suite_sync_init(void); +int crypto_suite_async_init(void); int crypto_suite_packet_sync_init(void); int crypto_suite_packet_async_init(void); int crypto_suite_term(void);