From patchwork Tue Dec 12 12: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: 121512 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4021567qgn; Tue, 12 Dec 2017 04:02:18 -0800 (PST) X-Google-Smtp-Source: ACJfBoul7aT686eCNrLXOgC0OoP4/ZSqSdpWIG5hJ27m3yffCanrJKYOtiEukb3gMUVDlLQTPAih X-Received: by 10.107.201.134 with SMTP id z128mr4773247iof.177.1513080137949; Tue, 12 Dec 2017 04:02:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513080137; cv=none; d=google.com; s=arc-20160816; b=eT0Omfb/Tfc76wkWHxIhSyIfZpirhcWLnUNIYn2RGyTPJX/+cazBcK0eIf8sTkOgwL MJ7SAjzSP1dbJrQqZtGj3ZsCX5TbykiPxF3NzCSxpDCWBxFV3pY4PNyh8eSWmHrhV+Qe 1JxlGtJ2w+6LvjGBlad758qJTk7OIZfla0d1igJi0taAxDLCxlwbA1n+JRnLIs8htJ0E OM2vzh+uU9mfcGjGkxqpPx31dwXbGs/RBbACxAlpfEjQx2KP7p9aRkResP2GZ10BCvxQ yCAKArWzANwoc5voC0ehbV/k81O/h5g7GfPEQKnR1+rc/KYB49TZxEuiiw1wItWBCXN9 MuOg== 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=Uxz99qPNupxgU/iIgR1U4lzagky82CQIt06bMPJQhoA=; b=xbPmXmtgGZ675adsU6k/McDZo5S3rUc5kmpTzSPVUzTmmC90nk3ap8wYTc7Cu2VYLo rAzCToVB5NVoQpPyExms2/EcDQaux+Crvlp/F1S4XdZPK7n+EaorA87PwlImU5Hp0Ri7 rm5Z7Z8hKLdW1hX4iZe13R7x/J2hMqSfLJIWbeqhvL/QOqnmz5APQuKmcxsNWLiOG+tY O7op0JUpLOn5OQ8iV4T9VE2U5k18vX+ITRjrsK0vaRvNiqWf9msuMTz0yjsj8Qf9/hmE ou01SRkCjf1gx8ERWczKNHtBBl6mjyejq0+PG99ro6BQr5GhGquswwcD7wSYmgrF5Bl8 oMFA== 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 184si11645911iov.290.2017.12.12.04.02.01; Tue, 12 Dec 2017 04:02:17 -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 6E34F608A4; Tue, 12 Dec 2017 12:02:01 +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 4F2256084F; Tue, 12 Dec 2017 12:01:51 +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 605D860880; Tue, 12 Dec 2017 12:01:45 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 12B35608E8 for ; Tue, 12 Dec 2017 12:00:21 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 745942D84969 for ; Tue, 12 Dec 2017 15:00:19 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KN8Yvvxvvl-0JNCSgQI; Tue, 12 Dec 2017 15:00:19 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id y1H4nBHl9Y-0I98mKqt; Tue, 12 Dec 2017 15: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 15:00:17 +0300 Message-Id: <1513080017-17733-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513080017-17733-1-git-send-email-odpbot@yandex.ru> References: <1513080017-17733-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 314 Subject: [lng-odp] [PATCH API-NEXT v10 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: 1cf25bb4d02d0f93713aa7ce0881e6a3d6e6846c **/ 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..6f00a2c9c 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 chksums; } odp_ipsec_inbound_config_t;