From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ABB5FA0597; Fri, 10 Apr 2020 17:19:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C3341D443; Fri, 10 Apr 2020 17:19:08 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 809451C247 for ; Fri, 10 Apr 2020 17:19:06 +0200 (CEST) IronPort-SDR: 5cxJBmbgOuHBNPqSsOj+mP8nFpY27n6vVfcT6atiRPb6jsBIwFt90lzc09RQJQFoTR4DTQeJqg wrG8FK+2citg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2020 08:19:05 -0700 IronPort-SDR: asxrCUOKW4Jkgc3LUiUROZHTJuTXn1nvX3DAzBbBPN4KtbbW7Grg6lQxF6mfy0lccNhqRskQFB /gEyIgTQVqpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,367,1580803200"; d="scan'208";a="425912288" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga005.jf.intel.com with ESMTP; 10 Apr 2020 08:19:04 -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 03AFJ4ow008130; Fri, 10 Apr 2020 16:19:04 +0100 Received: from sivswdev08.ir.intel.com (localhost [127.0.0.1]) by sivswdev08.ir.intel.com with ESMTP id 03AFJ3EF011126; Fri, 10 Apr 2020 16:19:03 +0100 Received: (from moloings@localhost) by sivswdev08.ir.intel.com with LOCAL id 03AFJ3x7011122; Fri, 10 Apr 2020 16:19:03 +0100 From: Mairtin o Loingsigh To: pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, Mairtin o Loingsigh Date: Fri, 10 Apr 2020 16:03:30 +0100 Message-Id: <1586531010-32279-2-git-send-email-mairtin.oloingsigh@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1586354671-25703-1-git-send-email-mairtin.oloingsigh@intel.com> References: <1586354671-25703-1-git-send-email-mairtin.oloingsigh@intel.com> Subject: [dpdk-dev] [PATCH v4 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 --- v2: Remove duplicate code --- 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_ */ -- 2.12.3