From patchwork Tue Aug 21 10:00:01 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: 144701 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5063698ljj; Tue, 21 Aug 2018 03:04:19 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwVlZQ2W13C8SLsik6fQuSCFrxqKeiEwarui5SPSZWqs2qS01QvhJpPM/HWGWWK6V10dxcS X-Received: by 2002:ac8:1e92:: with SMTP id c18-v6mr10460523qtm.2.1534845859784; Tue, 21 Aug 2018 03:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534845859; cv=none; d=google.com; s=arc-20160816; b=Nnu55+es5g0fbFA2s98KubSqHBxpnezRvmnVQrEc2p5JmowhBF+SQtR7+nXjvao3/h tYd0jb3uuDW1aimqhYfEKHXQzukqgZNwQwS71nM1AuRXquaWKkuRmWBw6f6k/g18FhKi Wj10+LQxjZbU6BOcdQmldBcgbgPi5MLswefKDPFx1VZzvSROnJYrHM8o5SQEVrfjjk4p h/jBMbs3M26N/m6ssxxlABCv1jE2EEa0Ryhimxnk4qtVg0++dq+RyhVN4cts+HbtVixt XtmXjdlBu+NF+r5gWfw2QeHLDcC2BoJECNpWvhaGZ5mzfunYatVG21hZJdW/Ee7Oen7z LXfg== 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=PhQPJ2eFwqt30b35DE1Hq06Q6WilG0MX0bLEKQ6iWE8=; b=G10gbSwYtAJvyFHbFh73rTJGYIfqn2456nOsaioWvK99XiHYisykp4RUW+IX58stSz PxV4QDdJoieWcKNPY+VyW1fvsmUkr6dGHWdbLVcTIzzA1uNmMJTzTTdWcEEHwJEkg6NN sVE8N+BhrYQ9V/Mk61uQQOb9LTiHmoOsWo4Q5H13TzQmW5dAieB7w6AYT65IOgn+HaA3 wHOSSZVmo0sdSLiYtdKW7cqPqvY3MPHRwyFGqXE06Tqg+6CAP6QwgDn1KklXC/Y/oBlu pocPAfoKcd7KyrGe3CmUTEcnH1r4f1GAn8jgGg2T9cQWykcvULaf2is7rE6vRy+VTJN5 5CPQ== 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 z18-v6si2993597qka.151.2018.08.21.03.04.19; Tue, 21 Aug 2018 03:04:19 -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 6AAD268632; Tue, 21 Aug 2018 10:04:19 +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, RCVD_IN_MSPIKE_H2 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 298216084A; Tue, 21 Aug 2018 10:01:13 +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 F1DFD60851; Tue, 21 Aug 2018 10:01:01 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 2AC80619AA for ; Tue, 21 Aug 2018 10:00:23 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward101o.mail.yandex.net (Yandex) with ESMTP id C9F7E1344C2F for ; Tue, 21 Aug 2018 13:00:21 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9erBQqdKPU-0LcORAVK; Tue, 21 Aug 2018 13:00:21 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eJZOyRH8Gd-0KoG5lCT; Tue, 21 Aug 2018 13:00:20 +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 10:00:01 +0000 Message-Id: <1534845606-17334-8-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534845606-17334-1-git-send-email-odpbot@yandex.ru> References: <1534845606-17334-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 674 Subject: [lng-odp] [PATCH v5 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: 912e026c108d7a496ac7467e953dea77dadaaa57 ** Merge commit sha: 9ab290c4f721a97e8c289b8a7992e6cc6614e7c3 **/ 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