doc: remove incorrect limitation on QAT PMD
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 13 Jul 2017 05:36:47 +0000 (06:36 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 19 Jul 2017 11:10:41 +0000 (14:10 +0300)
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")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
doc/guides/cryptodevs/qat.rst
test/test/test_cryptodev.c
test/test/test_cryptodev_hash_test_vectors.h

index b2d05e5..7a510c9 100644 (file)
@@ -84,7 +84,6 @@ Supported AEAD algorithms:
 Limitations
 -----------
 
-* Hash only is not supported except SNOW 3G UIA2 and KASUMI F9.
 * 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.
 * SNOW 3G (UIA2) and KASUMI (F9) supported only if hash length, hash offset fields are byte-aligned.
index b068609..4836645 100644 (file)
@@ -1593,6 +1593,24 @@ test_authonly_mb_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->session_mpool,
+               ts_params->valid_devs[0],
+               rte_cryptodev_driver_id_get(
+               RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)),
+               BLKCIPHER_AUTHONLY_TYPE);
+
+       TEST_ASSERT_EQUAL(status, 0, "Test failed");
+
+       return TEST_SUCCESS;
+}
 static int
 test_AES_chain_mb_all(void)
 {
@@ -7994,6 +8012,7 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {
                                                test_AES_docsis_qat_all),
                TEST_CASE_ST(ut_setup, ut_teardown,
                                                test_DES_docsis_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 */
index 24353fc..b7fe9d9 100644 (file)
@@ -367,7 +367,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "HMAC-MD5 Digest Verify",
@@ -376,7 +377,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "SHA1 Digest",
@@ -397,7 +399,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "HMAC-SHA1 Digest Verify",
@@ -406,7 +409,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "SHA224 Digest",
@@ -427,7 +431,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "HMAC-SHA224 Digest Verify",
@@ -436,7 +441,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "SHA256 Digest",
@@ -457,7 +463,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "HMAC-SHA256 Digest Verify",
@@ -466,7 +473,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "SHA384 Digest",
@@ -487,7 +495,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "HMAC-SHA384 Digest Verify",
@@ -496,7 +505,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "SHA512 Digest",
@@ -517,7 +527,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
        {
                .test_descr = "HMAC-SHA512 Digest Verify",
@@ -526,7 +537,8 @@ static const struct blockcipher_test_case hash_test_cases[] = {
                .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
                        BLOCKCIPHER_TEST_TARGET_PMD_MB |
                        BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
-                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC
+                       BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
+                       BLOCKCIPHER_TEST_TARGET_PMD_QAT
        },
 };