From patchwork Mon Dec 11 23:00:16 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: 121473 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3391884qgn; Mon, 11 Dec 2017 15:01:28 -0800 (PST) X-Google-Smtp-Source: ACJfBosKH96cNBtm2UZFWGTIGTYqRCBBmnhQb2ZwNwQwRVayBZVTLsaDdyzW2db30MXLAEEBStLa X-Received: by 10.200.27.76 with SMTP id p12mr3118340qtk.310.1513033288693; Mon, 11 Dec 2017 15:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513033288; cv=none; d=google.com; s=arc-20160816; b=YctHgdwsOXHSY5E9QHvnfv/l8vTd7NhlAj+YZgfAOB8PSSIvoQgrFvGOGZfbu00lzW AxQUzTe2hzMALyG5wjzCIaulRqnuXxgT1eVAzdDCmzVm/ql+9k2HyLBsX7T+9qgwQiyN BGfHeT1uTIUDQzWFErxUFPwbLFea724Y+cPwDlN1mso/2JpHBdeaZNGCQ5JFwE9v9uDv A24Rh+r+lJsHlvnvPxtHpuwQOmmgG6WZpyfAxbTpZK9PEfvf1P6T54b1C2XrtqzYASy3 fDHXde0QKMpZ02THSrzWgSWh8UX5QVCwaNWs7iz4IM603mHV2llwIuQgulzUaJrftwGK g3mg== 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=fxWYlGr3UdlEUFSVgyHk4fSyFGpPbQfTWtKYqtBSNNU=; b=cTbOAybh9OIdPQXfSFFqu+2+ID83Uk+G9/7/e4tusg1jfECZXyeqakK16NxLopuSG8 xVU7P5CC+oedTIxDPrJqjiDhflwGBmKSKFWG1UWhPE2Pzzji4UnSR5wHyzzQTkoK+6Ug +/zk99ALREtau9CMSxnC7+lJnvJEbQ2vVg8FMXmXQNvaJ7aVIX/o/G2WOACHwHp1tdoC XrDOvdlSyMWgfDYHI6OVbspX1r/fWHmI74D14UbNkkMWwguiWp5WmlqYZwswqsLcR18w EHIQ4SmB2uMCr/luZGPAS4s+rCKSHflfIK+nMlYvUfLk6+KuPRqLgi05QdyHfN1opD+x nS1A== 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 d190si2697090qkf.150.2017.12.11.15.01.28; Mon, 11 Dec 2017 15:01:28 -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 4DC3160982; Mon, 11 Dec 2017 23:01:28 +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 47A486099C; Mon, 11 Dec 2017 23:00:29 +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 622A86097F; Mon, 11 Dec 2017 23:00:22 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id E2C7560955 for ; Mon, 11 Dec 2017 23:00:20 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 2F2AE4080E09 for ; Tue, 12 Dec 2017 02:00:19 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Vla4Cv2Cww-0Ibi50AG; Tue, 12 Dec 2017 02:00:19 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nXU3MWShLc-0IaelXlp; Tue, 12 Dec 2017 02: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: Tue, 12 Dec 2017 02:00:16 +0300 Message-Id: <1513033216-731-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513033216-731-1-git-send-email-odpbot@yandex.ru> References: <1513033216-731-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 314 Subject: [lng-odp] [PATCH API-NEXT v8 2/2] api: ipsec: reuse checksum checking flags from packet API 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 Reuse odp_packet_parse_chksum_t from packet API to ease passing checksum flags to packet parsing functions. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 314 (lumag:ipsec-chksum) ** https://github.com/Linaro/odp/pull/314 ** Patch: https://github.com/Linaro/odp/pull/314.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 0fe38b26ae32c0f63255268251af6908304afa45 **/ include/odp/api/spec/ipsec.h | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index d57815ed2..4504140d3 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -158,33 +158,9 @@ typedef struct odp_ipsec_inbound_config_t { /** Flags to control IPSEC payload data checks up to the selected parse * level. Checksum checking status can be queried for each packet with * odp_packet_l3_chksum_status() and odp_packet_l4_chksum_status(). + * Default value for all bits is 0 (skip all checksum checks). */ - union { - /** Mapping for individual bits */ - struct { - /** Check IPv4 header checksum in IPSEC payload. - * Default value is 0. */ - uint32_t ipv4_chksum : 1; - - /** Check UDP checksum in IPSEC payload. - * Default value is 0. */ - uint32_t udp_chksum : 1; - - /** Check TCP checksum in IPSEC payload. - * Default value is 0. */ - uint32_t tcp_chksum : 1; - - /** Check SCTP checksum in IPSEC payload. - * Default value is 0. */ - uint32_t sctp_chksum : 1; - } check; - - /** All bits of the bit field structure - * - * This field can be used to set/clear all flags, or bitwise - * operations over the entire structure. */ - uint32_t all_check; - }; + odp_proto_chksums_t check; } odp_ipsec_inbound_config_t;