From patchwork Wed Dec 20 02:00:10 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: 122422 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4950727qgn; Tue, 19 Dec 2017 18:01:24 -0800 (PST) X-Google-Smtp-Source: ACJfBouHtLk0/b7KiDy57VTx5RcruDuWdSHwhGCKDBr0SD/os1H/yJw3y6Ma+gIorjSQNE7aXX1F X-Received: by 10.55.74.144 with SMTP id x138mr7229674qka.239.1513735284727; Tue, 19 Dec 2017 18:01:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513735284; cv=none; d=google.com; s=arc-20160816; b=ym1azTy7JeWOlamhqcWDyiH1amWq7NnrTOWt3pjkSZxmjzdnOrrdzskm5j2SM1t6Xd dDJDajuB7ORRmOXin4XaW3WdtrQblx5Xta7qgDqwI4XYnWRwE3oom7G6+G38Ln8VRDrP hTODIpRQNqUFLrs/4WY++Gx0b6jhxCJ0X4q9wzjxw1Q1kazHt9Dv1M1/rsIc8G2RMdyV Krrxu5tI/pso1GCWTYbUw0EKtcwWYHRK+5woGD8S5sSRGhxD1LAUHcxNR5UsDgDcLqVU i/ZkBk8TRe5PsOMJbH8JY8MeVXErPVHTheSLBjhPdfUx5piK4hbWgkFcCvNDJ6j7aF91 Z3kQ== 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=BZNru+hYbhJ3HbJKA2PA4JuAUSsRLqdVc8PiJ5H3360=; b=a3G+CWuXt+M3LDtEZUzYd26nCKAIYxSS5Zg4zgcZDWOeDZu0nJVnNC4Udt5x/XmdMK 7XreSlrwUDbazxSPAwTk3Ezq9+o9s6tAuI4uEAe20olTdjBFwd4wvZketk75owHC07qy LrDsI0osywCrpkkMv23zUbfyDpWDCzLBddzUnnIkEb/NmoluizktPJ+NKWcQS0oJKluE nbzmGR1oEVr9KoK6Pe1B5oumvcju4WFa8PRGAOBWjxe2n6zkQECXWBw4QEmH1uAXYyrS mUr0iANb8uocrKVy6s6/doOLV+Yhe7Yp50WxvSV7qCsfrWupFAS0R0H9p2gixTZ6WugW YLdw== 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 x17si12176911qkx.216.2017.12.19.18.01.24; Tue, 19 Dec 2017 18:01:24 -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 5AABA60997; Wed, 20 Dec 2017 02:01:24 +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 302CB608ED; Wed, 20 Dec 2017 02:00:26 +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 D1D8D608AA; Wed, 20 Dec 2017 02:00:17 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 30800608A7 for ; Wed, 20 Dec 2017 02:00:16 +0000 (UTC) Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward104j.mail.yandex.net (Yandex) with ESMTP id BD92143314 for ; Wed, 20 Dec 2017 05:00:13 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Yd1X5EhjxH-0D2StkLm; Wed, 20 Dec 2017 05:00:13 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 4luweGfeEM-0D5aM4PO; Wed, 20 Dec 2017 05:00:13 +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: Wed, 20 Dec 2017 05:00:10 +0300 Message-Id: <1513735212-32606-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513735212-32606-1-git-send-email-odpbot@yandex.ru> References: <1513735212-32606-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 351 Subject: [lng-odp] [PATCH API-NEXT v4 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: ba5f93d7379836dc97d5a6688febb81dcd7694b6 **/ 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