From patchwork Wed Dec 20 20:00:09 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: 122495 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6031506qgn; Wed, 20 Dec 2017 12:00:28 -0800 (PST) X-Google-Smtp-Source: ACJfBou2IUCwM5STFTNlLEFrUjzuwO2+/MiFXyHKvg0ha3Z6wKxZLA2B6G4KFXOY0ZFQL+0H7tmH X-Received: by 10.55.17.211 with SMTP id 80mr10599392qkr.120.1513800028282; Wed, 20 Dec 2017 12:00:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513800028; cv=none; d=google.com; s=arc-20160816; b=nVXUntMhDK89a+lJU+Ma0ht2fGSZT7ugspXkwCkfStpPBmeMKDR6wGnv+TFc0jNR9v b0kG5GsEEPsXDRYv0s2H3irIH0RDt3BHkvl0FdQvPikD+JQt/aCy7Thv/v/3GASlECBm 1kLVREMpUdnyxNiXh/JzAqikic4EiIh5ytzenlRee42/gBwOm2SgSX1LO72nF+2yrjlU vMokBdUBRgBDFrWjPBrL4QeBCdHGfOzIkyUWuxVV5NvwIMcRpKBQ1XJAoakPM7+fKl0x zeb41+jfMB8OcPqmgzoCfiGmSKxQ+r5Gu2b/qoRs84kPiH+uzyP0P/eO7EH6dbTcilwt G2yw== 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=rApPqEz1tNY3GuV0aVGt0bqI+t5vTVI9WozkHBwhk88=; b=as3ALDiYYNKxodzSUnrzkj2aAUml0chV4LbrUnLmVYhlpwopYXKfOd6IayfpSF5OdC QuZMUvpfMC3XQyjLQ2yT8Qz++E9MXiGMm6fgwE38r29eqF4pCfcn2SdPQB3QbGk5lyRv NzIe8TlUt8KOy8IRp6hfWJr129N4YY7dM93Q2eLl/IvBR0Yuu7Ui7hgJn15rdKAsRUDU tgYMr7uobNLN3/LXLSWm35z23M4PawIG28KiaRIBOBszc2Bq7MnxuHgzMt/4Kf/Gpi2o tUXVMnBAliwW+nypgXc5ddGtrnIOkz+reKRQlMHLvKH0Le3Txk+4YN6DN3x5Yhj+Z61A JhWg== 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 u48si14546181qtj.309.2017.12.20.12.00.27; Wed, 20 Dec 2017 12:00:28 -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 D780360953; Wed, 20 Dec 2017 20:00:27 +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 9A898608EE; Wed, 20 Dec 2017 20:00:20 +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 D0BD5608FD; Wed, 20 Dec 2017 20:00:16 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 81CB2608EE for ; Wed, 20 Dec 2017 20:00:15 +0000 (UTC) Received: from mxback14g.mail.yandex.net (mxback14g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:93]) by forward105p.mail.yandex.net (Yandex) with ESMTP id C3CED4082C0A for ; Wed, 20 Dec 2017 23:00:13 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback14g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id y34Q2uuGmq-0D0WNR5r; Wed, 20 Dec 2017 23:00:13 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id xnVhh3DIik-0DBGCjl6; Wed, 20 Dec 2017 23: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 23:00:09 +0300 Message-Id: <1513800011-1560-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513800011-1560-1-git-send-email-odpbot@yandex.ru> References: <1513800011-1560-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 351 Subject: [lng-odp] [PATCH API-NEXT v5 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: 9e35c84dea1b66bae27a35dfc71018a0bb455950 ** Merge commit sha: 051f69796bfb3ee5c82407da77df8fdb76fcffcc **/ 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