[dpdk-dev] [PATCH v3 31/32] test: adds validation test
Akhil Goyal
akhil.goyal at nxp.com
Mon Oct 8 14:33:11 CEST 2018
Hi Anoob,
On 10/5/2018 6:29 PM, Anoob Joseph wrote:
> From: Ankur Dwivedi <ankur.dwivedi at caviumnetworks.com>
>
> This patch adds validation tests for octeontx crypto device.
>
> Signed-off-by: Ankur Dwivedi <ankur.dwivedi at caviumnetworks.com>
> Signed-off-by: Anoob Joseph <anoob.joseph at caviumnetworks.com>
> Signed-off-by: Murthy NSSR <nidadavolu.murthy at caviumnetworks.com>
> Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram at caviumnetworks.com>
> Signed-off-by: Ragothaman Jayaraman <rjayaraman at caviumnetworks.com>
> Signed-off-by: Srisivasubramanian S <ssrinivasan at caviumnetworks.com>
> Signed-off-by: Tejasree Kondoj <kondoj.tejasree at caviumnetworks.com>
> ---
> test/test/meson.build | 1 +
> test/test/test_cryptodev.c | 316 +++++++++++++++++++++++++++
> test/test/test_cryptodev.h | 1 +
> test/test/test_cryptodev_aes_test_vectors.h | 114 ++++++----
> test/test/test_cryptodev_blockcipher.c | 9 +-
> test/test/test_cryptodev_blockcipher.h | 1 +
> test/test/test_cryptodev_des_test_vectors.h | 12 +-
> test/test/test_cryptodev_hash_test_vectors.h | 78 ++++---
> 8 files changed, 463 insertions(+), 69 deletions(-)
>
> diff --git a/test/test/meson.build b/test/test/meson.build
> index b1dd6ec..2d59041 100644
> --- a/test/test/meson.build
> +++ b/test/test/meson.build
> @@ -141,6 +141,7 @@ test_names = [
> 'cryptodev_sw_mvsam_autotest',
> 'cryptodev_dpaa2_sec_autotest',
> 'cryptodev_dpaa_sec_autotest',
> + 'cryptodev_octeontx_autotest',
> 'cycles_autotest',
> 'debug_autotest',
> 'devargs_autotest',
> diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
> index c63662d..b9731b9 100644
> --- a/test/test/test_cryptodev.c
> +++ b/test/test/test_cryptodev.c
> @@ -2142,6 +2142,96 @@ test_3DES_cipheronly_mrvl_all(void)
> return TEST_SUCCESS;
> }
>
> +static int
> +test_AES_chain_cpt_all(void)
> +{
> + struct crypto_testsuite_params *ts_params = &testsuite_params;
> + int status;
> +
> + status = test_blockcipher_all_tests(ts_params->mbuf_pool,
> + ts_params->op_mpool, ts_params->session_mpool,
> + ts_params->valid_devs[0],
> + rte_cryptodev_driver_id_get(
> + RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
> + BLKCIPHER_AES_CHAIN_TYPE);
> +
> + TEST_ASSERT_EQUAL(status, 0, "Test failed");
> +
> + return TEST_SUCCESS;
> +}
> +
> +static int
> +test_AES_cipheronly_cpt_all(void)
> +{
> + struct crypto_testsuite_params *ts_params = &testsuite_params;
> + int status;
> +
> + status = test_blockcipher_all_tests(ts_params->mbuf_pool,
> + ts_params->op_mpool, ts_params->session_mpool,
> + ts_params->valid_devs[0],
> + rte_cryptodev_driver_id_get(
> + RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
> + BLKCIPHER_AES_CIPHERONLY_TYPE);
> +
> + TEST_ASSERT_EQUAL(status, 0, "Test failed");
> +
> + return TEST_SUCCESS;
> +}
> +
> +static int
> +test_3DES_chain_cpt_all(void)
> +{
> + struct crypto_testsuite_params *ts_params = &testsuite_params;
> + int status;
> +
> + status = test_blockcipher_all_tests(ts_params->mbuf_pool,
> + ts_params->op_mpool, ts_params->session_mpool,
> + ts_params->valid_devs[0],
> + rte_cryptodev_driver_id_get(
> + RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
> + BLKCIPHER_3DES_CHAIN_TYPE);
> +
> + TEST_ASSERT_EQUAL(status, 0, "Test failed");
> +
> + return TEST_SUCCESS;
> +}
> +
> +static int
> +test_3DES_cipheronly_cpt_all(void)
> +{
> + struct crypto_testsuite_params *ts_params = &testsuite_params;
> + int status;
> +
> + status = test_blockcipher_all_tests(ts_params->mbuf_pool,
> + ts_params->op_mpool, ts_params->session_mpool,
> + ts_params->valid_devs[0],
> + rte_cryptodev_driver_id_get(
> + RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
> + BLKCIPHER_3DES_CIPHERONLY_TYPE);
> +
> + TEST_ASSERT_EQUAL(status, 0, "Test failed");
> +
> + return TEST_SUCCESS;
> +}
> +
> +static int
> +test_authonly_cpt_all(void)
> +{
> + struct crypto_testsuite_params *ts_params = &testsuite_params;
> + int status;
> +
> + status = test_blockcipher_all_tests(ts_params->mbuf_pool,
> + ts_params->op_mpool, ts_params->session_mpool,
> + ts_params->valid_devs[0],
> + rte_cryptodev_driver_id_get(
> + RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)),
> + BLKCIPHER_AUTHONLY_TYPE);
> +
> + TEST_ASSERT_EQUAL(status, 0, "Test failed");
> +
> + return TEST_SUCCESS;
> +}
> +
> /* ***** SNOW 3G Tests ***** */
> static int
> create_wireless_algo_hash_session(uint8_t dev_id,
> @@ -9951,6 +10041,216 @@ static struct unit_test_suite cryptodev_ccp_testsuite = {
> }
> };
>
> +static struct unit_test_suite cryptodev_cpt_testsuite = {
Shouldn't this be cryptodev_octeontx_testsuite and for other functions
as well?
I believe cpt is helper API set, and main PMD is octeontx, so the test
shall also have octeontx reference.
Thanks,
Akhil
More information about the dev
mailing list