From patchwork Wed Feb 7 10:59:57 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: 127147 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp356756ljc; Wed, 7 Feb 2018 03:04:12 -0800 (PST) X-Google-Smtp-Source: AH8x224KnVU98/mEjQTh7hsGxoGrK/B+MiaRmUKLxHQqQk22Q/C3ZfUUsVaoxBTNFQADhexb2i7U X-Received: by 10.200.48.136 with SMTP id v8mr8558158qta.296.1518001452331; Wed, 07 Feb 2018 03:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518001452; cv=none; d=google.com; s=arc-20160816; b=EeG6iXTljQUMLFHAzNN8P/zbi3wFcySpuoxMqhFnADtJgz5lZMMeEcynP0IGfFB9NP e5sZI/t0YI1b4vs2m3Y8EseX/s1ZuqsoPGCkyAIk5UVM0bX7ACCvbrvplM40jgDRtC38 HeA+4RISd5izLJuhTYm5Loc9mJkz+dZl5JCm/PDwv+7e42KwHBbnPAAg/mlSN8zuo/xo P2BG6450/ZK3taZeB8WHGEkvABd2NC27/c4hb1K2coUsmCrasVc071uVB+Ixxwzgyd9t RBuONINnfp1Lg/64X6SXbNQBzIyNXoJX4H9+4QsZPEXSubLtv9WaLG6O2O/WKc3JgoCg i/nQ== 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=AbaIVhOIIHUY9LRTIdz1UK/hX5jEJvNFz1eTKTAw/vc=; b=WD4LE6Xr7dYEeYbu5fIW/gnmwnhG9GZyH/XiX3ZKy6w2BTCfs7uNfZ2sDW9JrayFZy hO82ipw7BSJHKnnupL5cbVuWpzWsA6F4fiwg8BxninQjUZsQ2cg5vSEZO/Wovq3DFXRG MMBBTqrkdqiiuT+jHcX2Vy4RE5xMvVAazgrl8iuVsEAD7/OXZKI1LVT1mnY7uDU9vZHG 8+sHe+Vo8XGX12qhYRtx/Yn7Gj00EMgvm9Txy/8Wu+jTz6iGBaZydeLG9LPPa9g1UQ/D EOJHZOb/tyko8R1OFEr6SxYSc+3FMloRXSSczIiWPaAYgqpu/XmgIdms1fd5AGRUx62K ni8A== 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 a7si82179qte.173.2018.02.07.03.04.12; Wed, 07 Feb 2018 03:04:12 -0800 (PST) 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 01D92627B7; Wed, 7 Feb 2018 11:04:11 +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,FREEMAIL_FROM, 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 5ED5B617A3; Wed, 7 Feb 2018 11:02:29 +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 EEB33617C9; Wed, 7 Feb 2018 11:02:18 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 929F861767 for ; Wed, 7 Feb 2018 11:00:55 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward104o.mail.yandex.net (Yandex) with ESMTP id ECD48704E72 for ; Wed, 7 Feb 2018 14:00:53 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id jYuNiZ4ba1-0rhStYb5; Wed, 07 Feb 2018 14:00:53 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id LVw23zZMqp-0lV85kVZ; Wed, 07 Feb 2018 14:00:47 +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: Wed, 7 Feb 2018 13:59:57 +0300 Message-Id: <1518001208-29529-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518001208-29529-1-git-send-email-odpbot@yandex.ru> References: <1518001208-29529-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 457 Subject: [lng-odp] [PATCH API-NEXT v1 3/14] api: packet: add setters for packet L3/L4 type 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: Dmitry Eremin-Solenikov Add API calls to set packet L3/L4 types. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 457 (lumag:packet-types) ** https://github.com/Linaro/odp/pull/457 ** Patch: https://github.com/Linaro/odp/pull/457.patch ** Base sha: e1175d5a69c65bb465022c9f1381c40fdb5c4069 ** Merge commit sha: 802ddfc5ea6f47a8935993bf6f8c1675a4c94930 **/ include/odp/api/spec/packet.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 4be515c7b..95689362f 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -1626,6 +1626,16 @@ int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset); */ odp_proto_l3_type_t odp_packet_l3_type(odp_packet_t pkt); +/** + * Set Layer 3 protocol type + * + * Set layer 3 protocol type. Initial type value is ODP_PROTO_L3_TYPE_NONE. + * + * @param pkt Packet handle + * @param val Layer 3 protocol type + */ +void odp_packet_l3_type_set(odp_packet_t pkt, odp_proto_l3_type_t val); + /** * Layer 4 protocol type * @@ -1637,6 +1647,16 @@ odp_proto_l3_type_t odp_packet_l3_type(odp_packet_t pkt); */ odp_proto_l4_type_t odp_packet_l4_type(odp_packet_t pkt); +/** + * Set Layer 4 protocol type + * + * Set layer 4 protocol type. Initial type value is ODP_PROTO_L4_TYPE_NONE. + * + * @param pkt Packet handle + * @param val Layer 4 protocol type + */ +void odp_packet_l4_type_set(odp_packet_t pkt, odp_proto_l4_type_t val); + /** * Layer 3 checksum check status *