From patchwork Thu Sep 14 21:00:06 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: 112658 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp1049945edb; Thu, 14 Sep 2017 14:16:57 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCBX8IDJNxbpRSdpjcopO6OtEMn5gMUYlwFzXTZcJHiCuQDDsirSp5erc2OETIgysj86gxc X-Received: by 10.200.19.73 with SMTP id f9mr23187527qtj.236.1505423817753; Thu, 14 Sep 2017 14:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505423817; cv=none; d=google.com; s=arc-20160816; b=MGZ80+ULlLwLqqHVbzh0HFt4p/JgPOeV6EKINdznwI5Q/OL/fCIWnnT2arzqnrSfKY bBJ+7zUjlttjVCT54XnuEFLkdwR1lrZobo9/FVQyzJW4cogBt4MxDSo5ATZu2rjHE4iq GjZTo9oBGgaAzXpr27tdLBay7gMOc3Cpx6du99JXZwcKb5tm62Wje7MZ7oJ723/0qPYp YaUGrxKkqqgacGLR/Mr0Mc/8q4OUDoCqZkMf3rZ6mcMqQEIMNmc0kEbWmT1hDxeF9u7Q zaJBZfPAQsrKncoccqggAiPUy84FflNHjZTSFLC6Op9YuuuIrfHD5hVbInH3FEq2vvrP VKxg== 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=gA4E7Ie+g9YsxglFADenRe1nNzvuZz3ia4t5nPm8N5E=; b=lQeVjRADLvTvc17g3I8teZwDSREEG8dC1sZ4rlKA5SdpGHtevPRmfbEKAl329yDChZ loern5q+miXU4UlzTcqHOeoAB7NdRi1Jf7RxF6XEtExTHMzhTEhYLO7ait+nRUdh3Bnn LcXWkEFhAfoRNgXgQTarwls58rxy07ZdjjZUT8L6KYTmcl7yu8hDDXWRN7zdtzx37gFN IP5/Q1XOeTAYNjAcQS9x96NngUth1roRXa57cdkBryfM+2oKOpwXyFczDUqqsNEF8pLJ GmA0VsbbyBuSQPaC0YPVBqSHqqfd3M6m/iiBj3/pk92R/h/bmyoJYox3s659qQuicsZQ bu8g== 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 p189si3062046qkf.306.2017.09.14.14.16.57; Thu, 14 Sep 2017 14:16:57 -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 48DD26098C; Thu, 14 Sep 2017 21:16:57 +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 E0B1860D25; Thu, 14 Sep 2017 21:03:02 +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 6767360974; Thu, 14 Sep 2017 21:02:47 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id A252D60974 for ; Thu, 14 Sep 2017 21:00:31 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 801244086664 for ; Fri, 15 Sep 2017 00:00:30 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Zc64p8qwvA-0UJKQ8m8; Fri, 15 Sep 2017 00:00:30 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id wNwc7KZcGv-0Um0MfP7; Fri, 15 Sep 2017 00:00:30 +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:06 +0300 Message-Id: <1505422809-5632-17-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 16/19] linux-gen: packet: compress packet offset table 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 Use uint16_t (instead of size_t) for offsets and thus decrease size of the offset table into one fourth. Signed-off-by: Petri Savolainen Reviewed-by: Bill Fischofer 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 **/ .../include/odp/api/plat/packet_types.h | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/platform/linux-generic/include/odp/api/plat/packet_types.h b/platform/linux-generic/include/odp/api/plat/packet_types.h index 41468becf..96379ebf9 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_types.h +++ b/platform/linux-generic/include/odp/api/plat/packet_types.h @@ -74,33 +74,33 @@ typedef enum { /** @internal Packet header field offsets for inline functions */ typedef struct _odp_packet_inline_offset_t { /** @internal field offset */ - size_t data; + uint16_t data; /** @internal field offset */ - size_t seg_len; + uint16_t seg_len; /** @internal field offset */ - size_t frame_len; + uint16_t frame_len; /** @internal field offset */ - size_t headroom; + uint16_t headroom; /** @internal field offset */ - size_t tailroom; + uint16_t tailroom; /** @internal field offset */ - size_t pool; + uint16_t pool; /** @internal field offset */ - size_t input; + uint16_t input; /** @internal field offset */ - size_t segcount; + uint16_t segcount; /** @internal field offset */ - size_t user_ptr; + uint16_t user_ptr; /** @internal field offset */ - size_t user_area; + uint16_t user_area; /** @internal field offset */ - size_t user_area_size; + uint16_t user_area_size; /** @internal field offset */ - size_t flow_hash; + uint16_t flow_hash; /** @internal field offset */ - size_t timestamp; + uint16_t timestamp; /** @internal field offset */ - size_t input_flags; + uint16_t input_flags; } _odp_packet_inline_offset_t;