From patchwork Wed Sep 7 10:31:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 75624 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp253030qgf; Wed, 7 Sep 2016 03:32:37 -0700 (PDT) X-Received: by 10.55.212.76 with SMTP id l73mr2211718qki.257.1473244357125; Wed, 07 Sep 2016 03:32:37 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d194si8187844qkc.175.2016.09.07.03.32.34; Wed, 07 Sep 2016 03:32:37 -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=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0329C60DDB; Wed, 7 Sep 2016 10:32:33 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 2D3E56065A; Wed, 7 Sep 2016 10:32:12 +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 E666E60745; Wed, 7 Sep 2016 10:32:05 +0000 (UTC) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by lists.linaro.org (Postfix) with ESMTPS id E9C5F6071D for ; Wed, 7 Sep 2016 10:32:04 +0000 (UTC) Received: by mail-lf0-f44.google.com with SMTP id l131so7572661lfl.2 for ; Wed, 07 Sep 2016 03:32:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CI/rd7n5gRjtVDlubOV9qSXPgXeinnPlu3u7lZB1k3o=; b=hCwCIxKnFtyVS5vsVNuKCrb7ggguIc6wQ9VLQ6GCky/tKhrlVToQGvmITeqSd/dAWS SjeauF7q4+jtQfgYO0tA6bfKB/e8ysf7LvEtfDxA1c3o1NGBYKOgpsc3QKekMJdWB5CW 82aUTH2O3WDVvKkFNJmlDQkIqfTjhPfS1Ll4UmBv046OOafOA46/YJXEPZ+F2ccfbEHX UTUI9b+875lZoV8zlLnrpIabwqruYZiOBOIeifoeYb04NFL6VGzE6beMa5JOmFqy3wdY F/q9Tt2ZfoMkLsvsbaAHMljFq2WC+zsx9j+LikCsjWxig8j1I8O06HufRF+TMgRA0uCV bYGw== X-Gm-Message-State: AE9vXwP7XtxNTq2Js+d6X9myUIpw/P+uYSyMr0z+sYni9hFYI9bDEuVsUH9LHjAx3vMRhhpMwd0= X-Received: by 10.25.41.142 with SMTP id p136mr13476260lfp.32.1473244323477; Wed, 07 Sep 2016 03:32:03 -0700 (PDT) Received: from Ubuntu15.localdomain ([194.251.119.207]) by smtp.gmail.com with ESMTPSA id g72sm6525104lji.43.2016.09.07.03.32.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 03:32:02 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 7 Sep 2016 13:31:59 +0300 Message-Id: <1473244319-11501-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1473244319-11501-1-git-send-email-bill.fischofer@linaro.org> References: <1473244319-11501-1-git-send-email-bill.fischofer@linaro.org> Subject: [lng-odp] [RFC API-NEXT 2/2] api: packet: add odp_packet_parse() api 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" The odp_packet_parse() call forces an inline reparse of a packet without reclassifying it. Signed-off-by: Bill Fischofer --- include/odp/api/spec/packet.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.5.0 diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 4a14f2d..2ff763c 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -155,6 +155,22 @@ void odp_packet_free_multi(const odp_packet_t pkt[], int num); int odp_packet_reset(odp_packet_t pkt, uint32_t len); /** + * Parse a packet + * + * Performs a complete parse of an ODP packet to repopulate parser + * metadata associated with the packet. This can be used to perform + * inline re-classification of a packet after, for example, decaspulation. + * Any previous parser metadata is discarded and overwritten by this call. + * + * @param pkt Packet to (re)parse + * + * @return Parse results + * @retval 0 Parse successful + * @retval <0 Parse unsuccessful (packet format not recognized) + */ +int odp_packet_parse(odp_packet_t pkt); + +/** * Get packet handle from event * * Converts an ODP_EVENT_PACKET type event to a packet.