From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id A370A532C for ; Fri, 24 Aug 2018 15:55:14 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id s12-v6so6958576ljj.0 for ; Fri, 24 Aug 2018 06:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PH9OKqgeC/vQFMXSBBfggYkDK85iqyoKpv2wtxf5wno=; b=HzdtEnL+dU9MAps6+LYpL9q6ObHm2xrQzM8xeexCSxlAHzbHfvkErkIPntiRuTaC7l Vndi0xiytkHzMdyyo2tbTo5trNfUqmruw5WvMb71/dgj9mpSKx6fA2ceofAqpnW8ZwK/ j6VIpcOAiUN4N5vIjxFBvidLWEaNVAG7DQrzjHZygtgp3klEPHynSiCMWwqGEdCXeli2 IAVFSxMx4qtmAaToed1RC4DqhX1YdMWg8yP7bGaDRbXfFe80XjT5UsgZfysPAPSDOZ0m A3czEXbILOSLVStIkxcf92mffsR7RbTMCHIxRh/j2SjWcTdwzf+1kSSzlOxdrwi0kgkq qcUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PH9OKqgeC/vQFMXSBBfggYkDK85iqyoKpv2wtxf5wno=; b=le37jM9FuyGY/CbmXr4KLtq0Hu4H4e1TW5eqzX1OrUWRzWU34i2AYJ/NxZQvrcgdnG 2KB9TPmo1F7XjxY6CFGDcNPM0zb7E6jiN2kbK+R8oGfcf2QOhlR+TWdCebhl97lkRY4J ioXbXTqrShdaWYZuxrRvb96IyNHII5A7kgNg+giY+4ZRPPL0IxWud31GeD5VViHi6kF6 e8qOJii4jxkdR02Zzw7Wcv9EXKFJmAyZcSCsnvcpoQWbADnIyZfpO22JdcCbqiI4E2eJ S8EiK7gaRK+FNjmkToEgjSmaNloHLOEu/MfC+uLR95fSQqlUsd7UxEP4FtPP+7RLx3Qz efbw== X-Gm-Message-State: APzg51AH1Kh+85uVneV8dKqmUxmnwHKJVGs/mIFCrT4TWEoRjfiUGbNo uUljFn6lZm5DJ/gYWCGIXSAq1mLWrxI= X-Google-Smtp-Source: ANB0VdZTxK0o3tiLLjeZGcd5brnggYdXwkM6z21qqGtsl0IMAGZeJdJDeW1Amo1X5D+c3kOMiaNuVw== X-Received: by 2002:a2e:934d:: with SMTP id m13-v6mr1479081ljh.45.1535118914180; Fri, 24 Aug 2018 06:55:14 -0700 (PDT) Received: from sh.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id h71-v6sm1352003lfg.64.2018.08.24.06.55.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Aug 2018 06:55:13 -0700 (PDT) From: Tomasz Duszynski To: dev@dpdk.org Cc: nsamsono@marvell.com, mw@semihalf.com, Tomasz Duszynski Date: Fri, 24 Aug 2018 15:54:54 +0200 Message-Id: <1535118895-6505-6-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535118895-6505-1-git-send-email-tdu@semihalf.com> References: <1535118895-6505-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH 5/6] crypto/mvsam: add support for crypto/auth NULL algorithms X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 13:55:14 -0000 Add support for both cipher and auth NULL algorithms. Signed-off-by: Tomasz Duszynski Reviewed-by: Natalie Samsonov --- drivers/crypto/mvsam/rte_mrvl_pmd.c | 6 +++++ drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c index 08d4a23..961802e 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c @@ -69,6 +69,9 @@ __rte_aligned(32); */ static const struct cipher_params_mapping cipher_map[RTE_CRYPTO_CIPHER_LIST_END] = { + [RTE_CRYPTO_CIPHER_NULL] = { + .supported = ALGO_SUPPORTED, + .cipher_alg = SAM_CIPHER_NONE }, [RTE_CRYPTO_CIPHER_3DES_CBC] = { .supported = ALGO_SUPPORTED, .cipher_alg = SAM_CIPHER_3DES, @@ -106,6 +109,9 @@ struct cipher_params_mapping cipher_map[RTE_CRYPTO_CIPHER_LIST_END] = { */ static const struct auth_params_mapping auth_map[RTE_CRYPTO_AUTH_LIST_END] = { + [RTE_CRYPTO_AUTH_NULL] = { + .supported = ALGO_SUPPORTED, + .auth_alg = SAM_AUTH_NONE }, [RTE_CRYPTO_AUTH_MD5_HMAC] = { .supported = ALGO_SUPPORTED, .auth_alg = SAM_AUTH_HMAC_MD5 }, diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c index 3d3bbf1..f3251aa 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c @@ -413,6 +413,51 @@ static const struct rte_cryptodev_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 = { + .min = 0, + .max = 0, + .increment = 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 = { + .min = 0, + .max = 0, + .increment = 0 + } + }, }, + }, } + }, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; -- 2.7.4