From patchwork Tue Aug 21 17:00:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 144756 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5519521ljj; Tue, 21 Aug 2018 10:04:35 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzOoA+IOfyHSn+nV7i9JqAr62FRTbluLp72d/LgBTPbQzGqLVRsXziow585nJF4JF3EJvj6 X-Received: by 2002:ac8:758d:: with SMTP id s13-v6mr15367413qtq.161.1534871075277; Tue, 21 Aug 2018 10:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534871075; cv=none; d=google.com; s=arc-20160816; b=Yw2SgdQPOOMiZuHHU72RmcoOH9vK62V8pxysLiTpJxOwSyyonR47M2+9zogM89+yzg oHE08oK3y38dGmVQdpFQVR3EdXu1ZdkDo1ocaf/XpZizfK5DkRSg3DkEXF3Xevqz8sDC 8uWtzy62ztqghJOGleLnh76xwvhsGYsxx3gQR3eBKHcL1lTozT3fAxg2Fvj2w/ymDFVz sxN1B86ulrSPeupY80Scl1MONiz7rhmvOYMVW0roYtUnkMYbpahZ/8JbCo68MRCVsXo7 fFzpMBEmpu8veVnj5RX4snTzp4h8NLeserNXM0473MLBcomR5TahzBaA4aNZ6FGpxwPZ r8JQ== 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=v0Y/Hp8Yk6Y+UChDcxAUkn4YbSJ8I14ru04gFJYRdaI=; b=qIEzwx1SaJh9vFhMwomnbnK9JvpEDZ/kKqnpV/ZGC5FwfNS26k8azCA3mwX46uVxKU 7vcDFOmleftrZheVnkKMHk4YjIiP8Rhwhc1VI1kFybpB4Kl2YVFGARhQi9CPgpLL827A 0i0mJ1qvscqV3IOVtkbNNHlyToLCyg0ZZZDni3gp0vyPS86ZKbedpkQPTFneoiHlKc31 F7GCFGoG12Nm/C+z5//ZAqT1i9t9Nc/B3rOFs38jVzAOeK4ZBIJLlejnUtMDtuJPNE6c oTMRq435bxR01q35AAgsKjhzrV1HQdvLOOAyLbQDbcyMmI1eGSkZaBQbzEOJOV3M0jFi iKxg== 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 w8-v6si5945513qvn.229.2018.08.21.10.04.35; Tue, 21 Aug 2018 10:04:35 -0700 (PDT) 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 E41726860D; Tue, 21 Aug 2018 17:04:34 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 0BB6B64EC2; Tue, 21 Aug 2018 17:02:12 +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 F2C89609AA; Tue, 21 Aug 2018 17:01:54 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 9F5A3608B7 for ; Tue, 21 Aug 2018 17:00:28 +0000 (UTC) Received: from mxback11j.mail.yandex.net (mxback11j.mail.yandex.net [IPv6:2a02:6b8:0:1619::84]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 194A24E81664 for ; Tue, 21 Aug 2018 20:00:27 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback11j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id bk8xUseTta-0Rr4Jp84; Tue, 21 Aug 2018 20:00:27 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id PfJmBMqdLe-0QVmZLSp; Tue, 21 Aug 2018 20:00:26 +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, 21 Aug 2018 17:00:02 +0000 Message-Id: <1534870807-18456-8-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534870807-18456-1-git-send-email-odpbot@yandex.ru> References: <1534870807-18456-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 674 Subject: [lng-odp] [PATCH v6 7/12] linux-gen: add SCTP protocol header 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 674 (lumag:sctp-checksum) ** https://github.com/Linaro/odp/pull/674 ** Patch: https://github.com/Linaro/odp/pull/674.patch ** Base sha: f6c423a7d29e2c7d6d890cbc098a398d0d7e1288 ** Merge commit sha: d4f772b36da26684194cb0452a01b8da1ba7e3e1 **/ platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/protocols/sctp.h | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 platform/linux-generic/include/protocols/sctp.h diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 13101cfdc..80f968756 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -142,6 +142,7 @@ noinst_HEADERS = \ include/protocols/eth.h \ include/protocols/ip.h \ include/protocols/ipsec.h \ + include/protocols/sctp.h \ include/protocols/tcp.h \ include/protocols/thash.h \ include/protocols/udp.h diff --git a/platform/linux-generic/include/protocols/sctp.h b/platform/linux-generic/include/protocols/sctp.h new file mode 100644 index 000000000..dea8a8a6e --- /dev/null +++ b/platform/linux-generic/include/protocols/sctp.h @@ -0,0 +1,49 @@ +/* Copyright (c) 2016-2018, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP SCTP header + */ + +#ifndef ODP_SCTP_H_ +#define ODP_SCTP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** @addtogroup odp_header ODP HEADER + * @{ + */ + +/** SCTP header length */ +#define _ODP_SCTPHDR_LEN 12 + +/** SCTP header */ +typedef struct ODP_PACKED { + odp_u16be_t src_port; /**< Source port */ + odp_u16be_t dst_port; /**< Destination port */ + odp_u32be_t tag; /**< Verification tag */ + odp_u32be_t chksum; /**< SCTP header and data checksum */ +} _odp_sctphdr_t; + +/** @internal Compile time assert */ +ODP_STATIC_ASSERT(sizeof(_odp_sctphdr_t) == _ODP_SCTPHDR_LEN, + "_ODP_SCTPHDR_T__SIZE_ERROR"); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif