From patchwork Thu Sep 14 21:00:09 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: 112662 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1256329qgf; Thu, 14 Sep 2017 14:22:18 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBd55Sz2jyNSX9k5Un2nptz7lO3WQpcgMRPD3BY3NH6VCyDwxwjTTmTHLsaxtPxVathThkx X-Received: by 10.55.97.68 with SMTP id v65mr4766091qkb.124.1505424138060; Thu, 14 Sep 2017 14:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505424138; cv=none; d=google.com; s=arc-20160816; b=FEButdINIQO9MAUeumMgjanwHqoRs6SGLe8ULE4hJbuTVECPTKotDE4fwIQK2XRX8Q pyd4WIApVEdk+4rPsJy4dKqBEGTHpSqPkh63EB2dYQYMZ+Tw07Etkeq8473tECKPi0W8 hMNMpHaO4aqkm9yFlqbwDVa3hgB1mO4AjWvLSYXngiX9hmyhRlMlpx60fqKiz5Lra38k f+uRA+XmAZv17s13wH6DCls+a6WALJyR3n3k6lyBi+61+srLAA8W8/s+yDofomyVpuTt IGgL/drb87zGOLKYrWNx315s+UygAIvCpCnAgVTaDJ0eE+DjtF1wPCIUYQsSaI3sf37Y ZH8A== 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=UgzLg3rblnSGMHS5iIYvgVFB2slyGABIf1CC5GZufNc=; b=YfycmmNBwTBz9+g3OLDfaZCtbcr8UEOtehoZqIlVHh0Exb4tHlH1fdqkwNeqNCue8U hZ4mLJcNCSLjb6J9HmBJ0kZ5/4LtzRMxn3lxRsX5HxwNA0Riz7wpBvww3r77snt9Gajt bzYT6vcKE+LIbZQR7i37FjMjbh4dEF5SLjAQJ05VALidxKb9pV48VCrJQNwqqamD4b3D sw3U2TLqF5kzWSG/6oOCGdszFuInekKFaN+YSVURqtl6mdertxAH8lBBfjSkXIOzWaKg 5OhkI4Sr2piyUYaaF0lwPahTpsSXMsbVBjaeqp/a04JryL20p0fJKbuagYhfTXyWoFB9 jX7A== 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 m43si12193121qtm.3.2017.09.14.14.22.17; Thu, 14 Sep 2017 14:22:18 -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 71718609C9; Thu, 14 Sep 2017 21:22:17 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 1AF3C62AE5; Thu, 14 Sep 2017 21:03:45 +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 61D4F62AE5; Thu, 14 Sep 2017 21:03:24 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 3DE8260988 for ; Thu, 14 Sep 2017 21:00:39 +0000 (UTC) Received: from mxback14g.mail.yandex.net (mxback14g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:93]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 38B781245C41 for ; Fri, 15 Sep 2017 00:00:38 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback14g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 78eOXNyLWR-0cLifeRZ; Fri, 15 Sep 2017 00:00:38 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id wNwc7KZcGv-0bmKjhOl; Fri, 15 Sep 2017 00:00:37 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 15 Sep 2017 00:00:09 +0300 Message-Id: <1505422809-5632-20-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505422809-5632-1-git-send-email-odpbot@yandex.ru> References: <1505422809-5632-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 179 Subject: [lng-odp] [PATCH API-NEXT v1 19/19] linux-gen: move packet_to_buffer to packet_inlines.h 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: Maxim Uvarov odp_crypto.c is also uses packet_to_buffer() so move this function to common place. Signed-off-by: Maxim Uvarov --- /** Email created from pull request 179 (muvarov:api-next) ** https://github.com/Linaro/odp/pull/179 ** Patch: https://github.com/Linaro/odp/pull/179.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: ada61f5ba5f940d03a95893940c21028d4c75d19 **/ platform/linux-generic/include/odp/api/plat/packet_inlines.h | 5 +++++ platform/linux-generic/odp_crypto.c | 1 + platform/linux-generic/odp_packet.c | 5 ----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h index 6874d1496..be7e18ec3 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h @@ -157,6 +157,11 @@ static inline void _odp_packet_prefetch(odp_packet_t pkt, uint32_t offset, (void)pkt; (void)offset; (void)len; } +static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt) +{ + return (odp_buffer_t)pkt; +} + /* Include inlined versions of API functions */ #include #if ODP_ABI_COMPAT == 0 diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 081fe178e..3174feee0 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 5dbe65d34..ff0cb8fe5 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -69,11 +69,6 @@ odp_packet_t _odp_packet_from_buf_hdr(odp_buffer_hdr_t *buf_hdr) return (odp_packet_t)buf_hdr; } -static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt) -{ - return (odp_buffer_t)pkt; -} - static inline seg_entry_t *seg_entry(odp_packet_hdr_t *hdr, uint32_t seg_idx) {