From patchwork Wed Dec 17 09:12:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 42374 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B792926C8B for ; Wed, 17 Dec 2014 09:13:19 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id q1sf9755847lam.10 for ; Wed, 17 Dec 2014 01:13:18 -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=2MZ6PEkxWXFVgNv0BYCsIW102xCfdRnGrHchgpiQXz8=; b=XClSDNpQEkEVzMdDcE6sb+OLSDiYdYrJVUm3XIlCIgTB4ioEj+ncEUXf2axuo9bMvE pC4eIYYbUV374UYeMBTf6T67kwNq4T3wnzF0VdVFfZbV2L0WBJt7Qar05GSl3N4cuOPr 0mHqaiutni/12qv42zetHrChd2SCTrg0QnxxBJxBtpXd5tzJvsSr/esekcqQSoM5LJ8c RMMmn10R+x1gCRCHa0/bPWJPJ92W8aoVn9r8vmjw4z9cJZzaybLmyjhL/CSRxoufVl+u WzquiPxzImm9C6dzXO+AmdfQ2sJsAStdR3mm6V5C1uAcmNIiJAW1E7TJYl+/H4GNL9fH eKxQ== X-Gm-Message-State: ALoCoQlilId/gkAGqvke/Jr8+w6/N9tP3/gzZK9UR7VRgu+WfXduaRsKLEKUx1BhEI2DskSEj7G9 X-Received: by 10.180.98.38 with SMTP id ef6mr632914wib.4.1418807598609; Wed, 17 Dec 2014 01:13:18 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.33 with SMTP id lt1ls1021010lac.64.gmail; Wed, 17 Dec 2014 01:13:18 -0800 (PST) X-Received: by 10.152.21.228 with SMTP id y4mr26408131lae.72.1418807598150; Wed, 17 Dec 2014 01:13:18 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id o8si3162379laj.121.2014.12.17.01.13.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Dec 2014 01:13:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id u10so12069482lbd.20 for ; Wed, 17 Dec 2014 01:13:18 -0800 (PST) X-Received: by 10.152.87.12 with SMTP id t12mr27802262laz.31.1418807598062; Wed, 17 Dec 2014 01:13:18 -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 ru5csp1297179lbb; Wed, 17 Dec 2014 01:13:17 -0800 (PST) X-Received: by 10.229.190.71 with SMTP id dh7mr73475227qcb.5.1418807596615; Wed, 17 Dec 2014 01:13:16 -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 y30si3947721qge.9.2014.12.17.01.13.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 17 Dec 2014 01:13:16 -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 1Y1AfR-0004C1-IL; Wed, 17 Dec 2014 09:13:13 +0000 Received: from mail-qc0-f180.google.com ([209.85.216.180]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y1AfL-00049X-Js for lng-odp@lists.linaro.org; Wed, 17 Dec 2014 09:13:07 +0000 Received: by mail-qc0-f180.google.com with SMTP id i8so11399973qcq.25 for ; Wed, 17 Dec 2014 01:13:02 -0800 (PST) X-Received: by 10.140.21.106 with SMTP id 97mr69521718qgk.61.1418807582363; Wed, 17 Dec 2014 01:13:02 -0800 (PST) Received: from localhost.localdomain (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id z17sm3328580qge.44.2014.12.17.01.12.59 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Dec 2014 01:13:01 -0800 (PST) From: Petri Savolainen To: lng-odp@lists.linaro.org Date: Wed, 17 Dec 2014 11:12:37 +0200 Message-Id: <1418807557-17790-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.2.0 X-Topics: patch Subject: [lng-odp] [PATCH] Remove packet l2/l3/l4 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: petri.savolainen@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.175 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 Packet head push/pull calls do not automatically adjust metadata offsets, only data pointer and headroom. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_packet_internal.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index a0eff30..18e69b3 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -192,24 +192,16 @@ static inline void *packet_map(odp_packet_hdr_t *pkt_hdr, pkt_hdr->headroom + pkt_hdr->frame_len); } -#define pull_offset(x, len) (x = x < len ? 0 : x - len) - static inline void push_head(odp_packet_hdr_t *pkt_hdr, size_t len) { pkt_hdr->headroom -= len; pkt_hdr->frame_len += len; - pkt_hdr->l2_offset += len; - pkt_hdr->l3_offset += len; - pkt_hdr->l4_offset += len; } static inline void pull_head(odp_packet_hdr_t *pkt_hdr, size_t len) { pkt_hdr->headroom += len; pkt_hdr->frame_len -= len; - pull_offset(pkt_hdr->l2_offset, len); - pull_offset(pkt_hdr->l3_offset, len); - pull_offset(pkt_hdr->l4_offset, len); } static inline void push_tail(odp_packet_hdr_t *pkt_hdr, size_t len)