From patchwork Wed Dec 13 15:00:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 121778 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5592289qgn; Wed, 13 Dec 2017 07:09:26 -0800 (PST) X-Google-Smtp-Source: ACJfBosAT6tKjT0JoziJb5ZdEvCEw443s6Ua1XpcBYz3pnGXV2D7zIiyvQnwOEcU+AgQw2rS94Il X-Received: by 10.200.25.78 with SMTP id g14mr11477277qtk.119.1513177766584; Wed, 13 Dec 2017 07:09:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513177766; cv=none; d=google.com; s=arc-20160816; b=IC+2aPm8078RfCLnPrdURqJ1+K5e9FhRAAwr68MbeDXgWSV4Oh7SitcxSAnnrbNcbc 4dYv8ECo2YdUSKJwmXMqfb+ptfmVbIliVZhfzj2onj9w4CAsarNGOW+ExXnh1B/1rggx nBt6uassrFb16x0fHOJjlecy+ugPkY1v85oWTmX/jKHPWaxWz3Wnk0Fns4Ux9zUw0CdQ fmRlg2mnl/v8uV4mzYW+nV+jAldR5ZIBSTLIlUZfYgZk3AymDuxEcgrEQVwNpbNvzZSc gvSgcTtvgT2OQqUzRrjuhRT2n37y0iJrMi1ubUH+Ve1UoWhiD/l9ZgHf6x+6ATdtINBA Pg6A== 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=5AsxTL3Ccs28RDXdfTcKAWQD1k0BlK2OSjoAelUR1YM=; b=J0MWwiQIFF9dl6JPT00JXB7kCNQU5/Ucohh0E0Rbci7rjG3CcSy3V27YP4KSTvJfXB 0UlqX+mPy3zywL6ap6a6gv3Y/vaTnpJdFTkrmMdbyeqIwVqPQZhYMNqSd/HKwNeXzKIQ hFu7GEbd5s+5Fw9IbMaEVZyq/KwFWp0neE1wAEtJ/2CP8uZfFaTLT18zcrBFjbNJzjs4 A9kc+RGT9k8jwFP6s7lnDgMSgQ1nx+Xif5vBBR0p7nygd8ekQIbWF5CnodUgs10Fc1mr 8nt8mkeC7HHGMZ1L8vT62is2LKtg2yn+kziRFcuW9yts4G6DlfZf9yf5wzHegjIY2fGi P7ow== 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 w41si2043020qtc.53.2017.12.13.07.09.26; Wed, 13 Dec 2017 07:09:26 -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 2A6C460888; Wed, 13 Dec 2017 15:09:26 +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_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED 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 AD39860800; Wed, 13 Dec 2017 15:01:44 +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 508F260925; Wed, 13 Dec 2017 15:01:26 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id F11EF607FB for ; Wed, 13 Dec 2017 15:00:20 +0000 (UTC) Received: from mxback13g.mail.yandex.net (mxback13g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:92]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 71EF813467F0 for ; Wed, 13 Dec 2017 18:00:19 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback13g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7ODP3P5lrE-0JVK1ewl; Wed, 13 Dec 2017 18:00:19 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id TIlNgphY6V-0IwCu1dq; Wed, 13 Dec 2017 18:00:18 +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, 13 Dec 2017 18:00:13 +0300 Message-Id: <1513177217-8215-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513177217-8215-1-git-send-email-odpbot@yandex.ru> References: <1513177217-8215-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 338 Subject: [lng-odp] [PATCH API-NEXT v2 1/5] api: pktio: start switching to using odp_proto_layer_t 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 Instead of using separate odp_pktio_parser_layer_t switch to using odp_proto_layer_t. Deprecate old enum and values. For now do not put them under ODP_DEPRECATED_API to let the rest of ODP code to adapt. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 338 (lumag:pktio_parse_layer) ** https://github.com/Linaro/odp/pull/338 ** Patch: https://github.com/Linaro/odp/pull/338.patch ** Base sha: d96a8207591fbcaac25b79286d7d72a537354c1f ** Merge commit sha: 7427c77cd44f5de84a2788e6d7d0cefaf146f479 **/ include/odp/api/spec/packet_io.h | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index a3312d280..bf30877f5 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -272,8 +272,8 @@ typedef struct odp_pktio_param_t { * not checked. * * IPv4 checksum checking may be enabled only when parsing level is - * ODP_PKTIO_PARSER_LAYER_L3 or higher. Similarly, L4 level checksum checking - * may be enabled only with parsing level ODP_PKTIO_PARSER_LAYER_L4 or higher. + * ODP_PROTO_LAYER_L3 or higher. Similarly, L4 level checksum checking + * may be enabled only with parsing level ODP_PROTO_LAYER_L4 or higher. * * Whether checksum checking was done and whether a checksum was correct * can be queried for each received packet with odp_packet_l3_chksum_status() @@ -405,24 +405,30 @@ typedef union odp_pktout_config_opt_t { /** * Parser layers + * + * @deprecated Use odp_proto_layer_t instead */ -typedef enum odp_pktio_parser_layer_t { - /** No layers */ - ODP_PKTIO_PARSER_LAYER_NONE = ODP_PROTO_LAYER_NONE, +typedef odp_proto_layer_t odp_pktio_parser_layer_t; - /** Layer L2 protocols (Ethernet, VLAN, ARP, etc) */ - ODP_PKTIO_PARSER_LAYER_L2 = ODP_PROTO_LAYER_L2, +/** No layers + * @deprecated Use ODP_PROTO_LAYER_NONE, instead */ +#define ODP_PKTIO_PARSER_LAYER_NONE ODP_PROTO_LAYER_NONE - /** Layer L3 protocols (IPv4, IPv6, ICMP, IPsec, etc) */ - ODP_PKTIO_PARSER_LAYER_L3 = ODP_PROTO_LAYER_L3, +/** Layer L2 protocols (Ethernet, VLAN, ARP, etc) + * @deprecated Use ODP_PROTO_LAYER_L2, instead */ +#define ODP_PKTIO_PARSER_LAYER_L2 ODP_PROTO_LAYER_L2 - /** Layer L4 protocols (UDP, TCP, SCTP) */ - ODP_PKTIO_PARSER_LAYER_L4 = ODP_PROTO_LAYER_L4, +/** Layer L3 protocols (IPv4, IPv6, ICMP, IPsec, etc) + * @deprecated Use ODP_PROTO_LAYER_L3, instead */ +#define ODP_PKTIO_PARSER_LAYER_L3 ODP_PROTO_LAYER_L3 - /** All layers */ - ODP_PKTIO_PARSER_LAYER_ALL = ODP_PROTO_LAYER_ALL +/** Layer L4 protocols (UDP, TCP, SCTP) + * @deprecated Use ODP_PROTO_LAYER_L4, instead */ +#define ODP_PKTIO_PARSER_LAYER_L4 ODP_PROTO_LAYER_L4 -} odp_pktio_parser_layer_t; +/** All layers + * @deprecated Use ODP_PROTO_LAYER_ALL instead */ +#define ODP_PKTIO_PARSER_LAYER_ALL ODP_PROTO_LAYER_ALL /** * Parser configuration @@ -436,8 +442,8 @@ typedef struct odp_pktio_parser_config_t { * set. In addition, offset (and pointer) to the next layer is set. * Other layer/protocol specific metadata have undefined values. * - * The default value is ODP_PKTIO_PARSER_LAYER_ALL. */ - odp_pktio_parser_layer_t layer; + * The default value is ODP_PROTO_LAYER_ALL. */ + odp_proto_layer_t layer; } odp_pktio_parser_config_t;