From patchwork Tue Sep 12 13: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: 112316 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5174222qgf; Tue, 12 Sep 2017 06:14:12 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAFHmX+VSzi2NDoC3NpS0oCxMmBbphv3nDQAFgbQ6TUWD0Ltq6iSg6RmfeNFc+n6NOM4HRb X-Received: by 10.55.146.195 with SMTP id u186mr18755011qkd.14.1505222052060; Tue, 12 Sep 2017 06:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505222052; cv=none; d=google.com; s=arc-20160816; b=D33L+zj8HHSD7gkZ2nE/VQK7Hbyt3fqxGbLkSUAl6XpZSiYxm20a6lvn1eAYj47w+i k3pk2f3ssXzL79b4255FTRjoUtSaoiiDQ2JIxjYYA+dlkWUXiLPW1Cc3deUOkSSBQWdU exM/WpNu2N6qwDoke0LO8IfbXJ7TavLzJ0r+OR+NlUuh9yHYysmPGx9ajxgLJC3Eg84S 5h+rGskgF77zXGzaGTACTV1zm5cPQXYxeqjHL+A14IwwNUjRahIUxetAUjSSGT7nwvxO /gRJyDIOH/+lbxWcDYywIOMX6YMKxNRmF26HvmlpyVI5jVyK5pSnNDcGWRoPWLy6Xv1g C4og== 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=5YxyilTfKRSh8vCaonang3bcER/tE9/VL5bkIiyGOyI=; b=MmzYeZGl5Jx7L0zO5vveTkGG0OArQzbOp0j5PmkWWzciKD3Oim1OxGCkMUPcvvvrp4 VfNVyi40KE/xtcofETj+hMXxOqYMI1o9qiHjr7ozCjz1r/8Ufqi1kKUavB6NAiEvWh6h CFuGVqBFGFNxPtIzudrHwD37DocL6dsaZASrpzPsmno8ELf0YtpKtCMkXmX/9jtNMckH rPurXIb/yKH1JhbuakEshmDBMxvygajcI4H8RMBcwerMgKG0GdQvPATeg44acEics1Yg wt1w1X2qGoE/K0LJYKOJZXJfCixzGu/aUz1KBUEMk+/2T6RX5/yzs+n6C/+nCPBsrtdm rzjg== 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 t68si4379317qkh.102.2017.09.12.06.14.11; Tue, 12 Sep 2017 06:14:12 -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 A1AF4615DE; Tue, 12 Sep 2017 13:14:11 +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 2BABD61D9A; Tue, 12 Sep 2017 13:04:53 +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 8829161235; Tue, 12 Sep 2017 13:04:44 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id BE3A461235 for ; Tue, 12 Sep 2017 13:00:59 +0000 (UTC) Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 2EAE0124447B for ; Tue, 12 Sep 2017 16:00:58 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KOLpzzEwgS-0wlmeYq1; Tue, 12 Sep 2017 16:00:58 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eAiz36RVVp-0vHe1kPL; Tue, 12 Sep 2017 16: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: Tue, 12 Sep 2017 16:00:10 +0300 Message-Id: <1505221212-27163-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505221212-27163-1-git-send-email-odpbot@yandex.ru> References: <1505221212-27163-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 170 Subject: [lng-odp] [PATCH v2 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: bab9e010b5432ba0f2ff0651313a85a6a1b563c2 **/ .../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;