From patchwork Tue Jan 23 15:00:19 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: 125530 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1808235ljf; Tue, 23 Jan 2018 07:03:19 -0800 (PST) X-Google-Smtp-Source: AH8x224xJrxhzy6UfSd6oFOPpIwv+O2IJ1JoAcLoCLCRoUtJq8g590dOhXFWozLDjV4q+bjYwhLQ X-Received: by 10.55.191.69 with SMTP id p66mr3965894qkf.315.1516719799512; Tue, 23 Jan 2018 07:03:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516719799; cv=none; d=google.com; s=arc-20160816; b=K4+WMAYo2Zha8sqHyv3aNEIzcovKWxlJSATxsnOqOpDb2fHVNMfNVDR/mUaAA3flfX 20vBJtvkZMsTROROfNVbO9nr5fQWuDwUMskYfdmJ03eMhUNqh99IfRSvNsBpt0W3bqkC ByNWxRFQrGBm2aCi2T4SymyjrotQNxub9a4PN9j8SWmfUMsZzQGvX+htKtTUzdFkYmZ9 JIBTBNqt/A1kIokuciqngrljXXtfHLVYxvbqSvqIj7XtByy4RsvDMq6o4UE1Tpf6BKdR hzaBuF+dpy87MP1Fc9NO+vbQFDDsRB+YZPuyT3d/+Y7joCC0pYAmqYjsJM6ie3laIb9T 00JQ== 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=tO4wAlCwru6InppUbib5YrEVLVui/sf51O95IOZORzo=; b=zaiL4YPjy0jneLJH5/EYGN1QUvThuapE8AWM/VollbSOIZntNY2NsXmt8BMlgzQhQ/ 2MgIQ3qv0W40asn8eZvDEkrqxDWdb041OJ+3yXUuFghb5BtO4FPzxafa8uCTcV3k01vs NcV6IMfqbL7uqXHih5gYdL9kBVnJICVs6u4HbmPXtNLgufwAaGb1l9VubWcMcE5zSy/M uM9AdtK8jL6hAajW0K0WvBBPb8jZL8h4UWR1jL29vTsV7DsnmknZPD8NBwD+2pl+4T2B GBXni+XH37sDI3tr0U6vSwed7uVV7Qp5JoG05v/37IxIozWmOLfS5rXvvGSbX+Cwl3p/ w1YQ== 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 b66si1949753qkd.296.2018.01.23.07.03.19; Tue, 23 Jan 2018 07:03:19 -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 1DED0617CA; Tue, 23 Jan 2018 15:03: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=-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 9264E617CF; Tue, 23 Jan 2018 15:02:07 +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 41811617AF; Tue, 23 Jan 2018 15:01:59 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 551B8617B1 for ; Tue, 23 Jan 2018 15:00:27 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 268D91244112 for ; Tue, 23 Jan 2018 18:00:26 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id BqGdwuUHWH-0QWi1hK7; Tue, 23 Jan 2018 18:00:26 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IwkpSe7BuA-0PdSHDhs; Tue, 23 Jan 2018 18:00:25 +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, 23 Jan 2018 18:00:19 +0300 Message-Id: <1516719624-9914-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> References: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 403 Subject: [lng-odp] [PATCH API-NEXT v2 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: 537da7cd2083945c4673ac0dd7b29beb6825bce7 **/ 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 Tue Jan 23 15:00:20 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: 125531 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1808882ljf; Tue, 23 Jan 2018 07:04:18 -0800 (PST) X-Google-Smtp-Source: AH8x227LGetk+x7Qqz7FUDkfxq4wq3lz2voMrj/Gz/YDMp+6fuf8oyA5/wFfLaZcLHobBv9HWASv X-Received: by 10.200.44.251 with SMTP id 56mr4223818qtx.55.1516719858182; Tue, 23 Jan 2018 07:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516719858; cv=none; d=google.com; s=arc-20160816; b=sqeOc7xr+oljpi7h0m0ZDRcpB2ZCyZk/nHa0vyrzkbkHKELBlsgwzl+eUhrOmoI69i K9ulv0JRQwR5W3UW8eFk5D7Oc4yOgcLGiZbHRqxvBXsrPT05KTdKH8hKM5HvzshlNQws 159zfauYslrPcyu2RAnl4do1llWZaErE7XV12/jQow7OekyN4Z0+eHNy5zR75XbazQ1v 6p5Eh64Qq3nhn1v6xECO03SBdv/jH6nmoC3JQR6QMjUv0gbK/xRHmd1jJqjkKPnPgyz/ q2n1IPf21kAn7LbMAA1ekXIxDpm354iI5yZdH5JqIKe/a2pL7whX0Fox+u57lfoAg7Oa wV4g== 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=p+rHsH1AICGFytEcvL6pijS3vwxnBtWRQuw0uOJgs4g=; b=zzPylsDdX3OWWoxQzRXaXCDvX9cw64MAdOMeCRxI+6s3e9EJPV7fnFGSf6SZhjkdN+ zoeJim4Cw6fNF8d4CT1pnt4ToOlLItQ1/u/Vbh/gpCRwksfNEN9j002fjCpMty5MY3W3 5fzJP24MFEh4JLlNLANBSI/V2O+7JEbNR2gK3jG2weIcgwXisKpTviSjBKu5Hn+3q2a/ SUoGZyzlUtHCdpn1CNt3OxLJrpsmgQAqeq371yLQaH8saxDYGG9uJb62CkYDFInF+BOL nit5WbhlaKs0pWf37ScPOJgkA5sqtFdziuQrjoNYrJHtPlRizg/nV4LJ7UynN5dIgmvb 1mgw== 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 l1si689132qkd.70.2018.01.23.07.04.17; Tue, 23 Jan 2018 07:04:18 -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 C5654617D0; Tue, 23 Jan 2018 15:04:17 +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 F29CE6179A; Tue, 23 Jan 2018 15:02:21 +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 C1625617D2; Tue, 23 Jan 2018 15:02:09 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 0630C617B3 for ; Tue, 23 Jan 2018 15:00:28 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward104j.mail.yandex.net (Yandex) with ESMTP id A273C4363B for ; Tue, 23 Jan 2018 18:00:26 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7Ar60ZYmbD-0QNurlGF; Tue, 23 Jan 2018 18:00:26 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IwkpSe7BuA-0QdGOAMN; Tue, 23 Jan 2018 18: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, 23 Jan 2018 18:00:20 +0300 Message-Id: <1516719624-9914-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> References: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 403 Subject: [lng-odp] [PATCH API-NEXT v2 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: 537da7cd2083945c4673ac0dd7b29beb6825bce7 **/ 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 Tue Jan 23 15:00:21 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: 125534 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1810156ljf; Tue, 23 Jan 2018 07:06:11 -0800 (PST) X-Google-Smtp-Source: AH8x22717p16iwgDP7g0G3XwAFw6BwYPEmbyfDfro+hHRpf/SiPniUO4ZZN+cOuInjnqo4KgNjjS X-Received: by 10.55.186.134 with SMTP id k128mr4072797qkf.23.1516719970850; Tue, 23 Jan 2018 07:06:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516719970; cv=none; d=google.com; s=arc-20160816; b=c+aJ6TsbAO/Jf4IgWHNaKH032PYtKDL1vaw6/788Nx4lAovzuVlFSiHwxSBwEQNN2l B10vbznC1bgJNjblu+Tv5LGCkrLwxOLE12Li6QxGHQVgv+wnv+kdC68jWgt/Jq1qdGim t7LXzI3SDoal/g9AoQ/OvQdK1ONvvmVRR0f2TcrVbn2XgllALP6Zt9CSCB/ikTdjOR1I u30lLrYnruJ8I1r3OuerCs73KLb6g8luUvgqvjvZvFylFsPzX0AXsB0w2E8PWX9drwSF YQqKmdx94R5zqhkBNfPBMRR+aKbxy954AchHQM6RMwlBmX6q4TeTIAi9M9vt/Ywsifr5 qycw== 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=k16Sa6I3eLtBH2P/y+maBpPyFH1JEj07b5HRjFPf6JY=; b=026yEF1lAdv5uPcd9bA7n1la4g6W9rHT2S9Nnky2jpivUuWR8cFPpAjQe90ZzolXq+ 9toXrrc0zrjeBSHV+ERZPAarNHJ9y7P5CqqCdjcDev7SPgvfm6SSOuxYhwuTlucRZhJl OusmrMCb87PLSzcqMFC+UJKvnJ+QfQuWOPGWVvKmbQSssZEGjjfHquHJ9LBpn+dSAKZ/ Fc4FriY87DmIyGpElkxe1/NpE0nyEHL1HMrNFzb4RLv6oZqrU+gBfZ8kRR3k9INKZt4b qfRYxOpY0Jofuk7ayVB95E45ACNJb+6liXw8St102/7O+/m73zI3OEXaj8ZjgEjQh+fA c1iA== 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 q10si468272qtq.425.2018.01.23.07.06.10; Tue, 23 Jan 2018 07:06: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 657C6617C9; Tue, 23 Jan 2018 15:06: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 AA3E4617D3; Tue, 23 Jan 2018 15:02:35 +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 15486617B3; Tue, 23 Jan 2018 15:02:15 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 8C575617C3 for ; Tue, 23 Jan 2018 15:00:28 +0000 (UTC) Received: from mxback11j.mail.yandex.net (mxback11j.mail.yandex.net [IPv6:2a02:6b8:0:1619::84]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 06DCD782955 for ; Tue, 23 Jan 2018 18:00:27 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback11j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yIwH06uIpl-0Qe4tLDI; Tue, 23 Jan 2018 18:00:26 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IwkpSe7BuA-0QdOKoZP; Tue, 23 Jan 2018 18: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, 23 Jan 2018 18:00:21 +0300 Message-Id: <1516719624-9914-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> References: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 403 Subject: [lng-odp] [PATCH API-NEXT v2 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: 537da7cd2083945c4673ac0dd7b29beb6825bce7 **/ 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 Tue Jan 23 15:00:22 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: 125533 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1810010ljf; Tue, 23 Jan 2018 07:05:59 -0800 (PST) X-Google-Smtp-Source: AH8x226aaHnsF4U5PniJSg0/SsuTrpeAhOMqw58KbsjqCKZhMTR26RWfG7EnD2exXN7FuP+m9/Jp X-Received: by 10.200.13.74 with SMTP id r10mr4114168qti.133.1516719959509; Tue, 23 Jan 2018 07:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516719959; cv=none; d=google.com; s=arc-20160816; b=sIyTTRupjUyE8XetfLURMjd31YyI2g1Fzey8Ajo4nMteaOqI63/wVvQxkxebkt+YZd z5VO5o0pqaNJa3c5nViSLQhBAKIbiVlQw5AUNY15qLCtWygukDSflSft2mHv7Q9Sm2k2 PbS4yghRKxyWdZYj9eD7BXsBEl3PkBWfS2RVPb2GSYO4Z9XQOJIkoGWx+2/dUJsyu2g9 24hCW3fmE0mZeiG1vKESPkPcuU5/W3Ku0UP2YpbcMp9wbNB/xkVk2jbYaZwmIl6BaSlQ LaMwuAd/PG8k6UWEAajn+WRvHo3UYlSn42OSsD9fWNGkC5b2hzHhEDGxrmQl13FYWwe9 O8ZQ== 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=6ItK5h8PFzBveJRzI8nynNqwZUzVXqAAl4RnVQo8JEc=; b=wLftoS+tiRNO60Z4Z0XJhh8ux0eeHxLt14eBsiYf3zNQ/fiRhuofyhoSqhCMAe68e0 kipiL1e/ehsRo/2kLilSLOTt32w0S5n3oGez2qjIxm+3kN+s/3Hpcwk0fjBAW1dvTyPG 1KJPAeQ6aVg+1XdJgbIfksABWiiBfkcYRbAJiaGSIjo+BqBwNEZXGF5MbF0PTw3BRX9m kRBK5UEOvrBxQWLdpIibviWSvW9VjmU8jDTQ6HdcY0MgM2GYKoOgtHnxuvtuhK1yN8PM Lb/kIUxSqCnjkB5Rm8NxVARYAyG7TUSaJDnpUyskdwFeZUU6CU/PT52R/NkrERHANmc3 vYmg== 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 j3si3025250qkj.304.2018.01.23.07.05.59; Tue, 23 Jan 2018 07:05:59 -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 12966617AD; Tue, 23 Jan 2018 15:05:59 +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 5A9D1617C9; Tue, 23 Jan 2018 15:02:29 +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 EB36D617A5; Tue, 23 Jan 2018 15:02:14 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 84BCE617BE for ; Tue, 23 Jan 2018 15:00:28 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 8CE765602D04 for ; Tue, 23 Jan 2018 18:00:27 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id AJks6DT7Sk-0RWuxD6m; Tue, 23 Jan 2018 18:00:27 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IwkpSe7BuA-0RdaOZUJ; Tue, 23 Jan 2018 18:00:27 +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, 23 Jan 2018 18:00:22 +0300 Message-Id: <1516719624-9914-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> References: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 403 Subject: [lng-odp] [PATCH API-NEXT v2 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: 537da7cd2083945c4673ac0dd7b29beb6825bce7 **/ include/odp/api/spec/ipsec.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 08533d80d..27ff16691 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1224,16 +1224,22 @@ typedef struct odp_ipsec_status_t { * * The operation does packet transformation according to IPSEC standards (see * 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. + * original IP (or TFC dummy) packets, with IPSEC headers removed and valid + * header field values restored. The amount and content of packet data before + * the IP header is undefined. TFC padding may follow the IP packet payload, + * in which case packet length is larger than protocol headers indicate. + * TFC dummy packets in tunnel mode have both IPv4 and IPv6 flags cleared and + * may contain some (dummy) data. * * 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 Tue Jan 23 15:00:23 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: 125535 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1811131ljf; Tue, 23 Jan 2018 07:07:47 -0800 (PST) X-Google-Smtp-Source: AH8x226fuf2HBkaSZQQI7d9cLz778L82D9MLgQX8iZb9phkXW25gv7m9jjo/+qOy0Gilief8cS1W X-Received: by 10.129.27.12 with SMTP id b12mr2644976ywb.489.1516720067573; Tue, 23 Jan 2018 07:07:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516720067; cv=none; d=google.com; s=arc-20160816; b=Ist1Rwqiiv9kiMeo9wlN2ATdnZF9YtulX6X9RxBpX2c1Y0fTWhjVPJiZtUxGG0tUIF TXJcyeeFzLLq5745JM9kH2C0ZNTwDCbfjnLm3Tnjw4pPbYc/KQZyplcbIu0LOlm88EoO 5X/QrhMNxOuPk6nEq2F5PT7sNk3Y0Va4303R3ktMR43AlE5yDNxuNFQCmS9KQ0Rx3b15 Ddj6mAxRDLGfQqtGE8wlS8mz+ZCSoFXpBsZa7uJslfQGkOHiNIlHsf/mJTqYjw0lgyHb VuVi+TnEim+EyVrJXZVPMS/lPfQMsg1jXMw7+dW8TCTgjuJpN0Ya9Ob+V3q/DbTgyoC3 Niug== 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=atVRCaPXp66BQQAitf+f65ht2l8/tlp/i0yGJYZegs0=; b=0TRBkzb261OX+vXCtfAPUYzjSM+m+LkgvwZL2qgaKhWHaeFW6qz5EWf0VWvx0UgVoD 0LrS0JUujiT412rhAjn4peKI8uvbkIeoSoV0fC+nTepRZRRzpTog2ABLXEHBVsox4dn9 LnkVd8LeLof6hfkcSo43HS/x9HV5a1IFjKdJqQ9n17uyKbJzPPV20a8zOmyLjLQ1lHDy t9Sf1N4cXgAlvbIq2Cf2BoKKaZx1CTrzMgLq3lktClet5XR8xrAcG3YQrrQ/aW32NVCZ lFK6AVa/irk/3DejU5ZSwKr6de8pvxaEqggOmH/5uaP9bAeZ9fQsUUQQUC7iG4g8NYWK cQag== 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 a193si2461782qkg.40.2018.01.23.07.07.47; Tue, 23 Jan 2018 07:07:47 -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 33DF9617D8; Tue, 23 Jan 2018 15:07:47 +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 EAFDF617DF; Tue, 23 Jan 2018 15:02: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 6543B617A5; Tue, 23 Jan 2018 15:02:17 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 9A2836176E for ; Tue, 23 Jan 2018 15:00:29 +0000 (UTC) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 2B6D870388C for ; Tue, 23 Jan 2018 18:00:28 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4R10aCYZkH-0SWWW8H4; Tue, 23 Jan 2018 18:00:28 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IwkpSe7BuA-0Rdqdeg7; Tue, 23 Jan 2018 18:00:27 +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, 23 Jan 2018 18:00:23 +0300 Message-Id: <1516719624-9914-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> References: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 403 Subject: [lng-odp] [PATCH API-NEXT v2 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: 537da7cd2083945c4673ac0dd7b29beb6825bce7 **/ include/odp/api/spec/ipsec.h | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 27ff16691..217447060 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -991,6 +991,21 @@ typedef struct odp_ipsec_out_opt_t { /** Use fragmentation mode option */ uint32_t frag_mode: 1; + /** Use IP parameters option */ + uint32_t ip_param: 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 ignore 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; } flag; /** All flag bits */ @@ -1000,6 +1015,24 @@ typedef struct odp_ipsec_out_opt_t { /** Fragmentation mode */ odp_ipsec_frag_mode_t frag_mode; + /** 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; + }; + + /** TFC padding length + * + * Number of TFC padding bytes added to the packet during IPSEC + * processing. Implementation guarantees that the padding does not + * contain any confidential information. */ + uint32_t tfc_pad_len; + } odp_ipsec_out_opt_t; /** @@ -1297,7 +1330,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 Tue Jan 23 15:00:24 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: 125532 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1809452ljf; Tue, 23 Jan 2018 07:05:08 -0800 (PST) X-Google-Smtp-Source: AH8x226UYcHnIsr8nK48ZvkallhX9tUQqRUr4VyJWgxuSjfMNIU0E/D1it73FyS2WCXG4b7bbSVU X-Received: by 10.129.156.134 with SMTP id t128mr2711120ywg.108.1516719908101; Tue, 23 Jan 2018 07:05:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516719908; cv=none; d=google.com; s=arc-20160816; b=woGFsoF4eD0d7msTYmX2mq9/PA5NQtimnGSrX01WpCbgbF7EXU2BY6f04mx50VjlwM xrczZVIADy2lqlDDox20n561g05pmm7QzkO80HuHiHvoT78C4PI/wbM62NFa8MbHGwQ3 EX3TJhgU8DXZIXQ8aO9rQXquCFv0VVGaGgZbgupC9v9Dhi7Qs6UBAYyoE3Hpmw+VAUN9 ReImgXAp5CBt4bGn6IpUZOCfREmuPHC8+gb9WRBBxLHIdyNhe2jBOA56vFp35xbQjp6w FIb0Wu2BrZzZWrl5xmHxSB8xKIjvJEzxWMccWwHHWN6wIGM1ga5KWltfpyqChYafx92e U6dA== 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=GNCAaqr7XGyUys71GWu8qGZM8Q7xlKWKweR5Ul6jQKA=; b=D2i1hIijfjCiBFrIEbyYN5Ogs/BltJXPfMRhMJQjjnarLBC92uFkSPijMkuMhUr7XK cTJphD1sGayF7zoqIqalxh79QRQ7zY/Q28JKWFkgLcNVPo3JoQdMcna/+c+mG0zzN2+p pPfKyaVyNgsDb/HhY20GDPI/BdqiIUIFaRdlm5QDgcmo5tk33AZFs/oYSWwSpDm4se5G EzmXOcupVUtB60xa5tp2EJC1XmLJcNOTGRhtdY0mEw9mH9Ev7ptRnverFm45ZkCWu6zh rn5mzeXhJv0ZSRIqR8M8OgHDEB7QHjEbcIVgruAqekLr9sT5rKYWuYbPh5/QmFQPknaj Fm8g== 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 d12si4048079qkg.484.2018.01.23.07.05.07; Tue, 23 Jan 2018 07:05:08 -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 CB927617A5; Tue, 23 Jan 2018 15:05:07 +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 22B81617C0; Tue, 23 Jan 2018 15:02:28 +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 5DB58617A5; Tue, 23 Jan 2018 15:02:14 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id EDD62617C0 for ; Tue, 23 Jan 2018 15:00:29 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 9219D4302C47 for ; Tue, 23 Jan 2018 18:00:28 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 867wSBJr2B-0SlKJB5C; Tue, 23 Jan 2018 18:00:28 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IwkpSe7BuA-0Sda881s; Tue, 23 Jan 2018 18:00:28 +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, 23 Jan 2018 18:00:24 +0300 Message-Id: <1516719624-9914-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> References: <1516719624-9914-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 403 Subject: [lng-odp] [PATCH API-NEXT v2 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: 537da7cd2083945c4673ac0dd7b29beb6825bce7 **/ 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 217447060..189d9937a 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.