From patchwork Tue Dec 12 17:00:19 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: 121571 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4373878qgn; Tue, 12 Dec 2017 09:02:25 -0800 (PST) X-Google-Smtp-Source: ACJfBovM68hPMbem4+v3ov2d2KU9NUcmGR30dEXETHR6EjxA6OuK8MzKtjhiMAXYG8Hv+bIPai7q X-Received: by 10.55.221.212 with SMTP id u81mr6337188qku.174.1513098144921; Tue, 12 Dec 2017 09:02:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513098144; cv=none; d=google.com; s=arc-20160816; b=ZUb8l7gEeUTGuqxDNj9fP1JSXsF/VOggvZ4fpANwdTghvl5yuaTDXkTDTVFbmQ1tOV t/1zL1STAd4gaydbQ4iybqUp6osDVB0SmLKap7gb5FjY0ovsIuherkjrAmvBDSYPaR26 a8sdKOA70u8bz6QJyXd8GXbb39DczvJ8KKqwp/+0mT9R4S5peO6bsZSJ1o4J7Dv4jbBg hqv1HotqvQDhi5Ex6iUfP4OrtHVkDEQSvORdcIH4kyJJ+PdPNRAaw/DPcx0W/0XjUvLm HrJFtX/g7+o0krxmyUp40USNWlfSaGHZk6JSAOH+Dt+kNylcKtmphd4N1vHOBKwyPjIv lq2Q== 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=oNyegE26vW/w5WbylwG4uBqvUOR1b0cO/nGFB/xQKk8=; b=aKZZtox11B9rx13huMlRxogeT5a/q0dLYhcJlFhfExSv/Fklb7wGxqN1ZthRe4dKvv SGZIajWDDzM3YsZsJX/xHD0lSJz3WeS5AU/PXumwzyL35qiEOWO7r7HVliSTd1egOSHx rxzaBKrc/ej1VQVHZBYjoTD0z4/xHJsWwJ0Pj21Y3AlOfznqaJSa673D2LiDZJbIIqUl BrMUtMk3mTBqshjmnyoExcWEURkeOngX8u9lgOcXRjSiWf+QDX/p4epR+1K4iNrL4+2l 9TVQHEJAz6rh6JQX2pOjPN5uKAQznLThiiwg4DvMuNuvbgVOrCAjQCYuBtp/gWhmv+F9 eLAQ== 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 t30si3313878qtg.464.2017.12.12.09.02.23; Tue, 12 Dec 2017 09:02:24 -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 7C2EE60958; Tue, 12 Dec 2017 17:02:23 +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=-5.4 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 C3D7B608AC; Tue, 12 Dec 2017 17: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 730FD60646; Tue, 12 Dec 2017 17:00:48 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 0151060607 for ; Tue, 12 Dec 2017 17:00:40 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward101p.mail.yandex.net (Yandex) with ESMTP id C684C6A80E0F for ; Tue, 12 Dec 2017 20:00:36 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id S0IIm82B6b-0ajCVSlS; Tue, 12 Dec 2017 20:00:36 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jq56e5t2BB-0asWVjAT; Tue, 12 Dec 2017 20:00:36 +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: Tue, 12 Dec 2017 20:00:19 +0300 Message-Id: <1513098020-19696-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513098020-19696-1-git-send-email-odpbot@yandex.ru> References: <1513098020-19696-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 336 Subject: [lng-odp] [PATCH API-NEXT v2 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: 65d690fbcf03c6a4d5eb3f01bde36807833feaaa ** Merge commit sha: 5837f541514787dbed97ac3478e4967a53a5f9c2 **/ include/odp/api/spec/ipsec.h | 4 ++-- platform/linux-generic/odp_ipsec.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 6f00a2c9c..4d3aeefdc 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -151,9 +151,9 @@ typedef struct odp_ipsec_inbound_config_t { * resulting packet must be parsed (at least) up to this level. Parsing * starts from IP (layer 3). Each successfully transformed packet has * a valid value for L3 offset regardless of the parse configuration. - * Default value is ODP_IPSEC_LAYER_NONE. + * Default value is ODP_PROTO_LAYER_NONE. */ - 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; }