From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0046.outbound.protection.outlook.com [104.47.32.46]) by dpdk.org (Postfix) with ESMTP id 0E8321B226 for ; Fri, 5 Jan 2018 10:40:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=d4sexN0YSvSGbDNCnB5eMCN/Z8rcFOnJFHnsgAQMIME=; b=RjdI045WFDpQOkaOnImGc7WEovQz1eOPIPY9RrEiBnllwb55mIqWWEHwD+C7DR/3BZRiAKXRy00Uqq6Y4sjiOrtGFRmyqy8tcxeA4rF3IMo6pMxYhF21O21pps4YhzM1RE0xgTrLL7KrzTsd84c36VAAAQ8gw96IiKyHfh/WZrs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by BN6PR12MB1508.namprd12.prod.outlook.com (10.172.24.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 5 Jan 2018 09:40:51 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com Date: Fri, 5 Jan 2018 04:39:57 -0500 Message-Id: <1515145198-97367-19-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515145198-97367-1-git-send-email-Ravi1.kumar@amd.com> References: <1512047553-118101-1-git-send-email-Ravi1.kumar@amd.com> <1515145198-97367-1-git-send-email-Ravi1.kumar@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: PN1PR01CA0084.INDPRD01.PROD.OUTLOOK.COM (10.174.144.152) To BN6PR12MB1508.namprd12.prod.outlook.com (10.172.24.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b30556d4-f527-4f16-2f29-08d55420691b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN6PR12MB1508; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1508; 3:3A2y+qwSn7e9rfr1Uto0TBwoGmBvpgJ/GoyIP9zxXL2UWgSa/qGaIw3mJQdln5SWCRd55U06MUSNYvqHRP8pfTqRoAzFC/iP9+7KKQBK/b0ANSe6u1XdH4p9bK4KuZkrCA2LszU6EUqC46BKVBcvVi5Nj9vSFgedimZ47j9NlGKrRwKQLbOwFOj4HVG5G/zo2/m8A8qN64WrVop01mqhx7xiEZUsMzdCx+wYpLE9KtH9qekz/yzBDTG8E/egTwE2; 25:7uxNybU2dS7uCDDo+WwaL6AzHniBAoC9Nb0V1dErbVrReY5flZNobwDKwSSRBq0mapKHxxVPRBiDlJxtBQUM96Y0W66Ly8SDUXUpHFZvl1v2bUxsbPK6/KUaw+BLL5rmDeYIkFZ/9w6tcVGFOFrb31C0nk0AdvHrTlN3f9K83w++niBufPSbLYWBeYtVKiKdvLJJ/L9n+JH5Jzvm3BdUF7Re06bo6k+Y3qIdoC0Z6PyxVEtnOPwd+SDR4l4cdJQwdmeuoVQSMuyMqy44i5AKpuek72A2PqaTN/55BYHhI6vLgqXu1lzXE3PCFw48hZJHGBNxfXDS3NYIFqHyfDs6bg==; 31:m1U07b1/Lk9OCUW6nLyWOZAaUzVJJt+Nqbehcw6bdg1f+TlqFfcy1G+zpfoexn+Lbzy+nfzUXeeAZS7Eu3puOKICxssJbOtoyrvyMedb5U/h+hZPZK3Soy+vIt1kbN0QLdPq2eXydjqDB0OEN8iIRwg0AFbIDFWdvh3Jm8W0vkklCKpWpzTW6hQwJKZYqOggoePHonW0S4TI3oqdL8W1M8DKR+B7FesAnm+UJmndWNY= X-MS-TrafficTypeDiagnostic: BN6PR12MB1508: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1508; 20:eHdZPIgRpxy55ev4XScLJSXcvjyo4Ux3hbezbMmAGtvDly6paSY+Hp3Ub/uZQVSD71LimSEGaew4PwGTg9CrcLk01otH8sfk34ybo9KpoDcCLmHklb6pyhs7gFga4TOE3oYhyvRogQ9lZY3yE6x2UNmFHR/yps58NucAAglQ4fxVXplHIdpZ+UkyVKOPzdN4NcEAkvXj/92WZBnYyX9KsEfKYm6thIZ3OU2MY+oVcgjXodJ6iBlvskyIGa8rlWMqsv7n5YJEWQUjykYpJ7K3H5O+YzHUIsa+DIdDj+ERvPKENkIaswEjGBNXT/tBhAsPQniV/487Zh7R3qc5WLXXrKdltxqydLFF0I3IPnfqgCuhsoEoqqWViYaRgIuh62l8l/Fd/wcratEuqAuCKOE7VWUSVXmXooa2yy1CF2Lm9CVrAKtF24cA3Jb6iT7PQ47y5m9uFF+livramVomC6+iY0KTnhcRQStEcEZXBGw5jNfJwuv5YXHkNe4hbvV4JZWJ; 4:3DXxEmW7nwfBr8oWVlrcxRklON5QY8ow/hBU8EPPQXLQcaQa7dHB3xH29J18aNHj7Q5NDTwtgu+p0p0dv/l1eU07LzH5JmBacc2jbOGcmspfuL3v3bQEYUGwo18zu4Zs3zIO8dwm6lgbgkdjV2KtIVj2QfT/Nw7zsj0zhq5vgSKJiOkmoP9zdgWZ1esbiP4MRxevIhnJa6u8pXmDuATcuTvcPAKo6yH6Srf7r819oeTzNOiySoYjFPnOlEI/pGi3bdtj/Au+IymZCr1b2nCtU7TtoYkDknyUEV2GRVeGbTLqamTBiotB0ThuaTtHy+J+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231023)(944501075)(6055026)(6041268)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR12MB1508; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR12MB1508; X-Forefront-PRVS: 05437568AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(366004)(346002)(39380400002)(376002)(199004)(189003)(6486002)(2361001)(6116002)(106356001)(386003)(105586002)(3846002)(6916009)(2950100002)(16586007)(16526018)(36756003)(4326008)(2906002)(316002)(97736004)(25786009)(478600001)(86362001)(68736007)(575784001)(8676002)(48376002)(51416003)(81166006)(2351001)(81156014)(52116002)(8936002)(53936002)(53946003)(305945005)(50226002)(76176011)(72206003)(50466002)(53416004)(7696005)(47776003)(66066001)(59450400001)(5660300001)(7736002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1508; H:wallaby-smavila.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1508; 23:pR51ssE6jJtoosISYHotzkLvHWMwPpQ4zG4O5K3Ba?= =?us-ascii?Q?r1gStPvdV8f/dZEzOB1p/umfKajz+tuN1GiHxefrlVM9ohrNVdwNHTQqK+08?= =?us-ascii?Q?2AxGztUN93C44yELu+qqXY2AItoW8ln1Bjf1v1glwqNAS4hM8Kcks1v3p62T?= =?us-ascii?Q?nP00SUl3+Y8ugITLJ8SKNx3HtE/ZldQ/mGpznRyudf05Yq6NeSBmhJg5arca?= =?us-ascii?Q?yNPrkgJu1vlwGwahl1eoH+kghSK6xAh6XgA1kMmOj6idMj89YYZND9PQVvac?= =?us-ascii?Q?FLbkgkjDWTfQOw+usIwNgU24zFY8R0ah6veu6Pw+XGorELjqIbw6l1WKHhqH?= =?us-ascii?Q?Lg/7LcDzdn4hqq+ICwas5qSEsYN7IwY4tZLjm0ul1AzOWOvj1LHUu+GxVnMo?= =?us-ascii?Q?GwDrRhej7YAA3gZLF+3Qd53uuDjymWrfrDn1ZhWhjG5xxuyEZ+DW7BKM2xHJ?= =?us-ascii?Q?w8jF2iapJXpHyrWnOkQ9M4BsiGU7ROoJbSULDTuWRnLgeonWVYGYyn89HHf1?= =?us-ascii?Q?fV/F9+cDN8bgP6TSfEAYuKsUP3ZL22I4/DWzCRjaG2AunfdEAi9ievXiStIT?= =?us-ascii?Q?CxBHdR1OC3dX8woJBpYI8i9uxHpzZk89eQoQoVDeLoZEapBIrvQQG6SZS44O?= =?us-ascii?Q?E4Tv8+Cm90NnHY/YUGz4ni41fIyhj9iWVVk1kVbSfbNt4Ud9H25Ig81+5KED?= =?us-ascii?Q?q5HbqtOMZ2FRf7wsXodgWFQZwKvUtwbN2znICPke5zjLVHnIoN/Dg3FhQrLL?= =?us-ascii?Q?eKwr40vcycJTDMAD5xAakvEg0cjd0UVnB0eg/gGuJAIcxLpSJ45YyvUns0cb?= =?us-ascii?Q?s/MsjXntHW9jt5oGqrKKgMLbcDEfF045ttPh9By3Q/LfJmPgHaua9e4oGA6b?= =?us-ascii?Q?a/q16gNyYSTQiqKkhS/RxLTJnnsED2WpxrdKTl4kusgj0z5VW+UofZSLwZM1?= =?us-ascii?Q?N0HJUg1+0U4iRn3WjzCofGT4hzWPzkWna1XabMGoqRdFR6YHbnh5uV6LfClM?= =?us-ascii?Q?BdzVDi3OmjsvmqF4hm6X3eSpzSiZEyuXXlyMHnT03ZN4PXFGT9vY+g4XobaF?= =?us-ascii?Q?j6nNT3N8QVbs9IXgaephhAfFboDGD1o48M+XyL+IcajBhQHlOHSrvg60g+eJ?= =?us-ascii?Q?AbHf3Iw3VUqVH5XAlptgdGLEaWS8kL9GyRs1r9Er8jQ5giJovjhnxqEIAD8U?= =?us-ascii?Q?Dld4+w4qUpfjgwso+faHZQSDTFZitp7z1oq?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1508; 6:gVMtkONci1WJ5esS1sIj2pXFmm+J6jje5fJLUQqowzOeO5Lx0FoE1kZ0AD99QeAPE75z7sq2OLkBwyJw6x1rex716VE691gX245Zyii1ow2J+yno0kNVuUvVZFpZ+79VYZ6Q+c/waA935f0drr/LbKx296/KA6ojRSvduYaotU+ZjO5W6c8OG1EZpBEsz8fcw9O2ZPk8sDMxpIEl/nkzRpUgQ9l8Zf8xfdOGJjy3qugrZpt2mkwxLQ1JFchKPmQ+OjvQ/aPAxwsd10e2Jq/+TZGh4+QX274KgNKU76lD80kD3p4l+Rvuba0iKNl0TssEYC1PAJfT3aNds+70ffygrF3WESUmYBJsAsvLAiTT87g=; 5:W+02LTFh3dtf6XjW2lZr9hTIKT+b9Cgi4TZOnBWd7OmH0Sw0Qv9uYTUXcTTytoZTN/xy0f+Rgdh0hZcoTkM0G0rPOWPxVMEH3xp4RlP1vLyMC6CBj6CyHG87Qf8tVyW4WKuf17Qq3BE3xuiDwiT2r+kTbO6238uFkajzMe79ag4=; 24:SUT8XbVOCRaxtLokYyTyVDwBHIsSFmGFTrMBVUvd4+nJkmnuvtxwy5OLIBkFrxzp6IRMLaBdW6pqvYAn+2DBpPVnP+bFSL5tElBNJPewLyE=; 7:AFbi8p3rKwlwTMrPnfWmtbRMcCiMIjdWc8tAHw2Mkk/gDF50k2cJAVWn2tDtF1cCDuDO1by1l9EDa/gPlUTrPH7COboQNNdVNybtnPMZxZ9EGKUxdroLXy1DKXI5ojjpZT/M/KKg1VDzAgekP3vMUDF237Kzn0m4TjuiuZXF7QhbHPLYs8oLs9+hLZ8CkSx2FwjdTH2CGJeiUc2ocITln9DX4lWRyyXajNkFlZdctyNAu4f7E2GCmyV1/2fSwYHi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1508; 20:BG4/t3LDxJTPOCbXHcXiTUotnf77LJ9kbaltMN3UhgkNBTv4IfeZoG8NN7KdOAurw7Ry8BZszxHzA5ZAPssMHijImtqnw8c3bLwj2Z8Cs1RFXZfF979jGUqsyhnSU/ni3v0SGARjdFyJp9Ot601FJV1TsVDP0cBxFUbBmhUl/5IWZBF8b7y8WNpduMASGdWQUlcd0s51rVOK2CqcLnGui0foSqKYAT3gA1u9vhL0qcY95fZ1m0zkE927xdBav0p+ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2018 09:40:51.2649 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b30556d4-f527-4f16-2f29-08d55420691b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1508 Subject: [dpdk-dev] [PATCH v2 19/20] test/crypto: add test for AMD CCP crypto poll mode driver 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, 05 Jan 2018 09:40:54 -0000 Signed-off-by: Ravi Kumar --- test/test/test_cryptodev.c | 161 +++++++++++++++++++++++++++ test/test/test_cryptodev.h | 1 + test/test/test_cryptodev_aes_test_vectors.h | 93 ++++++++++------ test/test/test_cryptodev_blockcipher.c | 9 +- test/test/test_cryptodev_blockcipher.h | 1 + test/test/test_cryptodev_des_test_vectors.h | 42 ++++--- test/test/test_cryptodev_hash_test_vectors.h | 60 ++++++---- 7 files changed, 301 insertions(+), 66 deletions(-) diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c index 1bed65d..d99be69 100644 --- a/test/test/test_cryptodev.c +++ b/test/test/test_cryptodev.c @@ -364,6 +364,23 @@ testsuite_setup(void) } } + /* Create an CCP device if required */ + if (gbl_driver_id == rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_CCP_PMD))) { + nb_devs = rte_cryptodev_device_count_by_driver( + rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_CCP_PMD))); + if (nb_devs < 1) { + ret = rte_vdev_init( + RTE_STR(CRYPTODEV_NAME_CCP_PMD), + NULL); + + TEST_ASSERT(ret == 0, "Failed to create " + "instance of pmd : %s", + RTE_STR(CRYPTODEV_NAME_CCP_PMD)); + } + } + #ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER if (gbl_driver_id == rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD))) { @@ -1753,6 +1770,44 @@ test_AES_cipheronly_openssl_all(void) } static int +test_AES_chain_ccp_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_CCP_PMD)), + BLKCIPHER_AES_CHAIN_TYPE); + + TEST_ASSERT_EQUAL(status, 0, "Test failed"); + + return TEST_SUCCESS; +} + +static int +test_AES_cipheronly_ccp_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_CCP_PMD)), + BLKCIPHER_AES_CIPHERONLY_TYPE); + + TEST_ASSERT_EQUAL(status, 0, "Test failed"); + + return TEST_SUCCESS; +} + +static int test_AES_chain_qat_all(void) { struct crypto_testsuite_params *ts_params = &testsuite_params; @@ -1924,6 +1979,25 @@ test_authonly_openssl_all(void) } static int +test_authonly_ccp_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_CCP_PMD)), + BLKCIPHER_AUTHONLY_TYPE); + + TEST_ASSERT_EQUAL(status, 0, "Test failed"); + + return TEST_SUCCESS; +} + +static int test_AES_chain_armv8_all(void) { struct crypto_testsuite_params *ts_params = &testsuite_params; @@ -4999,6 +5073,44 @@ test_3DES_cipheronly_dpaa2_sec_all(void) } static int +test_3DES_chain_ccp_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_CCP_PMD)), + BLKCIPHER_3DES_CHAIN_TYPE); + + TEST_ASSERT_EQUAL(status, 0, "Test failed"); + + return TEST_SUCCESS; +} + +static int +test_3DES_cipheronly_ccp_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_CCP_PMD)), + BLKCIPHER_3DES_CIPHERONLY_TYPE); + + TEST_ASSERT_EQUAL(status, 0, "Test failed"); + + return TEST_SUCCESS; +} + +static int test_3DES_cipheronly_qat_all(void) { struct crypto_testsuite_params *ts_params = &testsuite_params; @@ -9580,6 +9692,38 @@ static struct unit_test_suite cryptodev_mrvl_testsuite = { } }; +static struct unit_test_suite cryptodev_ccp_testsuite = { + .suite_name = "Crypto Device CCP Unit Test Suite", + .setup = testsuite_setup, + .teardown = testsuite_teardown, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, test_multi_session), + TEST_CASE_ST(ut_setup, ut_teardown, + test_multi_session_random_usage), + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_chain_ccp_all), + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_cipheronly_ccp_all), + TEST_CASE_ST(ut_setup, ut_teardown, + test_3DES_chain_ccp_all), + TEST_CASE_ST(ut_setup, ut_teardown, + test_3DES_cipheronly_ccp_all), + TEST_CASE_ST(ut_setup, ut_teardown, + test_authonly_ccp_all), + + /** Negative tests */ + TEST_CASE_ST(ut_setup, ut_teardown, + authentication_verify_HMAC_SHA1_fail_data_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + authentication_verify_HMAC_SHA1_fail_tag_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), + TEST_CASE_ST(ut_setup, ut_teardown, + auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), + + TEST_CASES_END() /**< NULL terminate unit test array */ + } +}; static int test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/) @@ -9801,6 +9945,22 @@ test_cryptodev_dpaa_sec(void /*argv __rte_unused, int argc __rte_unused*/) return unit_test_suite_runner(&cryptodev_dpaa_sec_testsuite); } +static int +test_cryptodev_ccp(void) +{ + gbl_driver_id = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_CCP_PMD)); + + if (gbl_driver_id == -1) { + RTE_LOG(ERR, USER1, "CCP PMD must be loaded. Check if " + "CONFIG_RTE_LIBRTE_PMD_CCP is enabled " + "in config file to run this testsuite.\n"); + return TEST_FAILED; + } + + return unit_test_suite_runner(&cryptodev_ccp_testsuite); +} + REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat); REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb); REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl); @@ -9813,3 +9973,4 @@ REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8); REGISTER_TEST_COMMAND(cryptodev_sw_mrvl_autotest, test_cryptodev_mrvl); REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec); REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec); +REGISTER_TEST_COMMAND(cryptodev_ccp_autotest, test_cryptodev_ccp); diff --git a/test/test/test_cryptodev.h b/test/test/test_cryptodev.h index 26bfbe6..9fa68f9 100644 --- a/test/test/test_cryptodev.h +++ b/test/test/test_cryptodev.h @@ -89,6 +89,7 @@ #define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec #define CRYPTODEV_NAME_SCHEDULER_PMD crypto_scheduler #define CRYPTODEV_NAME_MRVL_PMD crypto_mrvl +#define CRYPTODEV_NAME_CCP_PMD crypto_ccp /** * Write (spread) data from buffer to mbuf data diff --git a/test/test/test_cryptodev_aes_test_vectors.h b/test/test/test_cryptodev_aes_test_vectors.h index 9c13041..59ea211 100644 --- a/test/test/test_cryptodev_aes_test_vectors.h +++ b/test/test/test_cryptodev_aes_test_vectors.h @@ -1199,7 +1199,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CTR HMAC-SHA1 Decryption Digest " @@ -1212,7 +1213,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-192-CTR XCBC Encryption Digest", @@ -1251,7 +1253,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-256-CTR HMAC-SHA1 Decryption Digest " @@ -1264,7 +1267,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest", @@ -1277,7 +1281,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest " @@ -1311,7 +1316,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest " @@ -1332,7 +1338,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA256 Encryption Digest " @@ -1354,7 +1361,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA256 Decryption Digest " @@ -1374,7 +1382,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA512 Encryption Digest " @@ -1383,7 +1392,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { .op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN, .feature_mask = BLOCKCIPHER_TEST_FEATURE_SESSIONLESS, .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB | - BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA512 Encryption Digest " @@ -1407,7 +1417,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA512 Decryption Digest " @@ -1470,7 +1481,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA224 Decryption Digest " @@ -1482,7 +1494,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA384 Encryption Digest", @@ -1494,7 +1507,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA384 Decryption Digest " @@ -1507,7 +1521,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest " @@ -1516,7 +1531,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { .op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN, .feature_mask = BLOCKCIPHER_TEST_FEATURE_SESSIONLESS, .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 | - BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = @@ -1526,7 +1542,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = { .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC, .feature_mask = BLOCKCIPHER_TEST_FEATURE_SESSIONLESS, .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 | - BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, }; @@ -1541,7 +1558,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CBC Decryption", @@ -1553,7 +1571,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-192-CBC Encryption", @@ -1564,7 +1583,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_MB | BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-192-CBC Encryption Scater gather", @@ -1583,7 +1603,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_MB | BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-256-CBC Encryption", @@ -1595,7 +1616,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-256-CBC Decryption", @@ -1607,7 +1629,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-256-CBC OOP Encryption", @@ -1617,7 +1640,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-256-CBC OOP Decryption", @@ -1627,7 +1651,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CTR Encryption", @@ -1639,7 +1664,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CTR Decryption", @@ -1651,7 +1677,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-192-CTR Encryption", @@ -1662,7 +1689,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_MB | BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-192-CTR Decryption", @@ -1673,7 +1701,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_MB | BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-256-CTR Encryption", @@ -1685,7 +1714,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-256-CTR Decryption", @@ -1697,7 +1727,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "AES-128-CTR Encryption (12-byte IV)", diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c index 20f3296..8955d51 100644 --- a/test/test/test_cryptodev_blockcipher.c +++ b/test/test/test_cryptodev_blockcipher.c @@ -82,6 +82,8 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, int openssl_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)); + int ccp_pmd = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_CCP_PMD)); int scheduler_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD)); int armv8_pmd = rte_cryptodev_driver_id_get( @@ -122,7 +124,8 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, driver_id == qat_pmd || driver_id == openssl_pmd || driver_id == armv8_pmd || - driver_id == mrvl_pmd) { /* Fall through */ + driver_id == mrvl_pmd || + driver_id == ccp_pmd) { /* Fall through */ digest_len = tdata->digest.len; } else if (driver_id == aesni_mb_pmd || driver_id == scheduler_pmd) { @@ -583,6 +586,8 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool, int openssl_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)); + int ccp_pmd = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_CCP_PMD)); int dpaa2_sec_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)); int dpaa_sec_pmd = rte_cryptodev_driver_id_get( @@ -655,6 +660,8 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool, target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER; else if (driver_id == dpaa2_sec_pmd) target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC; + else if (driver_id == ccp_pmd) + target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_CCP; else if (driver_id == dpaa_sec_pmd) target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC; else if (driver_id == mrvl_pmd) diff --git a/test/test/test_cryptodev_blockcipher.h b/test/test/test_cryptodev_blockcipher.h index 67c78d4..b6824f6 100644 --- a/test/test/test_cryptodev_blockcipher.h +++ b/test/test/test_cryptodev_blockcipher.h @@ -55,6 +55,7 @@ #define BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC 0x0020 /* DPAA2_SEC flag */ #define BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC 0x0040 /* DPAA_SEC flag */ #define BLOCKCIPHER_TEST_TARGET_PMD_MRVL 0x0080 /* Marvell flag */ +#define BLOCKCIPHER_TEST_TARGET_PMD_CCP 0x0040 /* CCP flag */ #define BLOCKCIPHER_TEST_OP_CIPHER (BLOCKCIPHER_TEST_OP_ENCRYPT | \ BLOCKCIPHER_TEST_OP_DECRYPT) diff --git a/test/test/test_cryptodev_des_test_vectors.h b/test/test/test_cryptodev_des_test_vectors.h index d09e23d..1a794c4 100644 --- a/test/test/test_cryptodev_des_test_vectors.h +++ b/test/test/test_cryptodev_des_test_vectors.h @@ -1072,7 +1072,8 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-128-CBC HMAC-SHA1 Decryption Digest Verify", @@ -1081,19 +1082,22 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-128-CBC SHA1 Encryption Digest", .test_data = &triple_des128cbc_sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-128-CBC SHA1 Decryption Digest Verify", .test_data = &triple_des128cbc_sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-192-CBC HMAC-SHA1 Encryption Digest", @@ -1103,7 +1107,8 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-192-CBC HMAC-SHA1 Decryption Digest Verify", @@ -1113,21 +1118,24 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-192-CBC SHA1 Encryption Digest", .test_data = &triple_des192cbc_sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN, .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-192-CBC SHA1 Decryption Digest Verify", .test_data = &triple_des192cbc_sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC, .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-128-CTR HMAC-SHA1 Encryption Digest", @@ -1208,7 +1216,8 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = { .test_data = &triple_des128cbc_hmac_sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN, .feature_mask = BLOCKCIPHER_TEST_FEATURE_SESSIONLESS, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = @@ -1217,7 +1226,8 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = { .test_data = &triple_des128cbc_hmac_sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC, .feature_mask = BLOCKCIPHER_TEST_FEATURE_SESSIONLESS, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, }; @@ -1229,7 +1239,8 @@ static const struct blockcipher_test_case triple_des_cipheronly_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-128-CBC Decryption", @@ -1238,7 +1249,8 @@ static const struct blockcipher_test_case triple_des_cipheronly_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC + BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-192-CBC Encryption", @@ -1248,7 +1260,8 @@ static const struct blockcipher_test_case triple_des_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-192-CBC Decryption", @@ -1258,7 +1271,8 @@ static const struct blockcipher_test_case triple_des_cipheronly_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_QAT | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_MRVL + BLOCKCIPHER_TEST_TARGET_PMD_MRVL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "3DES-128-CTR Encryption", diff --git a/test/test/test_cryptodev_hash_test_vectors.h b/test/test/test_cryptodev_hash_test_vectors.h index 3b840ce..e0a8f2e 100644 --- a/test/test/test_cryptodev_hash_test_vectors.h +++ b/test/test/test_cryptodev_hash_test_vectors.h @@ -386,13 +386,15 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_descr = "SHA1 Digest", .test_data = &sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA1 Digest Verify", .test_data = &sha1_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA1 Digest", @@ -403,7 +405,8 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA1 Digest Verify", @@ -414,19 +417,22 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA224 Digest", .test_data = &sha224_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA224 Digest Verify", .test_data = &sha224_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA224 Digest", @@ -437,7 +443,8 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA224 Digest Verify", @@ -448,19 +455,22 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA256 Digest", .test_data = &sha256_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA256 Digest Verify", .test_data = &sha256_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA256 Digest", @@ -471,7 +481,8 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA256 Digest Verify", @@ -482,19 +493,22 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA384 Digest", .test_data = &sha384_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA384 Digest Verify", .test_data = &sha384_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA384 Digest", @@ -505,7 +519,8 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA384 Digest Verify", @@ -516,19 +531,22 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA512 Digest", .test_data = &sha512_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "SHA512 Digest Verify", .test_data = &sha512_test_vector, .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY, - .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA512 Digest", @@ -539,7 +557,8 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, { .test_descr = "HMAC-SHA512 Digest Verify", @@ -550,7 +569,8 @@ static const struct blockcipher_test_case hash_test_cases[] = { BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER | BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC | BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC | - BLOCKCIPHER_TEST_TARGET_PMD_QAT + BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_CCP }, }; -- 2.7.4