From patchwork Fri Sep 8 14:00:10 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: 112086 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp1669459ybm; Fri, 8 Sep 2017 07:07:52 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBtbHGS72/BlULsKIvkNWdfHxYNfW3JlaAsy3OmZUFUL093MplZMm4FSGSbmc4+/ic8FU75 X-Received: by 10.233.237.7 with SMTP id c7mr3884829qkg.69.1504879672258; Fri, 08 Sep 2017 07:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504879672; cv=none; d=google.com; s=arc-20160816; b=Ku5jC9mOL3tSr8YIC94vbCroOTULGN3UY4kr85Eg7v1Aly7qWmiIXBwyV3uMZa56BK LHeVlMcWIPFmDJ1H3bFy+7U8K9acKUPCWuvz0FL5+JHvk//cwvXRdegLQs/TwfEU5084 RW7ZqTrR5RLE8YEb78W4L10RxL5Iox9t/ssOxeKGxGQXl+1lM7R8vS2aUaG+IMjt6yum MHjXD5SuaAoglglajfm++vNGuNFCFv7XldBJd6iAvlOEs+lpB+3fGJPuRiVzwek5WI8e uHqzWtSNPlgzMY3C2FSV9VwUhiXADoP5BwPloKtrSC/hWOpJnJPUbcoxegpEXxmTa91e babg== 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=uakf0ZCJE3YObGMmnB5EEz+efJ7F3CrIUgOruvsnJuI=; b=gE/FqQsWMxv1XoMaQ2txaDwvOxNzz4XXodKsfbZYZ8LAZDNkXf6EA1/sfJmURUaXPj j1S+r9QKtHzPDO2A9Jx6c5KqwkUXz1GBct2Yx5qvcYfLl5eUJwEpBHoC2FWcQkrlAqTU PM2XDmeeDgqcL0l3JRyG9A+6m8f3A3dZSLgytla6BV76qqMQyAg0IoQLjAs8HbVvvKMV rbV9kcO3Q6OzKxRGjSoHotHyNKArWpeeNaFrs5vMx4jOyoD+0n6hpTVkBNltoLSBxu7C Fvn4mAb4weJiT0p1iagP53ZlXyQRRiC+1kr/A0/bMKeBst1q8Aq4h5p5LOBvNW4mUXzg PAXA== 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 q14si2079789qtg.327.2017.09.08.07.07.51; Fri, 08 Sep 2017 07:07:52 -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 D0D7A62D0E; Fri, 8 Sep 2017 14:07:51 +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 A8F2C644DD; Fri, 8 Sep 2017 14:01:00 +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 D66AF62DF3; Fri, 8 Sep 2017 14:00:30 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 6609F60AF7 for ; Fri, 8 Sep 2017 14:00:25 +0000 (UTC) Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 486F4444411D for ; Fri, 8 Sep 2017 17:00:24 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id giCqXIUUSQ-0Oj8V7Ts; Fri, 08 Sep 2017 17:00:24 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IwYlQdvFwh-0NKS0xAB; Fri, 08 Sep 2017 17:00:23 +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, 8 Sep 2017 17:00:10 +0300 Message-Id: <1504879212-3689-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1504879212-3689-1-git-send-email-odpbot@yandex.ru> References: <1504879212-3689-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 170 Subject: [lng-odp] [PATCH v1 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: 360c1d34b52a2356619b9290811862b9de41de00 ** Merge commit sha: e19cce86ab00ccd959d2c3c82c0786ec6da19ba7 **/ .../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;