From patchwork Tue Dec 19 17:00:19 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: 122394 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4414259qgn; Tue, 19 Dec 2017 09:01:53 -0800 (PST) X-Google-Smtp-Source: ACJfBotQEFSIH5l8o9qJ514OE9UFJEdA/NVH1wWntHXwOWb8s0TlVjUAZJ8pFz6e8RU0UFqvfrim X-Received: by 10.37.31.132 with SMTP id f126mr3224457ybf.236.1513702913502; Tue, 19 Dec 2017 09:01:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513702913; cv=none; d=google.com; s=arc-20160816; b=m05uFDoAihuHQe4dm/MCXOjjMROxP/DvklrDsU6f4iFqBJD9JY2jgcRu35bBVRXFzv dJLEv4akbGmvhwLqgDL4AIEmvLPNEkGFEff0o4CARsfEqIfOj3JdlUUlUHRHjlrsunQL x5vPK52bOKSNQKhElGDDWNCbIy3FPNIic7O2UMqz9PulBWVgpohojfeLzkbzh1/8XokP WUmEGW2yXVnCFB0pD3HygAYRqIMVHOSMaE9YtkUDS0ttWZ1CG9iJRtkFh/Hk08lUak3J epCfJXnyyqR/Z276pQ8vUFbn5mjJnaivXf229ioLRo3k2PbLAaO3HKT6ipQjMTDFEfYC A+3A== 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=hQ9fJ+kQrlc8bGmGpBMDuf4qWqKMAxAeqky9t7dMOFQ=; b=W9VjROFzuA1KOO1e54MihwXP0Ii9ctMOgjrII5rsOlJiFqkrKpHpMV94BcuHwBp2v0 VebmxT8WwZM7wd0Kek/90NNOP2v6FWp8Qbl/ExiWOAE1k5WXiSGAvV3q1PPGml2eouKU WbU4wHO5zRaBj7b5sy5RgFjW3u3J/EdPD9RsS0U/6S9QKhakKGR/jqm6m3xoahDqpFCh NfJVWbNxL3f81zrewD/wdkTmMyh8iwbwF/f0frgTe6NFbk0u39l4rGICkq9XJuLK3uy7 Nv+NGoSlObQaLmK/SIPj30TQhcx/0WzUqu+Xsrze1SAQoiPrxwcoC65SlrvMeZ/Giz28 Toiw== 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 u36si4223604qta.184.2017.12.19.09.01.47; Tue, 19 Dec 2017 09:01:53 -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 379AC608E8; Tue, 19 Dec 2017 17:01: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, 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 D29BC60905; Tue, 19 Dec 2017 17:00:37 +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 F3BAB60905; Tue, 19 Dec 2017 17:00:33 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 0C95A608DC for ; Tue, 19 Dec 2017 17:00:26 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 317BE1844D7 for ; Tue, 19 Dec 2017 20:00:24 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id YjVR0Fy6LH-0Og8bq3M; Tue, 19 Dec 2017 20:00:24 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id HFnVNhcljF-0MY0iMql; Tue, 19 Dec 2017 20:00:23 +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, 19 Dec 2017 20:00:19 +0300 Message-Id: <1513702821-14165-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513702821-14165-1-git-send-email-odpbot@yandex.ru> References: <1513702821-14165-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 351 Subject: [lng-odp] [PATCH API-NEXT v1 1/3] api: ipsec: add capabilities for cipher and auth algos 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 Currently IPsec uses capabilities from crypto module to report supported key lengths. Crypto capabilities also contain additional data (like digest length, IV len, AAD len, etc. However this data is not relevant for IPsec, as most of such variables are fixed by protocol standards. To simplify application code provide copies of cipher and auth capabilities structures containing only relevant data (key lengths). Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 351 (lumag:ipsec_crypto_caps) ** https://github.com/Linaro/odp/pull/351 ** Patch: https://github.com/Linaro/odp/pull/351.patch ** Base sha: 12fd3a9224a856271934986a1bad981843915d68 ** Merge commit sha: 5ee11c14916c7183b28645df094cf6f6a4f4fab6 **/ include/odp/api/spec/ipsec.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 538472a5e..731cd10de 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -280,6 +280,24 @@ typedef struct odp_ipsec_capability_t { } odp_ipsec_capability_t; +/** + * Cipher algorithm capabilities + */ +typedef struct odp_ipsec_cipher_capability_t { + /** Key length in bytes */ + uint32_t key_len; + +} odp_ipsec_cipher_capability_t; + +/** + * Authentication algorithm capabilities + */ +typedef struct odp_ipsec_auth_capability_t { + /** Key length in bytes */ + uint32_t key_len; + +} odp_ipsec_auth_capability_t; + /** * IPSEC configuration options */ @@ -744,7 +762,7 @@ int odp_ipsec_capability(odp_ipsec_capability_t *capa); * @retval <0 on failure */ int odp_ipsec_cipher_capability(odp_cipher_alg_t cipher, - odp_crypto_cipher_capability_t capa[], int num); + odp_ipsec_cipher_capability_t capa[], int num); /** * Query supported IPSEC authentication algorithm capabilities @@ -766,7 +784,7 @@ int odp_ipsec_cipher_capability(odp_cipher_alg_t cipher, * @retval <0 on failure */ int odp_ipsec_auth_capability(odp_auth_alg_t auth, - odp_crypto_auth_capability_t capa[], int num); + odp_ipsec_auth_capability_t capa[], int num); /** * Initialize IPSEC configuration options