From patchwork Mon Aug 20 11:00:03 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: 144603 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3830203ljj; Mon, 20 Aug 2018 04:05:45 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzID+BQc+I93wpuACqaRV9X0mhI2zFhKnIGH0/htugLP+vPDmnIy+Rb/toDKaiAjOMa+sHl X-Received: by 2002:ae9:de05:: with SMTP id s5-v6mr39025506qkf.145.1534763145664; Mon, 20 Aug 2018 04:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534763145; cv=none; d=google.com; s=arc-20160816; b=FgMeTn+k+Egnb36RpV5T2hklyL7xKk3BC4Wxj5hSmcuvwH7AtpXReaib01yBIERpDY Z1xXD3FVLF+GHEMhTkTqe02Cm0oTIOgCK43IgzvAuGYx6x5V8iH7tdD2AYwiV3glYpWV dNbq92YxcZzw4br+WbzbRRVsOFkeT/NpUoce5jqmuoAsl0E09dFqG4JmM1IZ74ETHdG8 Jyf/ggo54ZtHVTktlZxM8SsJowaMaHpQj5ZzUXWzHPC5ehnuzJ9CuYnRFQy0F4j21ILV Lez93OEVgUv0cJWMcuni9knvhOeSvx741uByoq8yUD3S+JJGsFiyFDatG4n8kqBzdVdN G5Ig== 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=HFcr253Sy9b13tbkcCPkvuqYGuct7quiqumGApe6+Zg=; b=OSO/ukfRwawuo8k9zNyl5MbC/8zCka1QzDO80gZtbP/6pgw0ak5e0bqK5f/kF18tM5 K4+EZdk1azXw8Qay0ISdVUh/8n86xM4sOoKNsvzh1PrD1Meeef477+lHrhGLXNJnkOyC 4/PcLNmIdKgdD7jbdhUxy4GXKEotPn+sbLrd2sK/eQ0um7hbPSrNCk15TomKSF0SAMXk Cipfwzo0Sa5kko/uvDmKpueeS/3GRmG04B6fHxrrsyFhs6mCo1Ghlto0R9O+aSUrgIJ5 IS1frLGkZmI664deIDhEASnr/+EJhXuJh3aoQsYhKA1kFxQqYotC+ua23Zr54maJ/u+K 0KCA== 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 o65-v6si5402126qkc.269.2018.08.20.04.05.45; Mon, 20 Aug 2018 04:05:45 -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 414EB6860C; Mon, 20 Aug 2018 11:05: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=-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 5BBA860816; Mon, 20 Aug 2018 11:01: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 D54BC68640; Mon, 20 Aug 2018 11:01:32 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 3E6F868610 for ; Mon, 20 Aug 2018 11:00:25 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 879C4428C5 for ; Mon, 20 Aug 2018 14:00:14 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id MJdRLMdX8T-0EpGpE22; Mon, 20 Aug 2018 14:00:14 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id x8w3cLDY5J-0DtiRpKY; Mon, 20 Aug 2018 14:00:13 +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: Mon, 20 Aug 2018 11:00:03 +0000 Message-Id: <1534762808-15588-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534762808-15588-1-git-send-email-odpbot@yandex.ru> References: <1534762808-15588-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 674 Subject: [lng-odp] [PATCH v3 6/11] 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: dc28824415ea510e3ef62e47f7640bf4a8420fde ** Merge commit sha: b482f9618a6edb2a2f2491ee5a7af757eab93b24 **/ 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