From patchwork Sat Jan 20 21: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: 125253 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp429130ljf; Sat, 20 Jan 2018 13:00:59 -0800 (PST) X-Google-Smtp-Source: AH8x224CGKH0rm17852ZFA6aOYRNc9Lj5CtIfDD4zOUQqg4QMh4sE2q5n7+YeDMVHIDys7l2SQC5 X-Received: by 10.55.93.71 with SMTP id r68mr3758031qkb.200.1516482059727; Sat, 20 Jan 2018 13:00:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516482059; cv=none; d=google.com; s=arc-20160816; b=RVbUt0LZEl0NgB8eJzzWNLkvEdjBEYrIb9A22bCA0B1mhwHK0kfHmKos9L0o9UANe/ GwOzz8lktwIOWzzOPI1qXbQrmys7MKv0JpCL2ootws0ahSt0WDqH7PcSYByDoVP+onTy 8dyOYldYVrgNKJLq6oy5dLqdCe22UdwNkQr0z/CRKMYZO8Kc0+KBwLA4PKq4L0rCHLIj zueHCbLuWg+vf1ott10+Vxef+ZykVLpqnjuVA/9URITfjsCeH1S1tvXOcAVjE6R61LkH MWP0vDKann7uKoDfMPUW8EsmXwbM4449DTSc7dqW5wHNEQ3sKESZ7KaZlp3YCcHLDn0h +GXQ== 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=om1f4YapnVsyQXVlT8dN++noydxD2KGOWEnd/zFRew4=; b=F6VQ8tBXN/Rplnzzdtm19jQLNsBRv0hlvBacijyCOsqfYICeajl5sgTBfF1sHm+vYd kkO9TDL9u2fxdEc99enAbFXudtNyR4+Zp+Lto+yeSYDc7hMx/FXVtH/bP5ipFVB+BzLq 1Sf7TmvA3MtScSuBMG2phh+FfiVahdP1f0XcyShiC5TL0i/W8H7cjmzXcwuYuFo53u57 KthppfJdX1KtOytYtae7HI1bd/Nf4Cu3rKZQgtb4jXV7zNsOdj5u5w8ZgAxG2Ecae+fM vmDxe3uJHNmSK4hMmRHVLG0HIx1Owe5/zmRw/d5/UqkEJKglb6ZBrhswq2KYHQlV/Y5z +gJA== 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 m32si1089547qtk.187.2018.01.20.13.00.59; Sat, 20 Jan 2018 13:00: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 7001C617E4; Sat, 20 Jan 2018 21:00: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_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 1E158617DC; Sat, 20 Jan 2018 21:00:27 +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 52C7A617D8; Sat, 20 Jan 2018 21:00:23 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id A648A617D1 for ; Sat, 20 Jan 2018 21:00:21 +0000 (UTC) Received: from mxback8g.mail.yandex.net (mxback8g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:169]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 2014B7023E4 for ; Sun, 21 Jan 2018 00:00:20 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback8g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ecr5k1cSRz-0JtClIbf; Sun, 21 Jan 2018 00:00:20 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bEElhWMEgr-0JmekBFh; Sun, 21 Jan 2018 00: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: Sun, 21 Jan 2018 00:00:17 +0300 Message-Id: <1516482018-22768-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516482018-22768-1-git-send-email-odpbot@yandex.ru> References: <1516482018-22768-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 329 Subject: [lng-odp] [PATCH API-NEXT v10 1/2] api: ipsec: document TFC padding usage 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 It is possible to include TFC padding into ESP packets. Document usage of such padding according to RFC. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 329 (lumag:ipsec-tfc) ** https://github.com/Linaro/odp/pull/329 ** Patch: https://github.com/Linaro/odp/pull/329.patch ** Base sha: f925f103c90591776f73863d30159357b08bf71e ** Merge commit sha: f88ee0ea868ba087f98e7c1a8c9d3e3e85d3a4c9 **/ include/odp/api/spec/ipsec.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 8556ab28c..892a6281d 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1206,6 +1206,13 @@ typedef struct odp_ipsec_status_t { * restored. The amount and content of packet data before the IP header is * undefined. * + * Additional TFC padding might be present after packet contents. ODP + * packet will extend beyond the end of the IP packet it contains or the + * resulting IP packet will extend beyond the end of the IP payload protocol + * (for tunnel or transport cases respectively). An ODP application can detect + * and remove such padding by inspecting the length fields of the relevant + * protocol headers in the result packet. + * * Each successfully transformed packet has a valid value for these metadata * regardless of the inner packet parse configuration * (odp_ipsec_inbound_config_t): @@ -1258,9 +1265,11 @@ int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, * - L3 offset: Offset to the first byte of the (outmost) IP header * - L4 offset: Offset to the L4 header if L4 checksum offload is requested * - * Additionally, input IP packet length (odp_packet_len() minus - * odp_packet_l3_offset()) must match values in protocol headers. Otherwise - * results are undefined. + * Additionally, input L3 packet length (odp_packet_len() minus + * odp_packet_l3_offset()) must not be smaller than the IP packet lenght + * indicated by the IP header. Otherwise results are undefined. If the input L3 + * packet length is bigger than the IP packet length, the additional packet + * data is used as TFC padding. * * Packets are processed in the input order. Packet order is maintained from * input 'pkt' array to output 'pkt' array. Packet order is not guaranteed @@ -1271,6 +1280,9 @@ int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, * with IPSEC, etc headers constructed according to the standards. The amount * and content of packet data before the IP header is undefined. * + * Additional TFC padding might be present after packet payload. Such padding + * should be filled by application before submitting packet to ODP. + * * 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 Sat Jan 20 21: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: 125254 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp429348ljf; Sat, 20 Jan 2018 13:01:33 -0800 (PST) X-Google-Smtp-Source: AH8x227b16BVnrtinNvQVfUtvGrt8ifX90haSUa+6QXtAKbyJ+wP/CNrf+pwNsIqAEsLP2EnNQ0V X-Received: by 10.55.130.69 with SMTP id e66mr3811096qkd.76.1516482093419; Sat, 20 Jan 2018 13:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516482093; cv=none; d=google.com; s=arc-20160816; b=WmltkQzAmdLyc+GxRitN+opZe96piEspuvT163lG0cz5TwN0uxkUQPHxYWq3HisFw7 KswPpts/by9yp8EH9P9fpL3nHRGJJmCTBV+TfdrsiNlxO4P6xX6JoVH4EBe77kngkx00 I3Q8tnYYrR/gHD5uRx4zWsRE2t0bboVKo2GBH/3hFb50IpLtPiP9x/YMZDRTSQlicnEx S3uTh9iN35ByBQu1jrbF374ERlV5AIOrK+aGZ+z0ZMuMaHx6Nc4MYOLXJ3f5DZhvLjgo R2H+Wf58bdnoCodZCovqKnwchKUD66F5JlN++3gFV+3aH9z1HKr7Z5bDJoywlq8irvGI jAwA== 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=b2IbeJIaBhwDg8ozb7eH8O7CskCLq5Ntbm3tBJyM2Bg=; b=R7RZBfvlnZLO74uP5kgh0k9wSglazhM0IYyn5LJMsobldRSZJ4lD3P7FA8ODTh/P4A ewVvVTdwr3uVcKP5IzTN/SEUYOQxB65ctvpg+ndve+99rXE70A3D4cyD5jDQ8fbngW0b rdMdjmGbxsby4Hi66u4bd81CgVHmq14ODeeFLiB8B4EPCDPJRa2/7Vsy4duDzR/Y3fL3 MBmV3WDc075DaA2mtns2hM+7ZrvO+3FJF9R/7Ha4h9byaB3dW48ZpacfhwWCWTHfHXlM o/I7NqEKRVm3oOwOvc4gL2oCWiflAA9BKgYVIc6FOPqwjtOkEgiGpKWym2rAkYxAmV8U Ni0Q== 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 x34si7425622qtk.265.2018.01.20.13.01.33; Sat, 20 Jan 2018 13:01:33 -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 157A8617DF; Sat, 20 Jan 2018 21:01: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_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 6FA51617E1; Sat, 20 Jan 2018 21:00:30 +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 84E59617D1; Sat, 20 Jan 2018 21:00:24 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 5D57B617D7 for ; Sat, 20 Jan 2018 21:00:22 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward106p.mail.yandex.net (Yandex) with ESMTP id C6C912D83A5D for ; Sun, 21 Jan 2018 00:00:20 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IzI9GVu5Cx-0KbWOB5C; Sun, 21 Jan 2018 00:00:20 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bEElhWMEgr-0KmSDNUc; Sun, 21 Jan 2018 00: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: Sun, 21 Jan 2018 00:00:18 +0300 Message-Id: <1516482018-22768-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516482018-22768-1-git-send-email-odpbot@yandex.ru> References: <1516482018-22768-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 329 Subject: [lng-odp] [PATCH API-NEXT v10 2/2] api: ipsec: document usage of IPv4/IPv6 flags on inbound 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: Dmitry Eremin-Solenikov Document usage of IPv4/IPv6 flags on inbound packets. Provide special case for TFC dummy packets, which are marked by both flags being cleared. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 329 (lumag:ipsec-tfc) ** https://github.com/Linaro/odp/pull/329 ** Patch: https://github.com/Linaro/odp/pull/329.patch ** Base sha: f925f103c90591776f73863d30159357b08bf71e ** Merge commit sha: f88ee0ea868ba087f98e7c1a8c9d3e3e85d3a4c9 **/ include/odp/api/spec/ipsec.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 892a6281d..8ad8d268e 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1216,9 +1216,12 @@ typedef struct odp_ipsec_status_t { * 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 (outmost) IP header + * - IPv4/IPv6 flags: These flags can be used to determine packet contents. + * If neither IPv4 nor IPv6 flag are set, received packet is + * TFC dummy packet and should be dropped by an application + * - 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).