From patchwork Wed Feb 7 12:59:58 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: 127183 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp461686ljc; Wed, 7 Feb 2018 05:16:29 -0800 (PST) X-Google-Smtp-Source: AH8x226LYZDhW1JhKSajfncs3aLi5ahvPJbKx7hhlU9Bb/ZiFuGUuTjJsWQVZL0w8L4TFOhRJW/Q X-Received: by 10.129.62.11 with SMTP id l11mr3719485ywa.244.1518009389780; Wed, 07 Feb 2018 05:16:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518009389; cv=none; d=google.com; s=arc-20160816; b=j4HfmG6q/HL3vtbqkdUsMZHQg0Sd1Ff5JopJqTIq2C+AJOBOjKwzqvrz4GPFgxO6fv aUNSyQHIIh0e91nKLhMvaZsKLaCYh/xXYvGr3V48q8CwywGsIzmFNc18EgQFkREV5m29 +myBUabddB5mWoPYOoYW24jM/dudRNra+XV1pGhtAO+73Wz4zfNUh1liZYnAObgP/vkz EcqI9Avt2h46xHA5Xa+6kPZCImUGVK80i+EabSSCWKcBR3+CWw/ipyE39sh1Cs5xfma3 n2d60mbIQNAvDf08w17LZvFqHdQe+m1P2PnxyTHN4lq329YV2XdA47WLZWD+yuJ+TAH1 NSng== 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=3DMhlx8dK8j2m2CM/7+4dFCg/xSdaRIQL/mOe6Vev1o=; b=UpU+JZy8EdDpXsv+/AnBiZZ/G6bPi5t1ogWny2KYTq7MGvplcdDXggsN74Vs7z2HK9 k5epLzmVVTVhUX3K/7sk1pbo6VwEambLvD9ya+zJ6UOousrWeMmo5D3iUMuXKUSYlVEl /GuqoMuMbupljM+GmZPE+grViioTzon9DIuJRUmdTsUOlVkB2gPlAFnBVpdSBAhzplpF pk1lsSFNgXVrccPTCcVpDU//UO7vbirrjV5zsMrYmuorQtD1BhJbce7Qxyj7PiDf7ToK S8pXWwhfUuyJH7NSZ5TCwlPyjp2tFdeliF9/aP3b6h5eTCtaKW0TjPX9M794kd6C3onj F5uA== 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 g64si410624qtd.449.2018.02.07.05.16.29; Wed, 07 Feb 2018 05:16:29 -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 72AEC61819; Wed, 7 Feb 2018 13:16:29 +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 3E4EB627B5; Wed, 7 Feb 2018 13:02:17 +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 3ECC060B5F; Wed, 7 Feb 2018 13:00:45 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 7713160B5F for ; Wed, 7 Feb 2018 13:00:19 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward102p.mail.yandex.net (Yandex) with ESMTP id E63F743057E3 for ; Wed, 7 Feb 2018 16:00:11 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UBaysr4JQb-0BEGDMCv; Wed, 07 Feb 2018 16:00:11 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 2XfrietnG0-0BZ8cEQu; Wed, 07 Feb 2018 16:00:11 +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 15:59:58 +0300 Message-Id: <1518008409-31750-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518008409-31750-1-git-send-email-odpbot@yandex.ru> References: <1518008409-31750-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 457 Subject: [lng-odp] [PATCH API-NEXT v3 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: 86fcf3650d33f5dd82712dda131fb8ca66a3bdf8 **/ 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 *