From patchwork Wed Dec 17 01:57:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 42366 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 52FC826C90 for ; Wed, 17 Dec 2014 01:57:39 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf5695280wiw.0 for ; Tue, 16 Dec 2014 17:57:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=jIr1mwS+QVHVZytInci6McC09W8kBdHxrC4esdx2hLA=; b=TG1KbPhDcJGbtj/oeiQTRHlugFwUCVHVsLmnsuQVU8OvaME8QNYhbJJqXlnZqXtxtz yGP9oF9nAdtWGdYhXw6Kx4UO/QtcB9tFQBrpL1BTalpMyFLjkXroVxBfI8XKn3T1/Awv tUTlWMFtbW7S6jCXedcHUnCiewCRmnb5yLPy4cn/3gsUzNebmjqVs+0rpCt8xdCLo79r F5Po+9pPgjjh/UBAIOVVJejudOWTctCUbznEAHy5wkiv4gQVoUYChx/vr8PD62GVBvOT AUkH11XV/yAOTQl6zjhIMGMJilTDpTlRDl1v9wXIH79HTUXcPq9RJcg6RTX1snyTzQQK aVZg== X-Gm-Message-State: ALoCoQlJ+WqUgPKjsJ/gl1WbC3+XMDvbSXjHRDwkz+iVrSpm+2fNKhVmkitOfm/2fLqF3Px9+6LA X-Received: by 10.180.84.136 with SMTP id z8mr342605wiy.6.1418781458604; Tue, 16 Dec 2014 17:57:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.6 with SMTP id 6ls43938lai.95.gmail; Tue, 16 Dec 2014 17:57:38 -0800 (PST) X-Received: by 10.152.2.165 with SMTP id 5mr38609482lav.40.1418781458140; Tue, 16 Dec 2014 17:57:38 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id p7si2371379lae.87.2014.12.16.17.57.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 17:57:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id u10so12063573lbd.17 for ; Tue, 16 Dec 2014 17:57:37 -0800 (PST) X-Received: by 10.152.26.201 with SMTP id n9mr32183187lag.50.1418781457712; Tue, 16 Dec 2014 17:57:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp1216304lbb; Tue, 16 Dec 2014 17:57:37 -0800 (PST) X-Received: by 10.224.172.131 with SMTP id l3mr71989814qaz.32.1418781456531; Tue, 16 Dec 2014 17:57:36 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id a5si3069660qat.0.2014.12.16.17.57.35 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Dec 2014 17:57:36 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y13rp-0000zF-G9; Wed, 17 Dec 2014 01:57:33 +0000 Received: from mail-ob0-f176.google.com ([209.85.214.176]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y13rj-0000wm-CX for lng-odp@lists.linaro.org; Wed, 17 Dec 2014 01:57:27 +0000 Received: by mail-ob0-f176.google.com with SMTP id vb8so1604839obc.7 for ; Tue, 16 Dec 2014 17:57:22 -0800 (PST) X-Received: by 10.182.200.135 with SMTP id js7mr24209302obc.71.1418781442079; Tue, 16 Dec 2014 17:57:22 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id o93sm1165447oik.21.2014.12.16.17.57.21 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 17:57:21 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 16 Dec 2014 19:57:15 -0600 Message-Id: <1418781435-20628-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: packets: disable offset adjustments X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Disable packet offset adjustments on packet head push/pull operations as requested by Petri Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp_packet_internal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 515c127..068f969 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -198,13 +198,15 @@ static inline void *packet_map(odp_packet_hdr_t *pkt_hdr, pkt_hdr->headroom + pkt_hdr->frame_len); } +#define ENABLE_OFFSET_UPDATES 0 + #define pull_offset(x, len) do { \ - if (x != ODP_PACKET_OFFSET_INVALID) \ + if (ENABLE_OFFSET_UPDATES && x != ODP_PACKET_OFFSET_INVALID) \ x = x < len ? ODP_PACKET_OFFSET_INVALID : x - len; \ } while (0) #define push_offset(x, len) do { \ - if (x != ODP_PACKET_OFFSET_INVALID) \ + if (ENABLE_OFFSET_UPDATES && x != ODP_PACKET_OFFSET_INVALID) \ x += len; \ } while (0)