From patchwork Tue Aug 1 02:00:05 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: 109079 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp912968qge; Mon, 31 Jul 2017 19:01:37 -0700 (PDT) X-Received: by 10.200.14.72 with SMTP id j8mr15330091qti.124.1501552897785; Mon, 31 Jul 2017 19:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501552897; cv=none; d=google.com; s=arc-20160816; b=pGnOFwQZLrY0ItEJDoz+eppQLSIkGkaMWKBeLaPFZ/n+thgjurdG5VdXNTXb4FUZGV 18nENaNyg1dC9AH59rm9D2L5bcdIrqbav+r3bGeIHnibLmKN7IHlK4mu9NguChgtD5qa 4j9TT1F1Uwbxi8qIxH/GQ4jWOmbQJxgMENUleFL9ktX2DO5mTwuU6Jymfa5GUT2XedQl 4W6COP8V32WvixWuk7SIwO7/yFBE1Dnoz2riNKtnLhdG7cjuSX7+WCRpfrg3IrOEJXih pyizynu900Ck7pxoKNPrIRNY/Gx9OkXKL1smbOnldEu+loxTP4hyrWbUKRU3tXTktbmh KeTA== 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=biu2T0aCbvFxSpx2DsIdz7KszdDAGWMTIak0Yfwn5zw=; b=uzBHJ+P/PFbDe+/PFokGlz3Rk01eqgWlofBqIkSXbev0nkDdCn/2s1Ig1m4mQOeP8Y nKUAzrNrSW7qBS2aSX+zl5h023XHzH0FpeBUWly5W+E5YnNAepRxsIqiFgzQSLrV3HZQ ySLCiERwkv3XRCzpeFxWBN92+W5pPyOtrSsOC/a2dcDpGbVpgh8QUOwpYrV1n1+mxUEL eo08WfPwN1aBEktJpzSJKwgguSSku9gMeZqPEaFhTAD/KUxQciaWSXTNq3tzO736lIak PJAzbfsPGg3AEWf9Rtozfe+00o2haz7/uApe8Fr/jFDq51U//caFlY4tVWc+co7A80Gk 6nTA== 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 j31si7394414qtd.438.2017.07.31.19.01.37; Mon, 31 Jul 2017 19:01:37 -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 7696B65C8D; Tue, 1 Aug 2017 02:01:37 +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 AB69265CDE; Tue, 1 Aug 2017 02:00:32 +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 840D165C78; Tue, 1 Aug 2017 02:00:25 +0000 (UTC) Received: from forward4j.cmail.yandex.net (forward4j.cmail.yandex.net [5.255.227.22]) by lists.linaro.org (Postfix) with ESMTPS id E7BFB644D6 for ; Tue, 1 Aug 2017 02:00:22 +0000 (UTC) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::25]) by forward4j.cmail.yandex.net (Yandex) with ESMTP id 64AA820E6C for ; Tue, 1 Aug 2017 05:00:21 +0300 (MSK) Received: from smtp1o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id 2BFD81300AB6 for ; Tue, 1 Aug 2017 05:00:20 +0300 (MSK) Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cw80aqSarU-0Ktq453H; Tue, 01 Aug 2017 05:00:20 +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: Tue, 1 Aug 2017 05:00:05 +0300 Message-Id: <1501552809-14585-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501552809-14585-1-git-send-email-odpbot@yandex.ru> References: <1501552809-14585-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 94 Subject: [lng-odp] [PATCH API-NEXT v3 2/6] linux-gen: packet: provide new data set and compare 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 Currently we have such functions in internal namespace for in-ODP use only. Exporting them as a part of public API would allow using them from tests and user applications. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 94 (lumag:crypto-long-keys) ** https://github.com/Linaro/odp/pull/94 ** Patch: https://github.com/Linaro/odp/pull/94.patch ** Base sha: c16f1363303cd5fc11324acbc4dfebe0a9680a41 ** Merge commit sha: 97de0c6543391f0a758ac472f48e0b407ad1d800 **/ platform/linux-generic/include/odp_packet_internal.h | 6 ------ platform/linux-generic/odp_crypto.c | 4 ++-- platform/linux-generic/odp_packet.c | 8 ++++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index e028bc28..0a4e67f3 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -302,12 +302,6 @@ int packet_parse_common(packet_parser_t *pkt_hdr, const uint8_t *ptr, int _odp_cls_parse(odp_packet_hdr_t *pkt_hdr, const uint8_t *parseptr); -int _odp_packet_set_data(odp_packet_t pkt, uint32_t offset, - uint8_t c, uint32_t len); - -int _odp_packet_cmp_data(odp_packet_t pkt, uint32_t offset, - const void *s, uint32_t len); - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 42bd4d58..fa8b0a28 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -213,8 +213,8 @@ odp_crypto_alg_err_t auth_check(odp_packet_t pkt, odp_packet_copy_to_mem(pkt, param->hash_result_offset, bytes, hash_in); - _odp_packet_set_data(pkt, param->hash_result_offset, - 0, bytes); + odp_packet_set_data(pkt, param->hash_result_offset, + 0, bytes); /* Hash it */ packet_hmac(pkt, param, session, hash_out); diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 88032cf2..b3f1f6be 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -1593,8 +1593,8 @@ int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset, pkt, src_offset, len); } -int _odp_packet_set_data(odp_packet_t pkt, uint32_t offset, - uint8_t c, uint32_t len) +int odp_packet_set_data(odp_packet_t pkt, uint32_t offset, + uint8_t c, uint32_t len) { void *mapaddr; uint32_t seglen = 0; /* GCC */ @@ -1615,8 +1615,8 @@ int _odp_packet_set_data(odp_packet_t pkt, uint32_t offset, return 0; } -int _odp_packet_cmp_data(odp_packet_t pkt, uint32_t offset, - const void *s, uint32_t len) +int odp_packet_cmp_mem(odp_packet_t pkt, uint32_t offset, + const void *s, uint32_t len) { const uint8_t *ptr = s; void *mapaddr;