From patchwork Mon Jul 31 22: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: 109058 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp708400qge; Mon, 31 Jul 2017 15:01:40 -0700 (PDT) X-Received: by 10.55.52.201 with SMTP id b192mr21515903qka.213.1501538499182; Mon, 31 Jul 2017 15:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501538499; cv=none; d=google.com; s=arc-20160816; b=jMBbXoh44iMl329uUZ9MpRM+lsXJIR7hfuLRI4yEWLlNWuPjbTkDQiZ0vTG/0udFe2 NaFW1X1sOlrZvsr+M9IEhfit/Sv5O2S5PVBvdRmQ0h+Ulu7KaaaApvp2nzvWaQG0mtva Em7QIFr0XwW9vgp0eoxuvDQo08kew4Ox68oB7ecuiIojY4yDy6UQrS5/lHl0O996LujG pF4halcPbT0Tsod/reQXrwysJa0qtqJBv9lDbBmmwvmZM7dhqxPt0HwF8DU1wAkggKbu UjZAps0AyAhgknJKnXy9LvW6M5YU9V9G2tN06QTRf6iSeQCf0LOyVuK+99TBYABOB8jT HU/w== 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=nZiefFSgyyCC191WzUhiKU/WsfuFzAxbJH6fJTaw/Jo=; b=q0RqC7Gw9xMlRp7nUqoI/OrtHIe4Hk7X4mIKe4gK6btuWkUja8o7LveU/e2Lmu1Vev uSrP+q0UEAcov4tIMmYmuJxGIZNSQ4GEc/G4xEOb3wpoyZL6LNWRvyN3J7Ahx5fQ2bXo sKVPkJvmwL4q+7F2C0VsN6IC42IN6HUmJOcYvK6v9maOSVE3kS03/AhvMu6szoc6lbvG Raj3s5XJARolykgQ6sK/DTnkxLmxWwT2x1dntIyu3P1oVA47UJdV+zF/tvoaLa+9NI/s fcIKVRkICpCrrpfEUC+/FaNK9+AEZo7KzDBn1NFePvtF43gEeUY9QqOQ7tXoZHRkBY2F v0XQ== 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 j1si23869216qkc.320.2017.07.31.15.01.38; Mon, 31 Jul 2017 15:01:39 -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 D0BC361CC1; Mon, 31 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 191C1607D4; Mon, 31 Jul 2017 22:00:31 +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 F3B8A60647; Mon, 31 Jul 2017 22:00:22 +0000 (UTC) Received: from forward5j.cmail.yandex.net (forward5j.cmail.yandex.net [5.255.227.23]) by lists.linaro.org (Postfix) with ESMTPS id CEF0660647 for ; Mon, 31 Jul 2017 22:00:20 +0000 (UTC) Received: from smtp2m.mail.yandex.net (smtp2m.mail.yandex.net [77.88.61.129]) by forward5j.cmail.yandex.net (Yandex) with ESMTP id 40ACD20B5A for ; Tue, 1 Aug 2017 01:00:19 +0300 (MSK) Received: from smtp2m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2m.mail.yandex.net (Yandex) with ESMTP id B3D0E2300F6F for ; Tue, 1 Aug 2017 01:00:18 +0300 (MSK) Received: by smtp2m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id prEP5cProO-0HkWatEs; Tue, 01 Aug 2017 01:00:17 +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 01:00:05 +0300 Message-Id: <1501538409-20031-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501538409-20031-1-git-send-email-odpbot@yandex.ru> References: <1501538409-20031-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 94 Subject: [lng-odp] [PATCH API-NEXT v2 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: 590ab5bff952cbbc145c433c3f40a9189b29cc5b **/ 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;