From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D328A0C46; Tue, 7 Sep 2021 11:13:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10EB041136; Tue, 7 Sep 2021 11:13:53 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5F6D4410EB for ; Tue, 7 Sep 2021 11:13:50 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="207259282" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="207259282" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 02:13:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="692370510" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by fmsmga006.fm.intel.com with ESMTP; 07 Sep 2021 02:13:45 -0700 From: Radu Nicolau To: Declan Doherty , Pablo de Lara Cc: dev@dpdk.org, Radu Nicolau Date: Tue, 7 Sep 2021 10:07:12 +0100 Message-Id: <20210907090715.460856-1-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/3] crypto/aesni_mb: add NULL/NULL support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add support for NULL/NULL xform. Signed-off-by: Declan Doherty Signed-off-by: Radu Nicolau --- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 3 ++ .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 38 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index a01c826a3c..b8ab84e215 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -462,6 +462,9 @@ aesni_mb_set_session_cipher_parameters(const MB_MGR *mb_mgr, /* Select cipher mode */ switch (xform->cipher.algo) { + case RTE_CRYPTO_CIPHER_NULL: + sess->cipher.mode = NULL_CIPHER; + return 0; case RTE_CRYPTO_CIPHER_AES_CBC: sess->cipher.mode = CBC; is_aes = 1; diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index fc7fdfec8e..ebf75198ae 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -502,6 +502,44 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { }, } }, } }, + { /* NULL (AUTH) */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_NULL, + .block_size = 1, + .key_size = { + .min = 0, + .max = 0, + .increment = 0 + }, + .digest_size = { + .min = 0, + .max = 0, + .increment = 0 + }, + .iv_size = { 0 } + }, }, + }, }, + }, + { /* NULL (CIPHER) */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_NULL, + .block_size = 1, + .key_size = { + .min = 0, + .max = 0, + .increment = 0 + }, + .iv_size = { 0 } + }, }, + }, } + }, + #if IMB_VERSION(0, 53, 0) <= IMB_VERSION_NUM { /* AES ECB */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, -- 2.25.1