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; From patchwork Thu Jan 25 15:00:14 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: 125864 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1173696ljf; Thu, 25 Jan 2018 07:06:14 -0800 (PST) X-Google-Smtp-Source: AH8x224zHPXL2jpIpgNHy8W7BYMt8+Lo8cgctd3sk9PpGSCZf4X6ZvH8GX67HjFqt02HiUEXLO5Q X-Received: by 10.55.10.7 with SMTP id 7mr14840155qkk.353.1516892774015; Thu, 25 Jan 2018 07:06:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516892774; cv=none; d=google.com; s=arc-20160816; b=UOI1gYYkyJZYkAwFNztgEVBJSnirlVMVdoAuMd/rvZMV5FJkgLtmq3AHJ6g0sQPKRG 0jjB11OG9VK+ibVPtGpK61bg5GDD1pTYL4STI9ZTwBO3xTnFMnBvKohfbVZuDzmv6Utl XGl1Nta3sgxZYquPKMf3y7KcMmmZKeRLioZaifeqG6HBE64DBuWOENm8huAZrrXtfW1R B0DvLGt7M/2h+zRu+6sQJAxCqvJFmfv4O4xk+WDXuDvgROAv2Cz8jaZumzbfowMzxsum tdbKxWOP7cLE0QTO/UThKPPqqu7EAiTsHA5R9LIz2Ti0S6uKnzg8HNuaXlR+LoZ8aZg5 kwrg== 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=KlSUP3HC2/71mti3LEiJnSApXZv162GwAH75RG79KF8=; b=Hio3UQeVzLVzeFI4/he2BBrNkvub723yJzjmw3Ys6fmoOTaus1uMl7+0hTw4QxWW6a 0U0CFifiSytxRjcFvY3cQFh2PezWQxjHY8Ql+KFuW/YB3plSwmL6kd6Rsisy/9cbegLZ 2wvdwCcgEO6uHezJalbXCMQvinPI9D6zGvjrmdAKJ7rg9GCsOMunLLZ3kLBvTtAhsew4 YcL/4o2cYS2Ejh188eY8P798qIppYv9VGdlmdrPlqs6L6YKQc0YdjMEc+loIytZ6fVd6 WixplhjJBXqplaQTljvQiVG9cxx5JerM2Zw1UJdAk9BCKiJbOT//quLbAra1Y8+dAB/a O1+g== 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 l21si5543353qtf.316.2018.01.25.07.06.13; Thu, 25 Jan 2018 07:06: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 9FA9361774; Thu, 25 Jan 2018 15:06: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=-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 F1D6761787; Thu, 25 Jan 2018 15:03:56 +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 DE92461774; Thu, 25 Jan 2018 15:03:51 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 0EB1B61796 for ; Thu, 25 Jan 2018 15:01:47 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward101o.mail.yandex.net (Yandex) with ESMTP id E09CD1341829 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 mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ZT0xRLw9pg-0K7eOQZI; Thu, 25 Jan 2018 18:00:20 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id tNrAE6Xzdv-0KDqiltf; Thu, 25 Jan 2018 18: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: Thu, 25 Jan 2018 18:00:14 +0300 Message-Id: <1516892418-5660-3-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 2/6] api: ipsec: rename fragmentation mode option 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 Rename outbound operation fragmentation options to frag_mode. Frag_mode is used elsewhere in the API and "mode" is too generic term for it (not future proof). 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 | 2 +- platform/linux-generic/odp_ipsec.c | 2 +- test/validation/api/ipsec/ipsec_test_out.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index c78afbe3f..1060a3ee2 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -984,7 +984,7 @@ typedef struct odp_ipsec_op_flag_t { */ typedef struct odp_ipsec_out_opt_t { /** Fragmentation mode */ - odp_ipsec_frag_mode_t mode; + odp_ipsec_frag_mode_t frag_mode; } odp_ipsec_out_opt_t; diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index b6192377e..9f08b228c 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -1306,7 +1306,7 @@ static ipsec_sa_t *ipsec_out_single(odp_packet_t pkt, ipsec_sa = _odp_ipsec_sa_use(sa); ODP_ASSERT(NULL != ipsec_sa); - if ((opt && opt->mode == ODP_IPSEC_FRAG_CHECK) || + if ((opt && opt->frag_mode == ODP_IPSEC_FRAG_CHECK) || (!opt && ipsec_sa->out.frag_mode == ODP_IPSEC_FRAG_CHECK)) mtu = ipsec_sa->out.mtu; else diff --git a/test/validation/api/ipsec/ipsec_test_out.c b/test/validation/api/ipsec/ipsec_test_out.c index 971fbbf8d..4940efa5a 100644 --- a/test/validation/api/ipsec/ipsec_test_out.c +++ b/test/validation/api/ipsec/ipsec_test_out.c @@ -530,7 +530,7 @@ static void test_out_ipv4_ah_sha256_frag_check(void) ipsec_test_part test2 = { .pkt_in = &pkt_ipv4_icmp_0, .num_opt = 1, - .opt = { .mode = ODP_IPSEC_FRAG_DISABLED, }, + .opt = { .frag_mode = ODP_IPSEC_FRAG_DISABLED, }, .out_pkt = 1, .out = { { .status.warn.all = 0, @@ -623,7 +623,7 @@ static void test_out_ipv4_esp_null_sha256_frag_check(void) ipsec_test_part test2 = { .pkt_in = &pkt_ipv4_icmp_0, .num_opt = 1, - .opt = { .mode = ODP_IPSEC_FRAG_DISABLED, }, + .opt = { .frag_mode = ODP_IPSEC_FRAG_DISABLED, }, .out_pkt = 1, .out = { { .status.warn.all = 0, From patchwork Thu Jan 25 15:00:15 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: 125859 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1170051ljf; Thu, 25 Jan 2018 07:01:41 -0800 (PST) X-Google-Smtp-Source: AH8x225HOTAlob71TCUgeFMeM3MdnlIPJEKo3OBLT5Y2kO3tZAxolWKSp2cWhKHxNT3sS/WYDuaH X-Received: by 10.129.52.142 with SMTP id b136mr8522856ywa.135.1516892501596; Thu, 25 Jan 2018 07:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516892501; cv=none; d=google.com; s=arc-20160816; b=ZjpoeTC5oAkeM0eogkvYJJ+2cKiGIrpQWRGOvWTWngHf3TVHzIYXa87KGU/YZpn216 uSjVDvs+Y2y+a4uy13s8bVpzp2tTnxUKVVlaYNmNYE7Igh2d0SWj9UL+tGvJZiqYBETP 2c/nfacElaFVyTRmaIyTkoVwYO6Yd+AHDP+G/SNQCMGMiovlQnc71RfXO/KL93vEpSJu lGgZpOXrkSNZFsl+yaR+otANdPEhzmQqORqHBV6H87M7Imdx+4lz3yqtPBdGqxHMjg38 4zi46OCFClo05M/++UiDy3xOkeb0D8RWQKy4FiXzJlR37wNG5aj9Gw31HmSYelBrwdPj ODrQ== 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=aCvtDkUGTOa9jTN9f9Yi1aOeo1fBbHgcHCV6ixWXQOI=; b=kp03h/yiui6uvK7wcpj9oU8wu522FpIZ7lyJesHHDDt52PGBoHG1c94A2Se8LKCjl8 3ZWzlSXewHM60/Ec/tdjouvlB7RWKsXsnRby7WEYq02omXyGGn0PmsMUBZaK01HMACBW G9ENiZLVZAPRBGpOr6ZS65wj6cJFRnses+XUGMv8/1BRu6R71s/6MbvS8B8MKv1mW5op wRml+TpiVRp3zwV5mpbPpPD3VzkIf9fBmMFvFJR11qqDLALnsIWfd2KnWNaKjxHk8TJ5 HAK/ix+q7wIN/0dSTERg7fkWMb8Kx3NQX/bjcDIY1g815uKaTEjgwrK71a9gLnBo8ql+ 8jAw== 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 j140si3271849ybj.238.2018.01.25.07.01.41; Thu, 25 Jan 2018 07:01:41 -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 335436179C; Thu, 25 Jan 2018 15:01:41 +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 4730F616F4; Thu, 25 Jan 2018 15:00:36 +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 810A0616F8; Thu, 25 Jan 2018 15:00:27 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 2FE186107F for ; Thu, 25 Jan 2018 15:00:23 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward101p.mail.yandex.net (Yandex) with ESMTP id B64666A81B39 for ; Thu, 25 Jan 2018 18:00:21 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id oB7eNquC6e-0LgmK7ex; Thu, 25 Jan 2018 18:00:21 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id tNrAE6Xzdv-0KDW2DlN; Thu, 25 Jan 2018 18: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: Thu, 25 Jan 2018 18:00:15 +0300 Message-Id: <1516892418-5660-4-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 3/6] api: ipsec: outbound operation option 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: Petri Savolainen Add flags to select which options application uses. Currently, there's no ambiguity, but as soon as there are multiple options implementation needs to know which options are used and which are ignored. 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 1060a3ee2..08533d80d 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -983,6 +983,20 @@ typedef struct odp_ipsec_op_flag_t { * These may be used to override some SA level options */ typedef struct odp_ipsec_out_opt_t { + /** Union of all flag bits */ + union { + /** Option flags. Set flag for those options that are + * used, all other options are ignored. */ + struct { + /** Use fragmentation mode option */ + uint32_t frag_mode: 1; + + } flag; + + /** All flag bits */ + uint32_t all_flags; + }; + /** Fragmentation mode */ odp_ipsec_frag_mode_t frag_mode; From patchwork Thu Jan 25 15:00:16 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: 125860 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1170858ljf; Thu, 25 Jan 2018 07:02:34 -0800 (PST) X-Google-Smtp-Source: AH8x2248fCbLxIV8auJXsEKt/ZnkvGj6ylqo8oyryLK7NynwV0N3DILCDouiEmuumfTSKwedRmch X-Received: by 10.13.236.206 with SMTP id v197mr8531433ywe.492.1516892554160; Thu, 25 Jan 2018 07:02:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516892554; cv=none; d=google.com; s=arc-20160816; b=E8EFEQ5aOL7XqTPeKi9Ct6E74nrze94EJnPkKFNal/wp0N7o0TYKK9WetFrb35ts0M SbpuC51q2L0pd65eE6J4Pu+orj772/ATs+7lhs+Tfx4eeWB+zDuNva27/DhilzOViNkE 6ucICUyDSp4AFreOStIKzhLtDouXF/GomUaI9QU1whI2UZVqUtd7CD4/iYvJm0qjfFmE La6Uk8znfnrnVXcF+euKAPyctEm2gQNBo3T/KeLGXGfsFio+Yihcr3IR6/3NgGrCctCd mCtVKcWQJ8hYm2mlhRNL0WAgAQvOp800Uns3c63K6tNSFvuFNy1MBsmgpSW9nCNoOCfq RUig== 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=Oi7ZSEQBzTWMyArjzey6kIggceF8fTgu9IoaTu5y0GY=; b=KBqOqHXZ1bwznbHhsvsRHzpry3TfRjaZdlmu288hs45Q//7yhcjYxIFkTfKQ+C3pA/ N1ezETcuDK/wJkETjfXC6cJ64ZGDh/7FChDznTDhy0hhqjJCX0xlYhuoDBu67aJ1hSSm FZMu4t4ZRlKEIAJHAOOxRxCTxGW+BCiEx81k3LfwmmBbe22ur47+dYglkzPbqCJXmj/O tAMLYjUPciUoWm/vT+pCyqaNfe9tC0KcaRoXgY+9STq73QGnmQsaxIXZFVb2Xgek87gR XwiMmZLee7Z2iB6EhlihELx6INKP1R++/EyWJW12rMtpgOZJT+RV3tLhQytfvA8h1yrd e3XA== 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 k6si495399ywd.543.2018.01.25.07.02.33; Thu, 25 Jan 2018 07:02:34 -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 BAF52616F8; Thu, 25 Jan 2018 15:02:33 +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 9470861502; Thu, 25 Jan 2018 15:00:43 +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 84FA66107F; Thu, 25 Jan 2018 15:00:27 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id C71A661502 for ; Thu, 25 Jan 2018 15:00:23 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 54C6643050FD for ; Thu, 25 Jan 2018 18:00:22 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Q4xFgGJVup-0Mqq7cYQ; Thu, 25 Jan 2018 18:00:22 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id tNrAE6Xzdv-0LDGhHqg; Thu, 25 Jan 2018 18:00:21 +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:16 +0300 Message-Id: <1516892418-5660-5-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 4/6] api: ipsec: inbound TFC padding and dummy packets 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 Specify how application can recognize TFC padding and dummy packets at input. Packet metadata flags for IPv4 and IPv6 indicate if the original packet was an IP or a TFC dummy packet. When packet length is larger than protocol fields indicate, some TFC padding remain in the packet. 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 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 08533d80d..e88f46e90 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1226,14 +1226,21 @@ typedef struct odp_ipsec_status_t { * e.g. RFC 4302 and 4303). Resulting packets are well formed, reconstructed * original IP packets, with IPSEC headers removed and valid header field values * restored. The amount and content of packet data before the IP header is - * undefined. + * undefined. Some amount of TFC padding may follow the IP packet payload, + * in which case packet length is larger than protocol headers indicate. + * In tunnel mode, a TFC dummy packet have both IPv4 and IPv6 flags cleared, and + * the packet may contain some (dummy) data. Furthermore, inline IPSEC + * processing may drop dummy packets. * * Each successfully transformed packet has a valid value for these metadata * regardless of the inner packet parse configuration * (odp_ipsec_inbound_config_t): - * - L3 offset: Offset to the first byte of the (outmost) IP header - * - pktio: For inline IPSEC processed packets, original packet input - * interface + * - l3_offset: Offset to the first byte of the original IP packet. The value + * is implementation specific for tunnel mode TFC dummy packets. + * - has_ipv4/6: Specifies if the original packet is IPv4 or IPv6. For tunnel + * mode TFC dummy packets neither flag is set. + * - pktio: For inline IPSEC processed packets, original packet input + * interface * * Other metadata for parse results and error checks depend on configuration * (selected parse and error check levels). From patchwork Thu Jan 25 15:00:17 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: 125862 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1172174ljf; Thu, 25 Jan 2018 07:04:10 -0800 (PST) X-Google-Smtp-Source: AH8x22435T8oOsN/9adLoehWwEeLbKXBkNSBBpzh9rkS92dq/rbb/0KCOs3UIRe35eFiS2sXYVBs X-Received: by 10.129.116.8 with SMTP id p8mr8800148ywc.386.1516892650705; Thu, 25 Jan 2018 07:04:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516892650; cv=none; d=google.com; s=arc-20160816; b=LqdObMrJzQRP0nheXiGWL9aP3T+jvaTVrsIL0dOQnvcUuATWBDR5SQbhR+mMU2SNGN l1O+zTxd/yqZj5Vv9WS4OjVNfE7QGovoRKHk9FJkQ6v8Fyl87ryVmX9CBOZjR0Nywqwy Ui2g+q+o7BUnl7CW2LcV6J4GFmnWOBG4uXopI6StfeP94p0o2gspw3i0/mLz8hU2DQgF o1BIak1ORd9axY8MzE8mBqfZBk3WY2QmXT2BW5dyEDD10B61WLywetEs9qjpHeftAF8V JC8VKjWcnHpmE2WSrkWjFpedsBZ+zsMp16zQyfRYbhpqf9vp5qZcBxErRH/qH4dXdYxg xLwQ== 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=/BqFVrmU+t1u2u5ccSlOMoneVnxKTSBCLi/IgKHxX+I=; b=Hpnk++tyMXSZnfRFhuSlL30pX46uWqy+EMy0LOqwl+3fecDi0WLgjtfzvX/EcGW0TD 5S/mU+4yOaNGeRkOmrfulgp3I8j8+h/LEMNg75V89QbNsQ29iz5gV+DkY0H9BkgdvcQd LXHz5iq1DA/ZBP+whGHGeFyqqCrYgqE4FcyhXzEYpGCbLdghBwtIOnpCkKNeVEmmt4JH /JkcPds777Xv620wI33WZ/L9qBZ1argVqBRLh6PGVAfH+q7x3V0sGcBZH86OT8JHVp8/ e5t6HrxfYxAWHfrSDAVbvnd+xrE88OLPOz8qHh9CvZDmqjDh2vsTCD5wyLib4iakFQnS 05fw== 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 a8si3206889ybl.62.2018.01.25.07.04.10; Thu, 25 Jan 2018 07:04:10 -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 4833F61785; Thu, 25 Jan 2018 15:04:10 +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_H3, RCVD_IN_MSPIKE_WL 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 4C78E6176D; Thu, 25 Jan 2018 15:01:00 +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 06BA861518; Thu, 25 Jan 2018 15:00:28 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 9EB7C6068C for ; Thu, 25 Jan 2018 15:00:24 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward103j.mail.yandex.net (Yandex) with ESMTP id C4C3434C1C9B for ; Thu, 25 Jan 2018 18:00:22 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0tTEGE0xJa-0MfKITOZ; Thu, 25 Jan 2018 18:00:22 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id tNrAE6Xzdv-0MDWUdQJ; Thu, 25 Jan 2018 18:00:22 +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:17 +0300 Message-Id: <1516892418-5660-6-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 5/6] api: ipsec: outbound TFC padding and dummy packets 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 Specify how application can request TFC padding and dummy packet creation at output. Application can use odp_ipsec_out_opt_t options to reguest addition of TFC padding, or creation of a TFC dummy packet (next header = 59). IP parameter override options are needed for tunnel mode dummy packet creation as there's no IP header to copy e.g. DSCP or flow label values to tunnel IP header. 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 | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index e88f46e90..d1cbfe352 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -991,6 +991,22 @@ typedef struct odp_ipsec_out_opt_t { /** Use fragmentation mode option */ uint32_t frag_mode: 1; + /** Use TFC padding length option */ + uint32_t tfc_pad: 1; + + /** Tunnel mode TFC dummy packet. This can be used only + * in tunnel mode. When the flag is set, packet length + * and content is ignored and instead a TFC dummy + * packet is created during IPSEC operation. The dummy + * packet length is defined by 'tfc_pad_len' option. + * If the SA is configured to copy IP header fields + * from inner IP packet, those fields must be passed + * with IP parameters option. */ + uint32_t tfc_dummy: 1; + + /** Use IP parameters option */ + uint32_t ip_param: 1; + } flag; /** All flag bits */ @@ -1000,6 +1016,26 @@ typedef struct odp_ipsec_out_opt_t { /** Fragmentation mode */ odp_ipsec_frag_mode_t frag_mode; + /** TFC padding length + * + * Number of TFC padding bytes added to the packet during IPSEC + * processing. Resulting packet should not exceed the maximum packet + * length of the pool, otherwise IPSEC operation may fail. + * Implementation guarantees that the padding does not contain any + * confidential information. */ + uint32_t tfc_pad_len; + + /** Union of IP parameters */ + union { + /** Override IPv4 parameters in outer header creation. + * IP addresses are ignored. */ + odp_ipsec_ipv4_param_t ipv4; + + /** Override IPv6 parameters in outer header creation. + * IP addresses are ignored. */ + odp_ipsec_ipv6_param_t ipv6; + }; + } odp_ipsec_out_opt_t; /** @@ -1298,7 +1334,13 @@ int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, * The operation does packet transformation according to IPSEC standards (see * e.g. RFC 4302 and 4303). Resulting packets are well formed IP packets * with IPSEC, etc headers constructed according to the standards. The amount - * and content of packet data before the IP header is undefined. + * and content of packet data before the IP header is undefined. Use outbound + * operation parameters to specify the amount of TFC padding appended to + * the packet during IPSEC transformation. Options can be used also to create + * TFC dummy packets. Packet data content is ignored in tunnel mode TFC dummy + * packet creation as tfc_pad_len option defines solely the packet length. + * In all other cases, payload length for the IPSEC transformation is specified + * by odp_packet_len() minus odp_packet_l3_offset() plus tfc_pad_len option. * * Each successfully transformed packet has a valid value for these metadata: * - L3 offset: Offset to the first byte of the (outmost) IP header From patchwork Thu Jan 25 15:00:18 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: 125861 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1171624ljf; Thu, 25 Jan 2018 07:03:27 -0800 (PST) X-Google-Smtp-Source: AH8x2259WMBoVcNNRWE8UMJOhFbH7ClGBYJiUszwY5kMi2KbVmQlDe2FKeWj/VnYmgf4KlKGgzZy X-Received: by 10.13.209.5 with SMTP id t5mr8402378ywd.277.1516892607573; Thu, 25 Jan 2018 07:03:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516892607; cv=none; d=google.com; s=arc-20160816; b=QHfefgr31d6FCEDs4KFLknz7j25GZvOEm1har8Ld7MUzBBJZa8mls4vO6OWBEn+Tdq NhyTum+Zjm4Bfv+CYX/gX20QWLb9ElmwRJAnHY2uoqNZ55ZdJbWZKRnQPYLlU/knlBcg FovsTMNVjcR7ajuMWefGAnvJ5GQBFstxFHcdTOQhOnqSUYrQm3jGP2uIeHCzTRQS0ALH aoYO0stqOj7BKuOZuqLeALNOL+SYXxtOiDzWfQu3xMkuiR14s+/87ysNphGfTHgsZ5bj JmetAHteVwx3yfFxzf+QD8hCSKqmkq/vWZgoIIpu3JjbyqEzm8EWp6qZt/AYAukNqTaR 5bRQ== 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=tngtso7+qnKCg6xNShGEY7559mV8Vo0FZbxa35IUbsQ=; b=bJXW4X6/kTwZmISCLBB+e5pQUCBrJZjheTQGiTQsjQULxTbdDlmjPxrGOMHoixz/4c nCsZYoDdWmkam+XKkwtO+cp6aDx1gAxfJWFCAmgAIkzzH35CeWdqsafWzqP7AGznmrtf 09qd8c9xjoZn1pDyd+CprKXMYuJeORgNFZV6TYLGYs3zBAtpu8F01aC1bwxxWOikxvLa kkfzOdQqsT6z3JH/ydiFzxoMzrw1IklzEzmO3mZwgh8e+xTMVXkRfIn3rFhq6/SAQIPO QNTBlAKCrYClX5EVj6wc127oU7GPbZu+qXhWaZrPd45PnenP/JO1RGowGQ8sQfkk4uMk ydxg== 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 n136si86468ybf.94.2018.01.25.07.03.27; Thu, 25 Jan 2018 07:03:27 -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 34D17617AA; Thu, 25 Jan 2018 15:03:27 +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 00BF86176F; Thu, 25 Jan 2018 15:00:55 +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 C9BB4616E9; Thu, 25 Jan 2018 15:00:27 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id CD05261518 for ; Thu, 25 Jan 2018 15:00:24 +0000 (UTC) Received: from mxback1o.mail.yandex.net (mxback1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1b]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 2F5985D81A6A for ; Thu, 25 Jan 2018 18:00:23 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback1o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yPuAHlMQWH-0Ni8FSog; Thu, 25 Jan 2018 18:00:23 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id tNrAE6Xzdv-0MDuedNH; Thu, 25 Jan 2018 18:00:22 +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:18 +0300 Message-Id: <1516892418-5660-7-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 6/6] api: ipsec: inbound inner packet checksum capability 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 Add inbound inner packet checksum check capability. When e.g. L4 checksum checking is not implemented in HW, it may be better to leave checking for application, as it would check only those packets that need the check. 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index d1cbfe352..c28d888ac 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -238,6 +238,11 @@ typedef struct odp_ipsec_capability_t { */ odp_support_t retain_header; + /** + * Inner packet checksum check offload support in inbound direction. + */ + odp_proto_chksums_t chksums_in; + /** Maximum number of different destination CoSes in classification * pipelining. The same CoS may be used for many SAs. This is equal or * less than 'max_cos' capability in classifier API.