From patchwork Tue Dec 12 23:00:21 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: 121666 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4734988qgn; Tue, 12 Dec 2017 15:03:23 -0800 (PST) X-Google-Smtp-Source: ACJfBou3FrOnJTRZuBN3qo4y6RZdAuundCa3yxp5ELDdpN/F+sOQTozDZOrfT9um7k1gfMT9dlEF X-Received: by 10.55.98.134 with SMTP id w128mr7550435qkb.292.1513119803138; Tue, 12 Dec 2017 15:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513119803; cv=none; d=google.com; s=arc-20160816; b=LRlnO+H2PB1jrl9YbLD6FAYGawKE3j52b4aF9mckdVJ0473PJVpQdPrz8UzZ/CjQid DXy6RwLbtRH7932cV0NlWLbXemrvKKhWaWOWEhvu+eikYG+iOemV0H21pmdmvPeoRyNR q/hm/x+kaogTBy/rpG7giB1p25RKMFQnjLmj/zn8RTLVc8cEhpdDTz2WeRYhzW43QKdu P7YA1yDHthxOrymOl5EElkP3rK5nZFrp/r/rkTmXYDdsYUQqq9pv6cvJ/4qBIvnIEPCo tA0h3Fn2ljhiTvw26lV78rAy6iEzuaCso7vTTUjLNCZcqgixYYW7s2rerM+h+TFb/FoL 09Yw== 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=fWkCepI2EUe0I36BQknLXuDiHjfSpmf2tq0BSiu4n0E=; b=Ftrn5N2XA0OULWlxdBV3apCub/FQK2O3zF3bDtftjIXqLXe9bn8Sa/hyBtLgqB7Djw CvOMTC2B/sRo3Bh4g5yV1SXyMuN9LS3S93LK47iw4ECr0QiQ3tpsHYBYYrpwtCr7eurF ChbpeLUpNOpXk6ILWNkSq+G69S2GweIuOMmiCxXhpU689ZBVQjYftJPD4gSoIjgam04C 7llOGyh6BvB8hVpk9blp/maMTIeNrvVkU3d8GslBFEUfgmaJhom/+AQUFBQ6Si8MfsGN 7TJAHr1zO4iiKkeK6lh2VXODQk5mE6mpDz7LztoLUIyOa4KtY5Zwkxyns4Vdmz5PPJBA rIOA== 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 u188si293390qkc.353.2017.12.12.15.03.22; Tue, 12 Dec 2017 15:03:23 -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 C70EA60956; Tue, 12 Dec 2017 23:03:22 +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 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 59F7B60928; Tue, 12 Dec 2017 23:01:04 +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 71523607FB; Tue, 12 Dec 2017 23:00:53 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 0EE466085F for ; Tue, 12 Dec 2017 23:00:26 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 3DDC91805559 for ; Wed, 13 Dec 2017 02:00:24 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id uKzeP1HeK2-0OwKdsVL; Wed, 13 Dec 2017 02:00:24 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id OB6mW3VbDa-0NBGiqdm; Wed, 13 Dec 2017 02:00:23 +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 02:00:21 +0300 Message-Id: <1513119622-28651-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513119622-28651-1-git-send-email-odpbot@yandex.ru> References: <1513119622-28651-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 336 Subject: [lng-odp] [PATCH API-NEXT v3 1/2] api: ipsec: use odp_proto_layer_t for parse layer spec 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 Usign odp_proto_layer_t for parse layer spec is more logical, as it is the same enum that is used for the reset of packet parsing API. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 336 (lumag:ipsec-proto-layer) ** https://github.com/Linaro/odp/pull/336 ** Patch: https://github.com/Linaro/odp/pull/336.patch ** Base sha: d96a8207591fbcaac25b79286d7d72a537354c1f ** Merge commit sha: 4939d3df2d894e02c41bff00aefdb7a394392ecc **/ include/odp/api/spec/ipsec.h | 4 ++-- platform/linux-generic/odp_ipsec.c | 12 ++++++------ test/validation/api/ipsec/ipsec.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 538472a5e..b608e3dac 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -156,9 +156,9 @@ typedef struct odp_ipsec_inbound_config_t { * * Each successfully transformed packet has a valid value for L3 offset * regardless of the parse configuration. Default value is - * ODP_IPSEC_LAYER_NONE. ODP_IPSEC_LAYER_L2 is not a valid value. + * ODP_PROTO_LAYER_NONE. ODP_PROTO_LAYER_L2 is not a valid value. */ - odp_ipsec_proto_layer_t parse; + odp_proto_layer_t parse; /** Flags to control IPSEC payload data checks up to the selected parse * level. Checksum checking status can be queried for each packet with diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index 8735e6052..3901443ec 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -200,18 +200,18 @@ static const uint8_t ipsec_padding[255] = { 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, }; -static inline odp_pktio_parser_layer_t parse_layer(odp_ipsec_proto_layer_t l) +static inline odp_pktio_parser_layer_t parse_layer(odp_proto_layer_t l) { switch (l) { - case ODP_IPSEC_LAYER_NONE: + case ODP_PROTO_LAYER_NONE: return ODP_PKTIO_PARSER_LAYER_NONE; - case ODP_IPSEC_LAYER_L2: + case ODP_PROTO_LAYER_L2: return ODP_PKTIO_PARSER_LAYER_L2; - case ODP_IPSEC_LAYER_L3: + case ODP_PROTO_LAYER_L3: return ODP_PKTIO_PARSER_LAYER_L3; - case ODP_IPSEC_LAYER_L4: + case ODP_PROTO_LAYER_L4: return ODP_PKTIO_PARSER_LAYER_L4; - case ODP_IPSEC_LAYER_ALL: + case ODP_PROTO_LAYER_ALL: return ODP_PKTIO_PARSER_LAYER_ALL; } diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c index 7b39c2c5a..3687fa991 100644 --- a/test/validation/api/ipsec/ipsec.c +++ b/test/validation/api/ipsec/ipsec.c @@ -896,7 +896,7 @@ int ipsec_config(odp_instance_t ODP_UNUSED inst) ipsec_config.inbound_mode = suite_context.inbound_op_mode; ipsec_config.outbound_mode = suite_context.outbound_op_mode; ipsec_config.inbound.default_queue = suite_context.queue; - ipsec_config.inbound.parse = ODP_IPSEC_LAYER_ALL; + ipsec_config.inbound.parse = ODP_PROTO_LAYER_ALL; if (ODP_IPSEC_OK != odp_ipsec_config(&ipsec_config)) return -1;