From patchwork Thu Aug 9 12:00:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 143826 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2005419ljj; Thu, 9 Aug 2018 05:02:35 -0700 (PDT) X-Google-Smtp-Source: AA+uWPznx7ztVNPJjRWj2Q6f617bd8B01JSxw45SCV9p4i4cAXc9P5ozkBAYI9K/arZPntyXszg2 X-Received: by 2002:aed:39a3:: with SMTP id m32-v6mr1672877qte.109.1533816155639; Thu, 09 Aug 2018 05:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533816155; cv=none; d=google.com; s=arc-20160816; b=vJfS43Ul+RJehEzpV5iJy+Yo5wUzQWU4kBZtzdLYr+RFIc7wMKYSONEAr+OhPJGTn0 OmFMldHULQRA8ttk7zWWVXZRNe67tR9cAtU9v7ZkkNeH0+T1c5GKQmhFz5Rb/Z4II26Y O8x8P+bamSJ06hHKPT+cBPBoQWDgkZEvNqcPTaRZBWmEBLW7R0TwBKF6kqmWWPCjve6z ucT930SkJgYmmTaBLvuazwwfBGwoGIUs5JGyly2bnIKe8Ag0Nrk/3bnhGFrJbMbHTaNc Cb0/P3iW9wEqyvtj1m5QWECp19QG3Ir7lVMRx9B20e+NajFvWhlde3JXrJYP/mpVaptS pJIw== 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=OiJH6tzzizgJ1Yi276fE33lPVpf4Q3xU5B3nanoA86E=; b=qbGCYFVwBtBIiszVdpv/zZOyfNM7Fur9A20cHFh0E2ZOa+psJOJR9+QpKZsyorwX1l WTpEFCkr8z2V5CTDdFTVT1Gcux38E8ybgFtkaPvMXNbc/yqhDKQkzgSg3fvlebxxBB1J p6Wd7Y5Ppf5RNk6sbSnhZnlCjS7SSDamieDpd3qg3OGr7rqx5soTbzA9S+daM7Sz0Fjb /kEAW70E4p08vzAo7vuUi7GG6PGbZg2rrs6lK/epViiOYLf36lAqWdjD7SCJZhc1h7YY k+yaiETpf+Jg62ccpUPX66nGEZFjkxiUsrSuQWrM/WiZq7OtEj1f4+uBfss2apmVIILC amvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id c62-v6si971790qkh.295.2018.08.09.05.02.35; Thu, 09 Aug 2018 05:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 31A1168629; Thu, 9 Aug 2018 12:02:35 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 2FCF160736; Thu, 9 Aug 2018 12:01:30 +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 F08566861D; Thu, 9 Aug 2018 12:01:16 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id D2C0260736 for ; Thu, 9 Aug 2018 12:00:10 +0000 (UTC) Received: from mxback5g.mail.yandex.net (mxback5g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:166]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 759DE18058ED for ; Thu, 9 Aug 2018 15:00:09 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback5g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id xQodyr8oWY-09uSO1Ii; Thu, 09 Aug 2018 15:00:09 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id M6ygb3U54b-08vKGLlb; Thu, 09 Aug 2018 15:00:08 +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: Thu, 9 Aug 2018 12:00:05 +0000 Message-Id: <1533816007-30726-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533816007-30726-1-git-send-email-odpbot@yandex.ru> References: <1533816007-30726-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 669 Subject: [lng-odp] [PATCH API-NEXT v1 1/3] api: packet: add subtype call 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 This call is useful when packet subtype needs to be checked sometime after an event has been converted into a packet. The first application stage (receiving and converting events) does not have to record packet subtype for following application stages that process only packets, not events. Signed-off-by: Petri Savolainen --- /** Email created from pull request 669 (psavol:next-packet-subtype) ** https://github.com/Linaro/odp/pull/669 ** Patch: https://github.com/Linaro/odp/pull/669.patch ** Base sha: 9b2b5a9695ad66977c964c83691cd2fef4c45b85 ** Merge commit sha: 3a6201b601ab55e07cbfd561fa9904ba48035478 **/ include/odp/api/spec/packet.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 66665e121..78e519ac3 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -224,6 +224,19 @@ typedef enum odp_packet_chksum_status_t { } odp_packet_chksum_status_t; +/** + * Event subtype of a packet + * + * Returns the subtype of a packet event. Subtype tells if the packet contains + * only basic metadata (ODP_EVENT_PACKET_BASIC) or in addition to that some + * specific metadata (e.g. ODP_EVENT_PACKET_CRYPTO or ODP_EVENT_PACKET_IPSEC). + * + * @param packet Packet handle + * + * @return Packet subtype + */ +odp_event_subtype_t odp_packet_subtype(odp_packet_t packet); + /* * * Alloc and free