From patchwork Fri Dec 8 02:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 121112 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp84189qgn; Thu, 7 Dec 2017 18:00:19 -0800 (PST) X-Google-Smtp-Source: AGs4zMY84r0BE7sVrL6/4ijiSzPpr1b2okFAzPIFmG6cVEHLtOBJ3fcZAD+WoI11NfLLNO8Nd0Wq X-Received: by 10.55.120.199 with SMTP id t190mr33999264qkc.63.1512698419014; Thu, 07 Dec 2017 18:00:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512698419; cv=none; d=google.com; s=arc-20160816; b=ohcMaKRr7EpdwzpVyYvhI8gQ+jnzDWTnk10QcKhBlEecesw+L3ImngB8NV1rdwrTFY S37cu+1k5Og2PoLBWaJuYgav40cqgZIbqmCBeY7tEMUA/z4EQCZ9dM4Z2U5PzABIArdi ndsOzV0d2WMSqQE07NNQ6ZB5tjyY/cJoErVLoTsC4ZHiXasOWY4daPKHHrvO2tl1UiW5 FxIy/11h4RoePOUrj0Uk9kb9u7uChS7GrVVgyMoH3ObOUvbrWdjTu8JyeZgWM5j8Rr8Y QJj9vKqhSeJYTrYOKC2hx0Qbt1qQnnjb4wCTaTkpj/8t9IqzZ9JMG7EFgF6o+NWfq00U 9ECQ== 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=e4aAxOrwTYEJJPQHyJIoEgKzg9SnAK0UQpe5NPegt6E=; b=HrYyQ8FmpoWs1VoaFRG1gSiKIl1u71Tg9uQIFwqxzkwpeeCZLETEkNBBI2yBnMTBeI P4KEjTAbRAmKgUqbbb+mCM26jE+PMhHVKasLpp/rIoAE/mhj3Ya6Q4P1mXDK6HgVOu/e pAfaGoHho9b2hndVrx4EHRcxnJvH48Mg4pcOI+zglc97ulUgiDaSCYUNokbhvxhG9BHl JI5VcWDqpzbxtoE32sIfJSoqX2yLpL49rttYMIfJEUzLQgtYVnmEoDEXtdTG/ddKPu3n +vHq+/VHnKdbGBej62EBtikQoWR7BvKY45RrGurIK/M7B/ozanBmJIvnVIC4jcH4tnrL g67w== 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 p5si4822112qkb.113.2017.12.07.18.00.18; Thu, 07 Dec 2017 18:00: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 2BEEB60991; Fri, 8 Dec 2017 02:00:18 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED 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 17A6360959; Fri, 8 Dec 2017 02:00:14 +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 1EDD16096F; Fri, 8 Dec 2017 02:00:11 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id EA27660959 for ; Fri, 8 Dec 2017 02:00:09 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 7CF1C4083E4C for ; Fri, 8 Dec 2017 05:00:08 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id lVLHkDip9Y-08qaafAQ; Fri, 08 Dec 2017 05:00:08 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lnCfKe0vzd-07YqFkRA; Fri, 08 Dec 2017 05:00:07 +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: Fri, 8 Dec 2017 05:00:05 +0300 Message-Id: <1512698406-27565-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512698406-27565-1-git-send-email-odpbot@yandex.ru> References: <1512698406-27565-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 329 Subject: [lng-odp] [PATCH API-NEXT v1 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-tunnel 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: 0980001e33b4190133d478a0aa2e718fd1e3c164 ** Merge commit sha: e21e3f5f12faf7775b8d0e993a95dd377130f4c7 **/ include/odp/api/spec/ipsec.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index d57815ed2..86803cecf 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1228,6 +1228,10 @@ 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 for ESP tunnel + * mode. Application should handle this padding using payload length from IPv4 + * or IPv6 header. + * * Each successfully transformed packet has a valid value for these metadata * regardless of the inner packet parse configuration * (odp_ipsec_inbound_config_t): @@ -1293,6 +1297,10 @@ 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 for ESP-tunnel + * mode. It will be included into encrypted packet. Receiver side will skip + * this padding automatically. + * * Each successfully transformed packet has a valid value for these metadata: * - L3 offset: Offset to the first byte of the (outmost) IP header *