From patchwork Wed Nov 29 22:00:04 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: 120050 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3600604qgn; Wed, 29 Nov 2017 14:02:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ/rd6H4y9Dfu0SGA7k99fWg7MiuVCl7QL0c3ND/wxn/o+HQDNd4iPRC1u+X2+BGScqe/O5 X-Received: by 10.200.63.51 with SMTP id c48mr542909qtk.200.1511992933862; Wed, 29 Nov 2017 14:02:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511992933; cv=none; d=google.com; s=arc-20160816; b=RP6bx7OpvdQj9azsE20XqUHZZ8ME+0eaM51tkS1lrfWEylD+cXKueirsShLodWRYt5 dlnKiL5K/z+uw/4YuvDAguRZeV++JtbhXmce+6N2DwBVB7CN6BXaZhuXWWAa8v58uUAy XmEjE5Q6jPkWxM4jwiNV8VBsV5toeJjFU/w6efwQt3dW/HIkZCdWg64u9+DF6V0G7XO6 tXqg77MuUdh9MZovkop9NSqIc1i/n8VTOPyNaRc7i2QIqIR+au7BF7gJ8BrMtXtLPxFb YPX3dWuGfTRq8oElcl7pmRuBK16a3zDguzMvr2sf2jrk4PiZDUgX2e2r9C8rPE92NpLH Es4Q== 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=kdwO7dd2dk1TFLAluZXGhLXqceqfi/iT1PRclGqcDPg=; b=yRTCM7wp+YuGY3WHhFTtUYsdZyMtZuzq3j6mZfw2b7DMRltVCH+SkKaQKUikP2xbRY WaQsMkc8K/XVcHRil+uywvtLljNbZuzF8PJ0O5fZ7yaSBkLzOiCHgM70V6TQd027mTsk uVj8K1TtRZ0tlHMvluso3H5Uyz5L+wbeRGlESbINL3fWv4yZARPnN0hgcSJWK9VLcDrl /5llh1NiY7P89pSleMN/7GwkS+u75l3gMVK75+MQ40JlxExPLn9o2PoLZPxlkimzXxj5 QMKBYrmwEVu91xNfZIFr6Ua0Rl/pv/V1xH5nWL0Ib20A1yFdmyFCsrG0tP/LdP9WYlAS QH6g== 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 h184si2806698qkc.426.2017.11.29.14.02.13; Wed, 29 Nov 2017 14:02:13 -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 95B386090A; Wed, 29 Nov 2017 22:02:13 +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 813DB6092E; Wed, 29 Nov 2017 22:00:45 +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 DBB82608F6; Wed, 29 Nov 2017 22:00:15 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 76D9D60902 for ; Wed, 29 Nov 2017 22:00:09 +0000 (UTC) Received: from mxback10j.mail.yandex.net (mxback10j.mail.yandex.net [IPv6:2a02:6b8:0:1619::113]) by forward100p.mail.yandex.net (Yandex) with ESMTP id C5BD95104CB2 for ; Thu, 30 Nov 2017 01:00:07 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback10j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Vo6vn08Nbg-07FSrW8Q; Thu, 30 Nov 2017 01:00:07 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kwbi2qji5t-07OiNIuw; Thu, 30 Nov 2017 01:00:07 +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: Thu, 30 Nov 2017 01:00:04 +0300 Message-Id: <1511992805-23399-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511992805-23399-1-git-send-email-odpbot@yandex.ru> References: <1511992805-23399-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 314 Subject: [lng-odp] [PATCH API-NEXT v1 1/2] api: packet: separate checksum check flags 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 Separate union controlling different checksum checks. It will be used by IPsec API. 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: 4cb02e1caccb9179575e95448fd46979e17d0905 ** Merge commit sha: 9750daf1153b3a13935f26f866bb2a23548e6e16 **/ include/odp/api/spec/packet.h | 46 ++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index b897c9d3c..e04f85f7f 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -1178,6 +1178,31 @@ int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset, * */ +/** + * Flags to control payload checksum checking + */ +typedef union odp_packet_parse_chksum_t { + /** Individual check bits. */ + struct { + /** Check IPv4 header checksum */ + uint32_t ipv4_chksum : 1; + + /** Check UDP checksum */ + uint32_t udp_chksum : 1; + + /** Check TCP checksum */ + uint32_t tcp_chksum : 1; + + /** Check SCTP checksum */ + uint32_t sctp_chksum : 1; + + } check; + + /** All check bits. This can be used to set/clear all flags. */ + uint32_t all_check; + +} odp_packet_parse_chksum_t; + /** * Packet parse parameters */ @@ -1194,26 +1219,7 @@ typedef struct odp_packet_parse_param_t { * layer. Checksum checking status can be queried for each packet with * odp_packet_l3_chksum_status() and odp_packet_l4_chksum_status(). */ - union { - /** Individual check bits. */ - struct { - /** Check IPv4 header checksum */ - uint32_t ipv4_chksum : 1; - - /** Check UDP checksum */ - uint32_t udp_chksum : 1; - - /** Check TCP checksum */ - uint32_t tcp_chksum : 1; - - /** Check SCTP checksum */ - uint32_t sctp_chksum : 1; - - } check; - - /** All check bits. This can be used to set/clear all flags. */ - uint32_t all_check; - }; + odp_packet_parse_chksum_t chksum; } odp_packet_parse_param_t; From patchwork Wed Nov 29 22:00:05 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: 120049 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3600054qgn; Wed, 29 Nov 2017 14:01:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMYVvbdhHb4yttexNMd7OHDHdKM60APChBv7Bwm4aGMf5oj0+qB6UABWvBbZA95Yf1EVanqg X-Received: by 10.237.34.202 with SMTP id q10mr531072qtc.341.1511992905882; Wed, 29 Nov 2017 14:01:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511992905; cv=none; d=google.com; s=arc-20160816; b=Sxnd9/CWkF8e14ZGjGiUu95H41WlveJ0Hk0jBmX2xDa9kZqJCAK9PVyUm9uxhOrdKh sZ6yEcLQNRHFgre2VMD6CrKhhGZ/B3a1vGO2b0KJppyShSLe9qY4KXmPXM2v1pAHV8UB 00lLnVQ1r3qJFmhkJrmVavAKDGBEbANE1cmxTiSsyhBebXK6DFxMTJhuXzan9hO/8QA2 dCM124ZF8SlnHkB4XhAk4SPAOZAbvptgg8dl/4yCkxKnQFzUiWorwzt4lLnoIEcIGoBb 7c3YVIBP9FUNB93NmCQ7PbcyuqZos5AI8Z3d5IGR7k5QB9EygWmhCAGMDbPip6FVyDn2 NC1w== 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=5/f0CkSNnxu3TYFVUfU/ufJzeQ02pV9cELqgZmOflw0=; b=yIuBpq1e4BI8Xc2sTsr1FE35PfBYUk2giznuUcseTu2daWev3gAzdamYsjNX1KpmHx ciOFjV0taGYy29TKiDKc9McMTA51ZCLfiyakl2ru2jDhIOud/ADbL7qMPc7W/n3s0sG5 ZrojV7xYKbrdFML7migVptAFrwfl7/5zWgsvJZji7YNRkbGh7+WH0IBXrKY0YuQXD0Qp 4e1c/a+xdg+eolu36Il7vVE8rsfRqOCnMCAXLNXOBzxdXDagUMvO1sPGUqicSBpi8wGa BHhRIWIy2AtN9CVSlAjEGZ31Il3LWIV5RA9Ine6BYGyTM7DfCRNJTnMQn6Jpa1Axw/eV o0YQ== 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 u2si2800990qtb.40.2017.11.29.14.01.45; Wed, 29 Nov 2017 14:01:45 -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 634CB607AD; Wed, 29 Nov 2017 22:01:45 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 18CAD6091E; Wed, 29 Nov 2017 22:00:41 +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 E94DC60902; Wed, 29 Nov 2017 22:00:15 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id CA73A60903 for ; Wed, 29 Nov 2017 22:00:09 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 71F435607E50 for ; Thu, 30 Nov 2017 01:00:08 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id G9wTA3aRFc-082CneMm; Thu, 30 Nov 2017 01:00:08 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kwbi2qji5t-07OWxW1D; Thu, 30 Nov 2017 01:00:07 +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: Thu, 30 Nov 2017 01:00:05 +0300 Message-Id: <1511992805-23399-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511992805-23399-1-git-send-email-odpbot@yandex.ru> References: <1511992805-23399-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 314 Subject: [lng-odp] [PATCH API-NEXT v1 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: 4cb02e1caccb9179575e95448fd46979e17d0905 ** Merge commit sha: 9750daf1153b3a13935f26f866bb2a23548e6e16 **/ include/odp/api/spec/ipsec.h | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 4a33af8ea..15d7d25ff 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -159,32 +159,7 @@ typedef struct odp_ipsec_inbound_config_t { * level. Checksum checking status can be queried for each packet with * odp_packet_l3_chksum_status() and odp_packet_l4_chksum_status(). */ - 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_packet_parse_chksum_t chksum; } odp_ipsec_inbound_config_t;