From patchwork Thu Jan 25 15:00:13 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: 125863 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1172786ljf; Thu, 25 Jan 2018 07:04:55 -0800 (PST) X-Google-Smtp-Source: AH8x226ylT0mU/1lRFack3GXwUqfj9QH8R5hqoNHzCYFJ1090Zf74V6r4surcFWQrLmG6uOMFD5C X-Received: by 10.129.101.3 with SMTP id z3mr8473853ywb.42.1516892695392; Thu, 25 Jan 2018 07:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516892695; cv=none; d=google.com; s=arc-20160816; b=qs7Oq1o/uhAq0sqdPurdtmIsp2bAwkbPlTU4GPGWQs1BjFXFGminaEfV6xD54f/y8H 86AwsqfhlobW15CTv1qqMFfNjE26jMlk5picd50HoSS1Ffe7s/tt/kXf2XiU0CjnsSnN 8wwhjuYtO52BgkmGo0SlgPd7A238qNpENiHpCOZYqFowNfO8nj8Of8kTtXNzeJAFo8R/ UP/44t1zy5eAR9RWSxWmu/HwOQBvjFRef2tu3W6TxBonIYy1LE/DhCdy7PecFYPCeWnQ sA+/7ml797knOOVwSifnR71d9Wei9SvQwudgnYGleYmV2WgusCl1QP8R93CIIaqspWQu 5rUA== 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=7JU/wbl6f9hcvDpVWIPEbOyid1+54utuEVugmDiG1E0=; b=RNPS1uNBetG+y2FAnZ0qX3pkMUxSGfblYmq390mFJJl8/5ysomZ32VFNA56U2dPaUm kEYYisc5oJINii9rSVyyGbOXNSpqeKl1T1ccx4+t8zAOMT+GRtJLkwvFOyz6Wgf7vpLg 4oQaqfPLcHLh+2tzKYM9WAonhXGHmcMagO7zNy95sD2C3M2diNdX+95Mf0UKDfW21cIg Ym3XD8Q65uLtfNX0P1UjqURHzimQIbM2tv4JQFtSZ61yi78JWnv1cD7BFpdESQ251Ffz 4e153+3ixzImDdL/qiqrwMTTwcUqRBuz/ELPw5zvtX6SfbgVe5vP+oq3oZ6BHSUWfKfd xBZw== 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 m5si3249798ybb.442.2018.01.25.07.04.55; Thu, 25 Jan 2018 07:04:55 -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 B329A61772; Thu, 25 Jan 2018 15:04:54 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 9B09D6177A; Thu, 25 Jan 2018 15:01:04 +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 E644A616F8; Thu, 25 Jan 2018 15:00:34 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id D224A6107F for ; Thu, 25 Jan 2018 15:00:27 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 47B564441545 for ; Thu, 25 Jan 2018 18:00:20 +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 AxXxYFj0qp-0KUSNxbh; Thu, 25 Jan 2018 18:00:20 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id tNrAE6Xzdv-0JDiss86; Thu, 25 Jan 2018 18:00:19 +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, 25 Jan 2018 18:00:13 +0300 Message-Id: <1516892418-5660-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516892418-5660-1-git-send-email-odpbot@yandex.ru> References: <1516892418-5660-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 403 Subject: [lng-odp] [PATCH API-NEXT v3 1/6] api: ipsec: IP header parameter types 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: Petri Savolainen Create IP header parameter types, so that those can be used also outside of SA parameter struct. Signed-off-by: Petri Savolainen --- /** Email created from pull request 403 (psavol:next-ipsec-tfc) ** https://github.com/Linaro/odp/pull/403 ** Patch: https://github.com/Linaro/odp/pull/403.patch ** Base sha: 44974a09b01c79adb9637a5dff38539598a76737 ** Merge commit sha: acecf073764f87bfadb64c598703458d344b39f4 **/ include/odp/api/spec/ipsec.h | 72 ++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 47e3045f3..c78afbe3f 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -382,6 +382,44 @@ typedef struct odp_ipsec_crypto_param_t { } odp_ipsec_crypto_param_t; +/** IPv4 header parameters */ +typedef struct odp_ipsec_ipv4_param_t { + /** IPv4 source address (NETWORK ENDIAN) */ + void *src_addr; + + /** IPv4 destination address (NETWORK ENDIAN) */ + void *dst_addr; + + /** IPv4 Differentiated Services Code Point */ + uint8_t dscp; + + /** IPv4 Don't Fragment bit */ + uint8_t df; + + /** IPv4 Time To Live */ + uint8_t ttl; + +} odp_ipsec_ipv4_param_t; + +/** IPv6 header parameters */ +typedef struct odp_ipsec_ipv6_param_t { + /** IPv6 source address (NETWORK ENDIAN) */ + void *src_addr; + + /** IPv6 destination address (NETWORK ENDIAN) */ + void *dst_addr; + + /** IPv6 flow label */ + uint32_t flabel; + + /** IPv6 Differentiated Services Code Point */ + uint8_t dscp; + + /** IPv6 hop limit */ + uint8_t hlimit; + +} odp_ipsec_ipv6_param_t; + /** * IPSEC tunnel parameters * @@ -397,40 +435,10 @@ typedef struct odp_ipsec_tunnel_param_t { /** Variant mappings for tunnel parameters */ union { /** IPv4 header parameters */ - struct { - /** IPv4 source address (NETWORK ENDIAN) */ - void *src_addr; - - /** IPv4 destination address (NETWORK ENDIAN) */ - void *dst_addr; - - /** IPv4 Differentiated Services Code Point */ - uint8_t dscp; - - /** IPv4 Don't Fragment bit */ - uint8_t df; - - /** IPv4 Time To Live */ - uint8_t ttl; - } ipv4; + odp_ipsec_ipv4_param_t ipv4; /** IPv6 header parameters */ - struct { - /** IPv6 source address (NETWORK ENDIAN) */ - void *src_addr; - - /** IPv6 destination address (NETWORK ENDIAN) */ - void *dst_addr; - - /** IPv6 Differentiated Services Code Point */ - uint8_t dscp; - - /** IPv6 flow label */ - uint32_t flabel; - - /** IPv6 hop limit */ - uint8_t hlimit; - } ipv6; + odp_ipsec_ipv6_param_t ipv6; }; } odp_ipsec_tunnel_param_t;