From patchwork Fri Dec 15 09:00:17 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: 122069 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp198122qgn; Fri, 15 Dec 2017 01:00:39 -0800 (PST) X-Google-Smtp-Source: ACJfBouyXEzsXiKxnwRSSHUVIhZW0QMvhRBZhaiPeINEDIrkfhJQlYVEijhwiIhTmIuT1UujSdQe X-Received: by 10.55.145.135 with SMTP id t129mr18945726qkd.205.1513328439141; Fri, 15 Dec 2017 01:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513328439; cv=none; d=google.com; s=arc-20160816; b=hNL2Xxm0exQ54HOu5aquZudc5y/mvZH2MsOrPxpVKfg4m0VN7JRDfl3j7WuhskH34C IqsgUFqrV7bNkpmuPr98D456/kM1px5TVhdM77eg0td2LB3wF5Fi6eYtcUowRS0xLhge lSm3zo4EfdhB8bwBVZy46AfiMWgrQb41QEn9L3cFBSm0FH9q7DFucPyNhAHHD5zID09o zl1Kx42MF3/C2CsM5X71EXWqOOOb78vjVgI/6gSgb/dNtFFpcBmrCvdiXAHsNAX4r2DW BKmbB6K8ZJsc/FrtUJlbwfViDPKXlLg57nnoFU0rHVk7/jugU+ko/vGtovG3WLVD9vVG UGiA== 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=4/AxIC6zU4u0zFWXICUcR6MapI41M+hl1hFJDnWQ8Ao=; b=ooQI1LE8YgCriy490L1mMIQBVCXABLrehxHu1jlI6Rn3kq+H5PMJXOwYIHbue8ZYps S8UEAMh5TN7QdsPrTPazHYHW5aqnDGlH7oIhwxOyBRD5h7f3tx0G4UMXo1fonFaYEa5k juTivenlAwhydkW9URi/hGbivLgRewvxrK/dj96KcHi+1/JyFebeYBT3cxBBavMvSPMY 0l8GQ346C1SwJJJWLYxSvZSmMyevpuRUeZgX3TJKpZtHlGis6m+1j2vYu9NsVBvp9aIv NTgABUuywszA9LMXn7i4M2XD+2QpIYMJ649AyYMAQiBlAxWAAkFjX81ToTbsblA8oMva g7aw== 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 w10si5006000qti.366.2017.12.15.01.00.38; Fri, 15 Dec 2017 01:00:39 -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 6E7B260693; Fri, 15 Dec 2017 09:00:38 +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, 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 8307A607C0; Fri, 15 Dec 2017 09:00:28 +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 020E16085C; Fri, 15 Dec 2017 09:00:25 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 9799460693 for ; Fri, 15 Dec 2017 09:00:21 +0000 (UTC) Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 3D1E21842A4 for ; Fri, 15 Dec 2017 12:00:20 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hVxFaqtOoU-0KZalKMc; Fri, 15 Dec 2017 12:00:20 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id CxjcB1vsyk-0JIisvp8; Fri, 15 Dec 2017 12:00:19 +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: Fri, 15 Dec 2017 12:00:17 +0300 Message-Id: <1513328418-26052-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513328418-26052-1-git-send-email-odpbot@yandex.ru> References: <1513328418-26052-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 336 Subject: [lng-odp] [PATCH API-NEXT v7 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 rest 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: 0588040068a50d0d15a641d091fce23214b15594 ** Merge commit sha: 360d1f4862344412fc832e1d28e6fd4ee0c8e834 **/ include/odp/api/spec/ipsec.h | 4 ++-- platform/linux-generic/odp_ipsec.c | 2 +- test/validation/api/ipsec/ipsec.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 538472a5e..c67954689 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_level; /** 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 4f23eb17b..f40cd5e64 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -756,7 +756,7 @@ static ipsec_sa_t *ipsec_in_single(odp_packet_t pkt, parse_param.proto = state.is_ipv4 ? ODP_PROTO_IPV4 : ODP_PROTO_IPV6; - parse_param.last_layer = (odp_proto_layer_t)ipsec_config.inbound.parse; + parse_param.last_layer = ipsec_config.inbound.parse_level; parse_param.chksums = ipsec_config.inbound.chksums; /* We do not care about return code here. diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c index 097216730..4d17c4b9e 100644 --- a/test/validation/api/ipsec/ipsec.c +++ b/test/validation/api/ipsec/ipsec.c @@ -904,7 +904,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_level = ODP_PROTO_LAYER_ALL; if (ODP_IPSEC_OK != odp_ipsec_config(&ipsec_config)) return -1;