From patchwork Wed Apr 29 17:05:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 47735 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DBABA20553 for ; Wed, 29 Apr 2015 17:05:47 +0000 (UTC) Received: by lbos2 with SMTP id s2sf7889432lbo.2 for ; Wed, 29 Apr 2015 10:05:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to: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=osIknsBlJrB5QP06Qv6Y3SARubks5dIjL7+YZqvlIn4=; b=lGayHpAXyqPxcsZcl733JphIvLvFpbVNlA55xU1Y3WXjP2urCdCEbb3LrCc79JVGGK VOsJP6nI5ssaBbccBo1SSFkEu21TYvp6iau/ZZvsY3kY4YEJgDIFW8ktOi+f8Rfr00QD +xXomgm1ECa8dGIdtx7Xh9Jo8e6skVAHJpl37URTVYfRQl7B12PG6Mas1gpGPjeMD4nR dl2swuAXuafa9v8lMBNcb63dnNolTLuDnztaU+1To2QVGx4XVFIpCUuwGP9Xuy4iJoKZ nOhn61yfg5ujDD+kWIjZKhv3XRaVxiCa232+7wo5yDsBq+Uf6WlIIGt9msmAbH14c+Fm R7Ow== X-Gm-Message-State: ALoCoQl4d/J8awD8dyblHpi5pcR6ixvnGVJXlwAuMK7pX8QLy0QoV6oRLrUBTmyXE8cReMJA/beA X-Received: by 10.180.98.130 with SMTP id ei2mr2448321wib.0.1430327146881; Wed, 29 Apr 2015 10:05:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.229.129 with SMTP id sq1ls262528lac.4.gmail; Wed, 29 Apr 2015 10:05:46 -0700 (PDT) X-Received: by 10.112.126.162 with SMTP id mz2mr9348lbb.97.1430327146715; Wed, 29 Apr 2015 10:05:46 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id h19si19788703lbo.102.2015.04.29.10.05.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 10:05:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laat2 with SMTP id t2so25106239laa.1 for ; Wed, 29 Apr 2015 10:05:46 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr65332lbb.76.1430327146444; Wed, 29 Apr 2015 10:05:46 -0700 (PDT) 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.67.65 with SMTP id l1csp2630606lbt; Wed, 29 Apr 2015 10:05:45 -0700 (PDT) X-Received: by 10.140.144.67 with SMTP id 64mr106345qhq.40.1430327145235; Wed, 29 Apr 2015 10:05:45 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i206si15689207qhc.13.2015.04.29.10.05.25; Wed, 29 Apr 2015 10:05:45 -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; Received: by lists.linaro.org (Postfix, from userid 109) id 9EC0F61C97; Wed, 29 Apr 2015 17:05:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 974C961C88; Wed, 29 Apr 2015 17:05:22 +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 C8E0861C8E; Wed, 29 Apr 2015 17:05:21 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by lists.linaro.org (Postfix) with ESMTPS id EAC4961C84 for ; Wed, 29 Apr 2015 17:05:20 +0000 (UTC) Received: by wizk4 with SMTP id k4so188276181wiz.1 for ; Wed, 29 Apr 2015 10:05:20 -0700 (PDT) X-Received: by 10.180.37.73 with SMTP id w9mr7581232wij.7.1430327120198; Wed, 29 Apr 2015 10:05:20 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id y7sm25756155wjw.16.2015.04.29.10.05.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 10:05:19 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Wed, 29 Apr 2015 18:05:07 +0100 Message-Id: <1430327107-5788-1-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH] packet: implement optional parsing X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoltan.kiss@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.215.48 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 All the examples are setting the param structure to 0, and ODP_PKTIN_PARSE_ALL is 0, so no need to change their default behavious. Signed-off-by: Zoltan Kiss --- platform/linux-generic/odp_packet.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 2abb465..c652bec 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -833,6 +833,11 @@ int _odp_packet_parse(odp_packet_t pkt) uint8_t *parseptr; uint32_t offset, seglen; uint8_t ip_proto = 0; + pktio_entry_t *pktio_entry = get_pktio_entry(pkt_hdr->input); + enum odp_pktio_parse_mode parse_mode = pktio_entry->s.param.parse_mode; + + if (parse_mode == ODP_PKTIN_PARSE_NONE) + return 0; /* Reset parser metadata for new parse */ pkt_hdr->error_flags.all = 0;