test/crypto: add out-of-place tests
authorFiona Trahe <fiona.trahe@intel.com>
Thu, 2 Mar 2017 13:03:12 +0000 (13:03 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 5 Apr 2017 22:17:44 +0000 (00:17 +0200)
Added out-of-place (OOP) tests for AES-CBC, AES-DOCSIS and DES-DOCSIS
to tests suites for QuickAssist and openssl PMDs.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
test/test/test_cryptodev_aes_test_vectors.h
test/test/test_cryptodev_des_test_vectors.h

index 992705e..07d6eab 100644 (file)
@@ -1377,6 +1377,22 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER
        },
+       {
+               .test_descr = "AES-256-CBC OOP Encryption",
+               .test_data = &aes_test_data_11,
+               .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "AES-256-CBC OOP Decryption",
+               .test_data = &aes_test_data_11,
+               .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
        {
                .test_descr = "AES-128-CTR Encryption",
                .test_data = &aes_test_data_1,
@@ -1476,6 +1492,48 @@ static const struct blockcipher_test_case aes_docsis_test_cases[] = {
                .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "AES-DOCSIS-BPI OOP Full Block Encryption",
+               .test_data = &aes_test_data_docsis_1,
+               .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "AES-DOCSIS-BPI OOP Runt Block Encryption",
+               .test_data = &aes_test_data_docsis_2,
+               .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "AES-DOCSIS-BPI OOP Uneven Block Encryption",
+               .test_data = &aes_test_data_docsis_3,
+               .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "AES-DOCSIS-BPI OOP Full Block Decryption",
+               .test_data = &aes_test_data_docsis_1,
+               .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "AES-DOCSIS-BPI OOP Runt Block Decryption",
+               .test_data = &aes_test_data_docsis_2,
+               .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "AES-DOCSIS-BPI OOP Uneven Block Decryption",
+               .test_data = &aes_test_data_docsis_3,
+               .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
        }
 };
 #endif /* TEST_CRYPTODEV_AES_TEST_VECTORS_H_ */
index 06dcf5e..b226794 100644 (file)
@@ -1001,8 +1001,55 @@ static const struct blockcipher_test_case des_docsis_test_cases[] = {
                .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "DES-DOCSIS-BPI OOP Full Block Encryption",
+               .test_data = &des_test_data_1,
+               .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "DES-DOCSIS-BPI OOP Runt Block Encryption",
+               .test_data = &des_test_data_2,
+               .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "DES-DOCSIS-BPI OOP Uneven Encryption",
+               .test_data = &des_test_data_3,
+               .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "DES-DOCSIS-BPI OOP Full Block Decryption",
+               .test_data = &des_test_data_1,
+               .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "DES-DOCSIS-BPI OOP Runt Block Decryption",
+               .test_data = &des_test_data_2,
+               .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
+       },
+       {
+               .test_descr = "DES-DOCSIS-BPI OOP Uneven Decryption",
+               .test_data = &des_test_data_3,
+               .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+               .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+               .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        }
-
 };
 
 static const struct blockcipher_test_case triple_des_chain_test_cases[] = {