From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BCA9C9141 for ; Wed, 16 Aug 2017 10:16:02 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2017 01:16:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,381,1498546800"; d="scan'208";a="300739349" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by fmsmga004.fm.intel.com with ESMTP; 16 Aug 2017 01:16:01 -0700 From: Pablo de Lara To: yliu@fridaylinux.org Cc: stable@dpdk.org, Pablo de Lara Date: Wed, 16 Aug 2017 01:16:15 +0100 Message-Id: <20170816001616.8036-5-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170816001616.8036-1-pablo.de.lara.guarch@intel.com> References: <20170816001616.8036-1-pablo.de.lara.guarch@intel.com> Subject: [dpdk-stable] [PATCH 4/5] doc: remove incorrect limitation on QAT PMD X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2017 08:16:03 -0000 [ backported from upstream commit de938b79b2fce7e15389aad1543e778a8721e3a5 ] QAT supports authentication only operations, for any authentication algorithm (such as SHA1-HMAC), as long as it is supported by QAT, so it means that it is not necessary to create a chained operation in order to use these algorithms. Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") Signed-off-by: Pablo de Lara Acked-by: Fiona Trahe Acked-by: Declan Doherty --- app/test/test_cryptodev.c | 17 ++++++++++++++ app/test/test_cryptodev_hash_test_vectors.h | 36 +++++++++++++++++++---------- doc/guides/cryptodevs/qat.rst | 1 - 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 2754653..b544ab9 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -1545,6 +1545,22 @@ test_authonly_openssl_all(void) return TEST_SUCCESS; } +static int +test_authonly_qat_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->valid_devs[0], + RTE_CRYPTODEV_QAT_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, @@ -6034,6 +6050,7 @@ static struct unit_test_suite cryptodev_qat_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_qat_all), TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_cipheronly_qat_all), + TEST_CASE_ST(ut_setup, ut_teardown, test_authonly_qat_all), TEST_CASE_ST(ut_setup, ut_teardown, test_stats), /** AES GCM Authenticated Encryption */ diff --git a/app/test/test_cryptodev_hash_test_vectors.h b/app/test/test_cryptodev_hash_test_vectors.h index 9f095cf..1daf681 100644 --- a/app/test/test_cryptodev_hash_test_vectors.h +++ b/app/test/test_cryptodev_hash_test_vectors.h @@ -358,13 +358,15 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_descr = "HMAC-MD5 Digest", .test_data = &hmac_md5_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_QAT }, { .test_descr = "HMAC-MD5 Digest Verify", .test_data = &hmac_md5_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_QAT }, { .test_descr = "SHA1 Digest", @@ -382,13 +384,15 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_descr = "HMAC-SHA1 Digest", .test_data = &hmac_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_QAT }, { .test_descr = "HMAC-SHA1 Digest Verify", .test_data = &hmac_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_QAT }, { .test_descr = "SHA224 Digest", @@ -406,13 +410,15 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_descr = "HMAC-SHA224 Digest", .test_data = &hmac_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_QAT }, { .test_descr = "HMAC-SHA224 Digest Verify", .test_data = &hmac_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_QAT }, { .test_descr = "SHA256 Digest", @@ -430,13 +436,15 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_descr = "HMAC-SHA256 Digest", .test_data = &hmac_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_QAT }, { .test_descr = "HMAC-SHA256 Digest Verify", .test_data = &hmac_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_QAT }, { .test_descr = "SHA384 Digest", @@ -454,13 +462,15 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_descr = "HMAC-SHA384 Digest", .test_data = &hmac_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_QAT }, { .test_descr = "HMAC-SHA384 Digest Verify", .test_data = &hmac_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_QAT }, { .test_descr = "SHA512 Digest", @@ -478,13 +488,15 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_descr = "HMAC-SHA512 Digest", .test_data = &hmac_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_QAT }, { .test_descr = "HMAC-SHA512 Digest Verify", .test_data = &hmac_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_QAT }, }; diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst index a7b28eb..2173819 100644 --- a/doc/guides/cryptodevs/qat.rst +++ b/doc/guides/cryptodevs/qat.rst @@ -74,7 +74,6 @@ Limitations ----------- * Chained mbufs are not supported. -* Hash only is not supported except SNOW 3G UIA2 and KASUMI F9. * Cipher only is not supported except SNOW 3G UEA2, KASUMI F8 and 3DES. * Only supports the session-oriented API implementation (session-less APIs are not supported). * SNOW 3G (UEA2) and KASUMI (F8) supported only if cipher length, cipher offset fields are byte-aligned. -- 2.9.4