From 8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 1 Nov 2018 11:59:50 +0000 Subject: New upstream version 18.11-rc1 Change-Id: Iaa71986dd6332e878d8f4bf493101b2bbc6313bb Signed-off-by: Luca Boccassi --- drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 160 ++++++++++++++++++++++++++------ 1 file changed, 133 insertions(+), 27 deletions(-) (limited to 'drivers/crypto/mvsam/rte_mrvl_pmd_ops.c') diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c index c045562c..9956f051 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c @@ -30,9 +30,9 @@ static const struct rte_cryptodev_capabilities .increment = 1 }, .digest_size = { - .min = 16, + .min = 12, .max = 16, - .increment = 0 + .increment = 4 }, }, } }, } @@ -50,9 +50,9 @@ static const struct rte_cryptodev_capabilities .increment = 0 }, .digest_size = { - .min = 16, + .min = 12, .max = 16, - .increment = 0 + .increment = 4 }, }, } }, } @@ -70,9 +70,9 @@ static const struct rte_cryptodev_capabilities .increment = 1 }, .digest_size = { - .min = 20, + .min = 12, .max = 20, - .increment = 0 + .increment = 4 }, }, } }, } @@ -90,8 +90,29 @@ static const struct rte_cryptodev_capabilities .increment = 0 }, .digest_size = { - .min = 20, + .min = 12, .max = 20, + .increment = 4 + }, + }, } + }, } + }, + { + /* SHA224 HMAC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, + {.auth = { + .algo = RTE_CRYPTO_AUTH_SHA224_HMAC, + .block_size = 64, + .key_size = { + .min = 1, + .max = 64, + .increment = 1 + }, + .digest_size = { + .min = 28, + .max = 28, .increment = 0 }, }, } @@ -110,9 +131,9 @@ static const struct rte_cryptodev_capabilities .increment = 0 }, .digest_size = { - .min = 28, + .min = 12, .max = 28, - .increment = 0 + .increment = 4 }, }, } }, } @@ -130,9 +151,9 @@ static const struct rte_cryptodev_capabilities .increment = 1 }, .digest_size = { - .min = 32, + .min = 12, .max = 32, - .increment = 0 + .increment = 4 }, }, } }, } @@ -150,9 +171,9 @@ static const struct rte_cryptodev_capabilities .increment = 0 }, .digest_size = { - .min = 32, + .min = 12, .max = 32, - .increment = 0 + .increment = 4 }, }, } }, } @@ -170,9 +191,9 @@ static const struct rte_cryptodev_capabilities .increment = 1 }, .digest_size = { - .min = 48, + .min = 12, .max = 48, - .increment = 0 + .increment = 4 }, }, } }, } @@ -190,9 +211,9 @@ static const struct rte_cryptodev_capabilities .increment = 0 }, .digest_size = { - .min = 48, + .min = 12, .max = 48, - .increment = 0 + .increment = 4 }, }, } }, } @@ -210,9 +231,9 @@ static const struct rte_cryptodev_capabilities .increment = 1 }, .digest_size = { - .min = 64, - .max = 64, - .increment = 0 + .min = 12, + .max = 48, + .increment = 4 }, }, } }, } @@ -230,8 +251,8 @@ static const struct rte_cryptodev_capabilities .increment = 0 }, .digest_size = { - .min = 64, - .max = 64, + .min = 12, + .max = 48, .increment = 0 }, }, } @@ -277,6 +298,26 @@ static const struct rte_cryptodev_capabilities }, } }, } }, + { /* AES ECB */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_AES_ECB, + .block_size = 16, + .key_size = { + .min = 16, + .max = 32, + .increment = 8 + }, + .iv_size = { + .min = 0, + .max = 0, + .increment = 0 + } + }, } + }, } + }, { /* AES GCM */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = { @@ -372,6 +413,71 @@ static const struct rte_cryptodev_capabilities }, } }, } }, + { /* 3DES ECB */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_3DES_ECB, + .block_size = 8, + .key_size = { + .min = 24, + .max = 24, + .increment = 0 + }, + .iv_size = { + .min = 0, + .max = 0, + .increment = 0 + } + }, } + }, } + }, + { /* 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() }; @@ -551,7 +657,7 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, */ int num = sam_get_num_inst(); if (num == 0) { - MRVL_CRYPTO_LOG_ERR("No crypto engines detected.\n"); + MRVL_LOG(ERR, "No crypto engines detected!"); return -1; } @@ -635,7 +741,7 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev, int ret; if (sess == NULL) { - MRVL_CRYPTO_LOG_ERR("Invalid session struct."); + MRVL_LOG(ERR, "Invalid session struct!"); return -EINVAL; } @@ -646,7 +752,7 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev, ret = mrvl_crypto_set_session_parameters(sess_private_data, xform); if (ret != 0) { - MRVL_CRYPTO_LOG_ERR("Failed to configure session parameters."); + MRVL_LOG(ERR, "Failed to configure session parameters!"); /* Return session to mempool */ rte_mempool_put(mp, sess_private_data); @@ -658,7 +764,7 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev, mrvl_sess = (struct mrvl_crypto_session *)sess_private_data; if (sam_session_create(&mrvl_sess->sam_sess_params, &mrvl_sess->sam_sess) < 0) { - MRVL_CRYPTO_LOG_DBG("Failed to create session!"); + MRVL_LOG(DEBUG, "Failed to create session!"); return -EIO; } @@ -686,7 +792,7 @@ mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev, if (mrvl_sess->sam_sess && sam_session_destroy(mrvl_sess->sam_sess) < 0) { - MRVL_CRYPTO_LOG_INFO("Error while destroying session!"); + MRVL_LOG(ERR, "Error while destroying session!"); } memset(sess, 0, sizeof(struct mrvl_crypto_session)); -- cgit 1.2.3-korg