From patchwork Mon Apr 6 15:35:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mairtin o Loingsigh X-Patchwork-Id: 67868 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B5C4A0577; Mon, 6 Apr 2020 17:36:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59D211BF30; Mon, 6 Apr 2020 17:36:16 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6B1942BE2 for ; Mon, 6 Apr 2020 17:36:15 +0200 (CEST) IronPort-SDR: BCRWyH0zuWG9MRQVHFLWTxyLDApwzeqgaKLrAHpgr3jnWLrRZm19u/zZzuYC83kgp5YqwrZoet HrQjvDbrenvw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 08:36:14 -0700 IronPort-SDR: N9Qa0VKOuR2YdA1Vb6Hug6MrEdBwuopegtVJYNzL17nxjtbfcYGaVyv9wNwrbt4OvFs++Ztbjj oX99qZp8KJwg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,351,1580803200"; d="scan'208";a="450874420" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga005.fm.intel.com with ESMTP; 06 Apr 2020 08:36:13 -0700 Received: from sivswdev08.ir.intel.com (sivswdev08.ir.intel.com [10.237.217.47]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 036FaCKf004910; Mon, 6 Apr 2020 16:36:12 +0100 Received: from sivswdev08.ir.intel.com (localhost [127.0.0.1]) by sivswdev08.ir.intel.com with ESMTP id 036FaCmr019683; Mon, 6 Apr 2020 16:36:12 +0100 Received: (from moloings@localhost) by sivswdev08.ir.intel.com with LOCAL id 036FaCSA019679; Mon, 6 Apr 2020 16:36:12 +0100 From: Mairtin o Loingsigh To: pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, Mairtin o Loingsigh Date: Mon, 6 Apr 2020 16:35:46 +0100 Message-Id: <1586187346-19020-2-git-send-email-mairtin.oloingsigh@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1586187346-19020-1-git-send-email-mairtin.oloingsigh@intel.com> References: <1586187346-19020-1-git-send-email-mairtin.oloingsigh@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds test vectors for AES-256 and sets AESNI-MB as the target PMD Signed-off-by: Mairtin o Loingsigh Acked-by: Pablo de Lara --- app/test/test_cryptodev_aes_test_vectors.h | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h index 08ae09390..df338756f 100644 --- a/app/test/test_cryptodev_aes_test_vectors.h +++ b/app/test/test_cryptodev_aes_test_vectors.h @@ -5,6 +5,15 @@ #ifndef TEST_CRYPTODEV_AES_TEST_VECTORS_H_ #define TEST_CRYPTODEV_AES_TEST_VECTORS_H_ +#ifdef RTE_LIBRTE_PMD_AESNI_MB +#include +#endif + +#if !defined(IMB_VERSION_NUM) +#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c)) +#define IMB_VERSION_NUM IMB_VERSION(0, 49, 0) +#endif + /* test vectors */ static const uint8_t plaintext_aes128ctr[] = { 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, @@ -2739,79 +2748,151 @@ static const struct blockcipher_test_case aes_docsis_test_cases[] = { .test_descr = "AES-256-DOCSIS-BPI Full Block Encryption", .test_data = &aes_test_data_docsis_4, .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI Runt Block Encryption", .test_data = &aes_test_data_docsis_5, .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI Uneven Encryption", .test_data = &aes_test_data_docsis_6, .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI Full Block Decryption", .test_data = &aes_test_data_docsis_4, .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI Runt Block Decryption", .test_data = &aes_test_data_docsis_5, .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI Uneven Decryption", .test_data = &aes_test_data_docsis_6, .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI OOP Full Block Encryption", .test_data = &aes_test_data_docsis_4, .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI OOP Runt Block Encryption", .test_data = &aes_test_data_docsis_5, .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI OOP Uneven Block Encryption", .test_data = &aes_test_data_docsis_6, .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI OOP Full Block Decryption", .test_data = &aes_test_data_docsis_4, .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI OOP Runt Block Decryption", .test_data = &aes_test_data_docsis_5, .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, { .test_descr = "AES-256-DOCSIS-BPI OOP Uneven Block Decryption", .test_data = &aes_test_data_docsis_6, .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP, +#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3) + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#else + .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT +#endif }, }; #endif /* TEST_CRYPTODEV_AES_TEST_VECTORS_H_ */