From patchwork Thu Sep 14 09:00:08 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: 112522 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp437838edb; Thu, 14 Sep 2017 02:16:50 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDfkxdmqQvSoGAoS2YckpueGzyAS3KPBZW27ah85OieIK2sBpnVt/3Fi/8AybvDCkUACzkE X-Received: by 10.55.146.195 with SMTP id u186mr1664662qkd.14.1505380443591; Thu, 14 Sep 2017 02:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505380443; cv=none; d=google.com; s=arc-20160816; b=mz1/RiPVUOvO+H5e+1s3vWw/B6nXOTn6TIQ0NAxSe9rWMqcqObz06VnLkF9COemsfI elqRY4AUOTnj4VqnrCPgtqFGkwYEu4Wma0gGCIslFpZUr38Ydbi4VC0vs7BIAtg/Vvoq 9WCPKVep9X3dxTBnS1Ul9JfdAqkHyqECU4bWPDzc/cAFGdvRrZJtW47VhZbjmgsJGuPU VLcJ9gBPZYQbtzDbBBB12L8G2O+NsEHKRVSMRMsLbEVilRFlxht2NyQB3kRNWs1/oy4r yj0YPsFLPLIXxL1XCSMazeo1Lvlph7mHPP/r1NNjHhIPX5tfyb/IFJkeyds94IljoHDo 2D6w== 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=I7IjcP8xnLexxbFFCPayXKxsq5g6q9y/ekx9QofhAf4=; b=kgo7+zEzCHQziAfPVOIJ/a6hPbo4TsVrtiL7qUybCrj2TXmmByDsfKDzD+cm2l4XIm 2AyZ2agPQ32w7IOMPmGYhE4S/wtKVupRBVHguRgiPeH5NWJUwhQMGfUEriNC+QaPnkey Nl/A/rlWinnDKS/Ji+wDCa1DKwdAOWV9CAQVch5aieYzxItDHlRyEqqqCTeRCrFd4YsV mG6OCHlKBy85Ac40VwsXTjbNpgIQV/sj97TUGYNAFJjVaQWt+8bSgk6Q1dZ/+3xoRxSn bMrlYcUdHsPtKq4t7fmBm98GjAADuhpwn1/CvEmboMHxXkZyrm4c7jcXDMpOAMXxuOz6 BINA== 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 m9si660681qkl.317.2017.09.14.02.14.03; Thu, 14 Sep 2017 02:14:03 -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 2F69562D1B; Thu, 14 Sep 2017 09:14:03 +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 5C1A462D32; Thu, 14 Sep 2017 09:03:50 +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 90ABB62D20; Thu, 14 Sep 2017 09:03:41 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 7F31F609D5 for ; Thu, 14 Sep 2017 09:01:02 +0000 (UTC) Received: from mxback13j.mail.yandex.net (mxback13j.mail.yandex.net [IPv6:2a02:6b8:0:1619::88]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 5273A6A81561 for ; Thu, 14 Sep 2017 12:01:00 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback13j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id o7upp14olQ-0xTWDDGj; Thu, 14 Sep 2017 12:00:59 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Aoyyu0Wxlx-0vX0oRhs; Thu, 14 Sep 2017 12:00:57 +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: Thu, 14 Sep 2017 12:00:08 +0300 Message-Id: <1505379610-1146-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505379610-1146-1-git-send-email-odpbot@yandex.ru> References: <1505379610-1146-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 170 Subject: [lng-odp] [PATCH v3 9/11] 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 --- /** Email created from pull request 170 (psavol:master-packet-ref-rework) ** https://github.com/Linaro/odp/pull/170 ** Patch: https://github.com/Linaro/odp/pull/170.patch ** Base sha: fb3f36cec108ce9c55241d9f0e66d4832a552b8a ** Merge commit sha: 3baec92b29f68295264bb3a780277f7f1b6cbb83 **/ .../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 41468bec..96379ebf 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;