get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/13570/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 13570,
    "url": "http://patches.dpdk.org/api/patches/13570/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1465826893-20392-4-git-send-email-roy.fan.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1465826893-20392-4-git-send-email-roy.fan.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1465826893-20392-4-git-send-email-roy.fan.zhang@intel.com",
    "date": "2016-06-13T14:08:12",
    "name": "[dpdk-dev,v4,3/4] app/test: utilize new unified crypto AES test function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3b93f04ce6c7c50399c572e4c7f01263bb38221f",
    "submitter": {
        "id": 304,
        "url": "http://patches.dpdk.org/api/people/304/?format=api",
        "name": "Fan Zhang",
        "email": "roy.fan.zhang@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1465826893-20392-4-git-send-email-roy.fan.zhang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/13570/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/13570/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 0CE4D56A9;\n\tMon, 13 Jun 2016 16:09:58 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 8B3354CE6\n\tfor <dev@dpdk.org>; Mon, 13 Jun 2016 16:09:54 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga102.jf.intel.com with ESMTP; 13 Jun 2016 07:08:18 -0700",
            "from sie-lab-212-071.ir.intel.com (HELO silvfanzhan2.ir.intel.com)\n\t([10.237.212.71])\n\tby fmsmga004.fm.intel.com with ESMTP; 13 Jun 2016 07:08:17 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,466,1459839600\"; d=\"scan'208\";a=\"120964718\"",
        "From": "Fan Zhang <roy.fan.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "declan.doherty@intel.com",
        "Date": "Mon, 13 Jun 2016 15:08:12 +0100",
        "Message-Id": "<1465826893-20392-4-git-send-email-roy.fan.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1465826893-20392-1-git-send-email-roy.fan.zhang@intel.com>",
        "References": "<1465822420-8287-1-git-send-email-roy.fan.zhang@intel.com>\n\t<1465826893-20392-1-git-send-email-roy.fan.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 3/4] app/test: utilize new unified crypto AES\n\ttest function",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch replaces the AES test code with new unified crypto AES test\nfunction.\n\nSigned-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n app/test/test_cryptodev.c                      | 1613 ++----------------------\n app/test/test_cryptodev_aes_ctr_test_vectors.h |  257 ----\n 2 files changed, 122 insertions(+), 1748 deletions(-)\n delete mode 100644 app/test/test_cryptodev_aes_ctr_test_vectors.h",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 45e6daa..1730022 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -43,7 +43,7 @@\n #include \"test.h\"\n #include \"test_cryptodev.h\"\n \n-#include \"test_cryptodev_aes_ctr_test_vectors.h\"\n+#include \"test_cryptodev_aes.h\"\n #include \"test_cryptodev_snow3g_test_vectors.h\"\n #include \"test_cryptodev_snow3g_hash_test_vectors.h\"\n #include \"test_cryptodev_gcm_test_vectors.h\"\n@@ -111,19 +111,6 @@ setup_test_string(struct rte_mempool *mpool,\n \n \treturn m;\n }\n-static int\n-setup_oop_test_mbufs(struct rte_mbuf **ibuf, struct rte_mbuf **obuf,\n-\t\tstruct rte_mempool *mpool,\tconst char *string, size_t len,\n-\t\tuint8_t blocksize) {\n-\t*ibuf = setup_test_string(mpool, string, len, blocksize);\n-\tif (*ibuf == NULL)\n-\t\treturn -(EFAULT);\n-\t*obuf = setup_test_string(mpool, NULL, len, blocksize);\n-\tif (*obuf == NULL)\n-\t\treturn -(EFAULT);\n-\n-\treturn 0;\n-}\n \n #if HEX_DUMP\n static void\n@@ -890,1316 +877,80 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)\n \tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n \tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n \n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\t/* Validate obuf */\n-\tuint8_t *ciphertext = rte_pktmbuf_mtod_offset(ut_params->op->sym->m_src,\n-\t\t\tuint8_t *, CIPHER_IV_LENGTH_AES_CBC);\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(ciphertext,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"ciphertext data not as expected\");\n-\n-\tuint8_t *digest = ciphertext + QUOTE_512_BYTES;\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(digest,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA1_digest,\n-\t\t\tgbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD ?\n-\t\t\t\t\tTRUNCATED_DIGEST_BYTE_LENGTH_SHA1 :\n-\t\t\t\t\tDIGEST_BYTE_LENGTH_SHA1,\n-\t\t\t\"Generated digest data not as expected\");\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-\n-static int\n-test_AES_CBC_HMAC_SHA1_encrypt_digest_oop(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and space for digest */\n-\n-\tTEST_ASSERT_EQUAL(setup_oop_test_mbufs(&ut_params->ibuf,\n-\t\t\t&ut_params->obuf, ts_params->mbuf_pool, catch_22_quote,\n-\t\t\tQUOTE_512_BYTES, 0), 0,\n-\t\t\t\"Allocation of rte_mbuf failed\");\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->obuf,\n-\t\t\t\tDIGEST_BYTE_LENGTH_SHA1);\n-\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest, \"no room to append digest\");\n-\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = &ut_params->auth_xform;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = NULL;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;\n-\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA1;\n-\tut_params->auth_xform.auth.key.data = hmac_sha1_key;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA1;\n-\n-\tut_params->sess = rte_cryptodev_sym_session_create(\n-\t\t\tts_params->valid_devs[0],\n-\t\t\t&ut_params->cipher_xform);\n-\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\n-\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\tsym_op->m_dst = ut_params->obuf;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->obuf, QUOTE_512_BYTES);\n-\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA1;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\t/* Set crypto operation cipher parameters */\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(ut_params->ibuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tTEST_ASSERT_NOT_NULL(sym_op->cipher.iv.data,\n-\t\t\t\"Failed to prepend place for iv input\");\n-\n-\tTEST_ASSERT_NOT_NULL(rte_pktmbuf_prepend(ut_params->obuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC),\n-\t\t\t\"Failed to prepend place for iv output\");\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\t/* Validate obuf */\n-\tuint8_t *ciphertext;\n-\n-\tciphertext = rte_pktmbuf_mtod_offset(ut_params->op->sym->m_dst,\n-\t\t\tuint8_t *, CIPHER_IV_LENGTH_AES_CBC);\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(ciphertext,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"ciphertext data not as expected\");\n-\n-\tuint8_t *digest = ciphertext + QUOTE_512_BYTES;\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(digest,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA1_digest,\n-\t\t\tgbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD ?\n-\t\t\t\t\tTRUNCATED_DIGEST_BYTE_LENGTH_SHA1 :\n-\t\t\t\t\tDIGEST_BYTE_LENGTH_SHA1,\n-\t\t\t\"Generated digest data not as expected\");\n-\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-\n-static int\n-test_AES_CBC_HMAC_SHA1_decrypt_digest_oop_ver(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and digest */\n-\n-\tTEST_ASSERT_EQUAL(setup_oop_test_mbufs(&ut_params->ibuf,\n-\t\t\t&ut_params->obuf, ts_params->mbuf_pool,\n-\t\t\t(const char *)\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES, 0), 0,\n-\t\t\t\"Allocation of rte_mbuf failed\");\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA1);\n-\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest,\t\"no room to append digest\");\n-\n-\trte_memcpy(ut_params->digest,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA1_digest,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA1);\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = NULL;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = &ut_params->cipher_xform;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;\n-\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA1;\n-\tut_params->auth_xform.auth.key.data = hmac_sha1_key;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA1;\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess =\n-\t\trte_cryptodev_sym_session_create(ts_params->valid_devs[0],\n-\t\t\t\t\t\t&ut_params->auth_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\t/* attach symmetric crypto session to crypto operations */\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\tsym_op->m_dst = ut_params->obuf;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA1;\n-\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(ut_params->ibuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tTEST_ASSERT_NOT_NULL(sym_op->cipher.iv.data,\n-\t\t\t\"Failed to prepend place for iv input\");\n-\n-\tTEST_ASSERT_NOT_NULL(rte_pktmbuf_prepend(ut_params->obuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC),\n-\t\t\t\"Failed to prepend place for iv output\");\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"Digest verification failed\");\n-\n-\tut_params->obuf = ut_params->op->sym->m_dst;\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC,\n-\t\t\tcatch_22_quote,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Ciphertext data not as expected\");\n-\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-\n-static int\n-test_AES_CBC_HMAC_SHA1_encrypt_digest_sessionless(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and space for digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\tcatch_22_quote, QUOTE_512_BYTES, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA1);\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest, \"no room to append digest\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\tTEST_ASSERT_NOT_NULL(rte_crypto_op_sym_xforms_alloc(ut_params->op, 2),\n-\t\t\t\"failed to allocate space for crypto transforms\");\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\t/* Set crypto operation data parameters */\n-\tsym_op->xform->type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\n-\t/* cipher parameters */\n-\tsym_op->xform->cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;\n-\tsym_op->xform->cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tsym_op->xform->cipher.key.data = aes_cbc_key;\n-\tsym_op->xform->cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* hash parameters */\n-\tsym_op->xform->next->type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\n-\tsym_op->xform->next->auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;\n-\tsym_op->xform->next->auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;\n-\tsym_op->xform->next->auth.key.length = HMAC_KEY_LENGTH_SHA1;\n-\tsym_op->xform->next->auth.key.data = hmac_sha1_key;\n-\tsym_op->xform->next->auth.digest_length =\n-\t\t\tDIGEST_BYTE_LENGTH_SHA1;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA1;\n-\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(ut_params->ibuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tut_params->obuf = ut_params->op->sym->m_src;\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Ciphertext data not as expected\");\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC + QUOTE_512_BYTES,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA1_digest,\n-\t\t\tgbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD ?\n-\t\t\t\t\tTRUNCATED_DIGEST_BYTE_LENGTH_SHA1 :\n-\t\t\t\t\tDIGEST_BYTE_LENGTH_SHA1,\n-\t\t\t\"Generated digest data not as expected\");\n-\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-static int\n-test_AES_CBC_HMAC_SHA1_decrypt_digest_verify(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\t(const char *)\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA1);\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest,\t\"no room to append digest\");\n-\n-\trte_memcpy(ut_params->digest,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA1_digest,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA1);\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = NULL;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = &ut_params->cipher_xform;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;\n-\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA1;\n-\tut_params->auth_xform.auth.key.data = hmac_sha1_key;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA1;\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess =\n-\t\trte_cryptodev_sym_session_create(ts_params->valid_devs[0],\n-\t\t\t\t\t\t&ut_params->auth_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\t/* attach symmetric crypto session to crypto operations */\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA1;\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(ut_params->ibuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tut_params->obuf = ut_params->op->sym->m_src;\n-\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC,\n-\t\t\tcatch_22_quote,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Ciphertext data not as expected\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"Digest verification failed\");\n-\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-    /* **** AES counter mode tests **** */\n-\n-static int\n-test_AES_CTR_encrypt_digest(const struct aes_ctr_test_data *tdata)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\tstruct rte_crypto_sym_op *sym_op;\n-\n-\tuint8_t hash_key[tdata->auth_key.len];\n-\tuint8_t cipher_key[tdata->key.len];\n-\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\t(const char *)tdata->plaintext.data,\n-\t\t\ttdata->plaintext.len, 0);\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = &ut_params->auth_xform;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CTR;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;\n-\n-\trte_memcpy(cipher_key, tdata->key.data, tdata->key.len);\n-\tut_params->cipher_xform.cipher.key.data = cipher_key;\n-\tut_params->cipher_xform.cipher.key.length =\n-\t\t\ttdata->key.len;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = NULL;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;\n-\tut_params->auth_xform.auth.algo = tdata->auth_key.algo;\n-\tut_params->auth_xform.auth.key.length =\n-\t\t\ttdata->auth_key.len;\n-\trte_memcpy(hash_key, tdata->auth_key.data, tdata->auth_key.len);\n-\tut_params->auth_xform.auth.key.data = hash_key;\n-\tut_params->auth_xform.auth.digest_length = tdata->digest.len;\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess = rte_cryptodev_sym_session_create(\n-\t\t\tts_params->valid_devs[0],\n-\t\t\t&ut_params->cipher_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tsym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\t/* Set operation cipher parameters */\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(\n-\t\t\tsym_op->m_src, tdata->iv.len);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(sym_op->m_src);\n-\tsym_op->cipher.iv.length = tdata->iv.len;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, tdata->iv.data,\n-\t\t\ttdata->iv.len);\n-\n-\tsym_op->cipher.data.offset = tdata->iv.len;\n-\tsym_op->cipher.data.length = tdata->plaintext.len;\n-\n-\t/* Set operation authentication parameters */\n-\tsym_op->auth.digest.data = (uint8_t *)rte_pktmbuf_append(\n-\t\t\tsym_op->m_src, tdata->digest.len);\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tsym_op->m_src,\n-\t\t\ttdata->iv.len + tdata->ciphertext.len);\n-\tsym_op->auth.digest.length = tdata->digest.len;\n-\n-\tmemset(sym_op->auth.digest.data, 0, tdata->digest.len);\n-\n-\tsym_op->auth.data.offset = tdata->iv.len;\n-\tsym_op->auth.data.length = tdata->plaintext.len;\n-\n-\t/* Process crypto operation */\n-\tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op);\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tuint8_t *ciphertext = rte_pktmbuf_mtod_offset(ut_params->op->sym->m_src,\n-\t\t\tuint8_t *, tdata->iv.len);\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(ciphertext,\n-\t\t\ttdata->ciphertext.data,\n-\t\t\ttdata->ciphertext.len,\n-\t\t\t\"ciphertext data not as expected\");\n-\n-\tuint8_t *digest = ciphertext + tdata->ciphertext.len;\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(digest,\n-\t\t\ttdata->digest.data, tdata->digest.len,\n-\t\t\t\"Generated digest data not as expected\");\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-static int\n-test_AES_CTR_encrypt_digest_case_1(void)\n-{\n-\treturn test_AES_CTR_encrypt_digest(&aes_ctr_test_case_1);\n-}\n-static int\n-test_AES_CTR_encrypt_digest_case_2(void)\n-{\n-\treturn test_AES_CTR_encrypt_digest(&aes_ctr_test_case_2);\n-}\n-static int\n-test_AES_CTR_encrypt_digest_case_3(void)\n-{\n-\treturn test_AES_CTR_encrypt_digest(&aes_ctr_test_case_3);\n-}\n-\n-static int\n-test_AES_CTR_digest_verify_decrypt(const struct aes_ctr_test_data *tdata)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\tstruct rte_crypto_sym_op *sym_op;\n-\n-\tuint8_t hash_key[tdata->auth_key.len];\n-\tuint8_t cipher_key[tdata->key.len];\n-\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\t(const char *)tdata->ciphertext.data,\n-\t\t\ttdata->ciphertext.len, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\ttdata->digest.len);\n-\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest,\t\"no room to append digest\");\n-\n-\trte_memcpy(ut_params->digest,\n-\t\t\ttdata->digest.data,\n-\t\t\ttdata->digest.len);\n-\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = &ut_params->cipher_xform;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n-\tut_params->auth_xform.auth.algo = tdata->auth_key.algo;\n-\tut_params->auth_xform.auth.key.length = tdata->auth_key.len;\n-\trte_memcpy(hash_key, tdata->auth_key.data, tdata->auth_key.len);\n-\tut_params->auth_xform.auth.key.data =\n-\t\t\thash_key;\n-\tut_params->auth_xform.auth.digest_length = tdata->digest.len;\n-\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = NULL;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CTR;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;\n-\n-\trte_memcpy(cipher_key, tdata->key.data, tdata->key.len);\n-\tut_params->cipher_xform.cipher.key.data =\n-\t\t\tcipher_key;\n-\tut_params->cipher_xform.cipher.key.length = tdata->key.len;\n-\n-\tut_params->sess = rte_cryptodev_sym_session_create(\n-\t\t\tts_params->valid_devs[0],\n-\t\t\t&ut_params->auth_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tsym_op = ut_params->op->sym;\n-\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(\n-\t\t\tsym_op->m_src, tdata->iv.len);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(sym_op->m_src);\n-\tsym_op->cipher.iv.length = tdata->iv.len;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, tdata->iv.data,\n-\t\t\ttdata->iv.len);\n-\n-\tsym_op->cipher.data.offset = tdata->iv.len;\n-\tsym_op->cipher.data.length = tdata->ciphertext.len;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tsym_op->m_src,\n-\t\t\ttdata->iv.len + tdata->ciphertext.len);\n-\tsym_op->auth.digest.length = tdata->digest.len;\n-\n-\tsym_op->auth.data.offset = tdata->iv.len;\n-\tsym_op->auth.data.length = tdata->ciphertext.len;\n-\n-\tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op);\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tuint8_t *plaintext = rte_pktmbuf_mtod_offset(ut_params->op->sym->m_src,\n-\t\t\tuint8_t *, tdata->iv.len);\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(plaintext,\n-\t\t\ttdata->plaintext.data,\n-\t\t\ttdata->plaintext.len,\n-\t\t\t\"plaintext data not as expected\");\n-\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-static int\n-test_AES_CTR_digest_verify_decrypt_case_1(void)\n-{\n-\treturn test_AES_CTR_digest_verify_decrypt(&aes_ctr_test_case_1);\n-}\n-static int\n-test_AES_CTR_digest_verify_decrypt_case_2(void)\n-{\n-\treturn test_AES_CTR_digest_verify_decrypt(&aes_ctr_test_case_2);\n-}\n-static int\n-test_AES_CTR_digest_verify_decrypt_case_3(void)\n-{\n-\treturn test_AES_CTR_digest_verify_decrypt(&aes_ctr_test_case_3);\n-}\n-\n-\n-/* ***** AES-CBC / HMAC-SHA256 Hash Tests ***** */\n-\n-#define HMAC_KEY_LENGTH_SHA256\t(DIGEST_BYTE_LENGTH_SHA256)\n-\n-static uint8_t hmac_sha256_key[] = {\n-\t0x42, 0x1a, 0x7d, 0x3d, 0xf5, 0x82, 0x80, 0xf1,\n-\t0xF1, 0x35, 0x5C, 0x3B, 0xDD, 0x9A, 0x65, 0xBA,\n-\t0x58, 0x34, 0x85, 0x61, 0x1C, 0x42, 0x10, 0x76,\n-\t0x9a, 0x4f, 0x88, 0x1b, 0xb6, 0x8f, 0xd8, 0x60 };\n-\n-static const uint8_t catch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA256_digest[] = {\n-\t0xc8, 0x57, 0x57, 0x31, 0x03, 0xe0, 0x03, 0x55,\n-\t0x07, 0xc8, 0x9e, 0x7f, 0x48, 0x9a, 0x61, 0x9a,\n-\t0x68, 0xee, 0x03, 0x0e, 0x71, 0x75, 0xc7, 0xf4,\n-\t0x2e, 0x45, 0x26, 0x32, 0x7c, 0x12, 0x15, 0x15 };\n-\n-static int\n-test_AES_CBC_HMAC_SHA256_encrypt_digest(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and space for digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\tcatch_22_quote,\tQUOTE_512_BYTES, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA256);\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest, \"no room to append digest\");\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = &ut_params->auth_xform;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = NULL;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC;\n-\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA256;\n-\tut_params->auth_xform.auth.key.data = hmac_sha256_key;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA256;\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess = rte_cryptodev_sym_session_create(\n-\t\t\tts_params->valid_devs[0],\n-\t\t\t&ut_params->cipher_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA256;\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(ut_params->ibuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tut_params->obuf = ut_params->op->sym->m_src;\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Ciphertext data not as expected\");\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC + QUOTE_512_BYTES,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA256_digest,\n-\t\t\tgbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD ?\n-\t\t\t\t\tTRUNCATED_DIGEST_BYTE_LENGTH_SHA256 :\n-\t\t\t\t\tDIGEST_BYTE_LENGTH_SHA256,\n-\t\t\t\"Generated digest data not as expected\");\n-\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-static int\n-test_AES_CBC_HMAC_SHA256_decrypt_digest_verify(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\t(const char *)\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA256);\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest,\t\"no room to append digest\");\n-\n-\trte_memcpy(ut_params->digest,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA256_digest,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA256);\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = NULL;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = &ut_params->cipher_xform;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC;\n-\tut_params->auth_xform.auth.key.data = hmac_sha256_key;\n-\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA256;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA256;\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess =\n-\t\trte_cryptodev_sym_session_create(ts_params->valid_devs[0],\n-\t\t\t\t\t\t&ut_params->auth_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\n-\t/* Set crypto operation data parameters */\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA256;\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(\n-\t\t\tut_params->ibuf, CIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tut_params->obuf = ut_params->op->sym->m_src;\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC, catch_22_quote,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Plaintext data not as expected\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"Digest verification failed\");\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-/* ***** AES-CBC / HMAC-SHA512 Hash Tests ***** */\n-\n-#define HMAC_KEY_LENGTH_SHA512  (DIGEST_BYTE_LENGTH_SHA512)\n-\n-static uint8_t hmac_sha512_key[] = {\n-\t0x42, 0x1a, 0x7d, 0x3d, 0xf5, 0x82, 0x80, 0xf1,\n-\t0xF1, 0x35, 0x5C, 0x3B, 0xDD, 0x9A, 0x65, 0xBA,\n-\t0x58, 0x34, 0x85, 0x65, 0x1C, 0x42, 0x50, 0x76,\n-\t0x9a, 0xaf, 0x88, 0x1b, 0xb6, 0x8f, 0xf8, 0x60,\n-\t0xa2, 0x5a, 0x7f, 0x3f, 0xf4, 0x72, 0x70, 0xf1,\n-\t0xF5, 0x35, 0x4C, 0x3B, 0xDD, 0x90, 0x65, 0xB0,\n-\t0x47, 0x3a, 0x75, 0x61, 0x5C, 0xa2, 0x10, 0x76,\n-\t0x9a, 0xaf, 0x77, 0x5b, 0xb6, 0x7f, 0xf7, 0x60 };\n-\n-static const uint8_t catch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA512_digest[] = {\n-\t0x5D, 0x54, 0x66, 0xC1, 0x6E, 0xBC, 0x04, 0xB8,\n-\t0x46, 0xB8, 0x08, 0x6E, 0xE0, 0xF0, 0x43, 0x48,\n-\t0x37, 0x96, 0x9C, 0xC6, 0x9C, 0xC2, 0x1E, 0xE8,\n-\t0xF2, 0x0C, 0x0B, 0xEF, 0x86, 0xA2, 0xE3, 0x70,\n-\t0x95, 0xC8, 0xB3, 0x06, 0x47, 0xA9, 0x90, 0xE8,\n-\t0xA0, 0xC6, 0x72, 0x69, 0x05, 0xC0, 0x0D, 0x0E,\n-\t0x21, 0x96, 0x65, 0x93, 0x74, 0x43, 0x2A, 0x1D,\n-\t0x2E, 0xBF, 0xC2, 0xC2, 0xEE, 0xCC, 0x2F, 0x0A };\n-\n-static int\n-test_AES_CBC_HMAC_SHA512_encrypt_digest(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and space for digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\tcatch_22_quote,\tQUOTE_512_BYTES, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA512);\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest, \"no room to append digest\");\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = &ut_params->auth_xform;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = NULL;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA512_HMAC;\n-\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA512;\n-\tut_params->auth_xform.auth.key.data = hmac_sha512_key;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA512;\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess =\n-\t\trte_cryptodev_sym_session_create(ts_params->valid_devs[0],\n-\t\t\t\t\t\t&ut_params->cipher_xform);\n-\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA512;\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(ut_params->ibuf,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tut_params->obuf = ut_params->op->sym->m_src;\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Ciphertext data not as expected\");\n-\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC + QUOTE_512_BYTES,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA512_digest,\n-\t\t\tgbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD ?\n-\t\t\t\t\tTRUNCATED_DIGEST_BYTE_LENGTH_SHA512 :\n-\t\t\t\t\tDIGEST_BYTE_LENGTH_SHA512,\n-\t\t\t\"Generated digest data not as expected\");\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-\n-static int\n-test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(\n-\t\tstruct crypto_unittest_params *ut_params);\n-\n-static int\n-test_AES_CBC_HMAC_SHA512_decrypt_perform(struct rte_cryptodev_sym_session *sess,\n-\t\tstruct crypto_unittest_params *ut_params,\n-\t\tstruct crypto_testsuite_params *ts_params);\n-\n-static int\n-test_AES_CBC_HMAC_SHA512_decrypt_digest_verify(void)\n-{\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\n-\tTEST_ASSERT(test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(\n-\t\t\tut_params) == TEST_SUCCESS,\n-\t\t\t\"Failed to create session params\");\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess =\n-\t\trte_cryptodev_sym_session_create(ts_params->valid_devs[0],\n-\t\t\t\t\t\t&ut_params->auth_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\treturn test_AES_CBC_HMAC_SHA512_decrypt_perform(ut_params->sess,\n-\t\t\tut_params, ts_params);\n-}\n-\n-static int\n-test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(\n-\t\tstruct crypto_unittest_params *ut_params)\n-{\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = NULL;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = &ut_params->cipher_xform;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA512_HMAC;\n-\tut_params->auth_xform.auth.key.data = hmac_sha512_key;\n-\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA512;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA512;\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-\n-static int\n-test_AES_CBC_HMAC_SHA512_decrypt_perform(struct rte_cryptodev_sym_session *sess,\n-\t\tstruct crypto_unittest_params *ut_params,\n-\t\tstruct crypto_testsuite_params *ts_params)\n-{\n-\t/* Generate test mbuf data and digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\t(const char *)\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA512);\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest, \"no room to append digest\");\n-\n-\trte_memcpy(ut_params->digest,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA512_digest,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA512);\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\trte_crypto_op_attach_sym_session(ut_params->op, sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA512;\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(\n-\t\t\tut_params->ibuf, CIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, 0);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Process crypto operation */\n-\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op), \"failed to process sym crypto op\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto op processing failed\");\n-\n-\tut_params->obuf = ut_params->op->sym->m_src;\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC, catch_22_quote,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Plaintext data not as expected\");\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"Digest verification failed\");\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-/* ***** AES-CBC / HMAC-AES_XCBC Chain Tests ***** */\n-\n-static uint8_t aes_cbc_hmac_aes_xcbc_key[] = {\n-\t0x87, 0x61, 0x54, 0x53, 0xC4, 0x6D, 0xDD, 0x51,\n-\t0xE1, 0x9F, 0x86, 0x64, 0x39, 0x0A, 0xE6, 0x59\n-\t};\n-\n-static const uint8_t  catch_22_quote_2_512_bytes_HMAC_AES_XCBC_digest[] = {\n-\t0xE0, 0xAC, 0x9A, 0xC4, 0x22, 0x64, 0x35, 0x89,\n-\t0x77, 0x1D, 0x8B, 0x75\n-\t};\n-\n-static int\n-test_AES_CBC_HMAC_AES_XCBC_encrypt_digest(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\n-\t/* Generate test mbuf data and space for digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\tcatch_22_quote, QUOTE_512_BYTES, 0);\n-\n-\t/* Setup Cipher Parameters */\n-\tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.next = &ut_params->auth_xform;\n-\n-\tut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;\n-\tut_params->cipher_xform.cipher.key.data = aes_cbc_key;\n-\tut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;\n-\n-\t/* Setup HMAC Parameters */\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.next = NULL;\n-\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC;\n-\tut_params->auth_xform.auth.key.length = AES_XCBC_MAC_KEY_SZ;\n-\tut_params->auth_xform.auth.key.data = aes_cbc_hmac_aes_xcbc_key;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_AES_XCBC;\n-\n-\t/* Create Crypto session*/\n-\tut_params->sess = rte_cryptodev_sym_session_create(\n-\t\t\tts_params->valid_devs[0],\n-\t\t\t&ut_params->cipher_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\n-\t/* Set operation cipher parameters */\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(\n-\t\t\tsym_op->m_src, CIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(sym_op->m_src);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Set operation authentication parameters */\n-\tsym_op->auth.digest.data = (uint8_t *)rte_pktmbuf_append(\n-\t\t\tsym_op->m_src, DIGEST_BYTE_LENGTH_AES_XCBC);\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tsym_op->m_src,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC + QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_AES_XCBC;\n-\n-\tmemset(sym_op->auth.digest.data, 0, DIGEST_BYTE_LENGTH_AES_XCBC);\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n+\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n+\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n \n+\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n+\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n \n \t/* Process crypto operation */\n-\tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op, \"failed to process sym crypto op\");\n+\tTEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0],\n+\t\t\tut_params->op), \"failed to process sym crypto op\");\n \n \tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n \t\t\t\"crypto op processing failed\");\n \n \t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod_offset(ut_params->op->sym->m_src,\n-\t\t\t\t\tuint8_t *, CIPHER_IV_LENGTH_AES_CBC),\n+\tuint8_t *ciphertext = rte_pktmbuf_mtod_offset(ut_params->op->sym->m_src,\n+\t\t\tuint8_t *, CIPHER_IV_LENGTH_AES_CBC);\n+\n+\tTEST_ASSERT_BUFFERS_ARE_EQUAL(ciphertext,\n \t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n \t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Ciphertext data not as expected\");\n+\t\t\t\"ciphertext data not as expected\");\n \n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod_offset(\n-\t\t\t\t\tut_params->op->sym->m_src, uint8_t *,\n-\t\t\t\t\tCIPHER_IV_LENGTH_AES_CBC +\n-\t\t\t\t\tQUOTE_512_BYTES),\n-\t\t\tcatch_22_quote_2_512_bytes_HMAC_AES_XCBC_digest,\n-\t\t\tDIGEST_BYTE_LENGTH_AES_XCBC,\n+\tuint8_t *digest = ciphertext + QUOTE_512_BYTES;\n+\n+\tTEST_ASSERT_BUFFERS_ARE_EQUAL(digest,\n+\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA1_digest,\n+\t\t\tgbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD ?\n+\t\t\t\t\tTRUNCATED_DIGEST_BYTE_LENGTH_SHA1 :\n+\t\t\t\t\tDIGEST_BYTE_LENGTH_SHA1,\n \t\t\t\"Generated digest data not as expected\");\n \n \treturn TEST_SUCCESS;\n }\n \n+/* ***** AES-CBC / HMAC-SHA512 Hash Tests ***** */\n+\n+#define HMAC_KEY_LENGTH_SHA512  (DIGEST_BYTE_LENGTH_SHA512)\n+\n+static uint8_t hmac_sha512_key[] = {\n+\t0x42, 0x1a, 0x7d, 0x3d, 0xf5, 0x82, 0x80, 0xf1,\n+\t0xF1, 0x35, 0x5C, 0x3B, 0xDD, 0x9A, 0x65, 0xBA,\n+\t0x58, 0x34, 0x85, 0x65, 0x1C, 0x42, 0x50, 0x76,\n+\t0x9a, 0xaf, 0x88, 0x1b, 0xb6, 0x8f, 0xf8, 0x60,\n+\t0xa2, 0x5a, 0x7f, 0x3f, 0xf4, 0x72, 0x70, 0xf1,\n+\t0xF5, 0x35, 0x4C, 0x3B, 0xDD, 0x90, 0x65, 0xB0,\n+\t0x47, 0x3a, 0x75, 0x61, 0x5C, 0xa2, 0x10, 0x76,\n+\t0x9a, 0xaf, 0x77, 0x5b, 0xb6, 0x7f, 0xf7, 0x60 };\n+\n+static const uint8_t catch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA512_digest[] = {\n+\t0x5D, 0x54, 0x66, 0xC1, 0x6E, 0xBC, 0x04, 0xB8,\n+\t0x46, 0xB8, 0x08, 0x6E, 0xE0, 0xF0, 0x43, 0x48,\n+\t0x37, 0x96, 0x9C, 0xC6, 0x9C, 0xC2, 0x1E, 0xE8,\n+\t0xF2, 0x0C, 0x0B, 0xEF, 0x86, 0xA2, 0xE3, 0x70,\n+\t0x95, 0xC8, 0xB3, 0x06, 0x47, 0xA9, 0x90, 0xE8,\n+\t0xA0, 0xC6, 0x72, 0x69, 0x05, 0xC0, 0x0D, 0x0E,\n+\t0x21, 0x96, 0x65, 0x93, 0x74, 0x43, 0x2A, 0x1D,\n+\t0x2E, 0xBF, 0xC2, 0xC2, 0xEE, 0xCC, 0x2F, 0x0A };\n+\n+\n+\n static int\n-test_AES_CBC_HMAC_AES_XCBC_decrypt_digest_verify(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n+test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(\n+\t\tstruct crypto_unittest_params *ut_params);\n \n-\t/* Generate test mbuf data and space for digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t(const char *)catch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\tQUOTE_512_BYTES, 0);\n+static int\n+test_AES_CBC_HMAC_SHA512_decrypt_perform(struct rte_cryptodev_sym_session *sess,\n+\t\tstruct crypto_unittest_params *ut_params,\n+\t\tstruct crypto_testsuite_params *ts_params);\n+\n+\n+static int\n+test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(\n+\t\tstruct crypto_unittest_params *ut_params)\n+{\n \n \t/* Setup Cipher Parameters */\n \tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n@@ -2215,16 +966,33 @@ test_AES_CBC_HMAC_AES_XCBC_decrypt_digest_verify(void)\n \tut_params->auth_xform.next = &ut_params->cipher_xform;\n \n \tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n-\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC;\n-\tut_params->auth_xform.auth.key.length = AES_XCBC_MAC_KEY_SZ;\n-\tut_params->auth_xform.auth.key.data = aes_cbc_hmac_aes_xcbc_key;\n-\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_AES_XCBC;\n+\tut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA512_HMAC;\n+\tut_params->auth_xform.auth.key.data = hmac_sha512_key;\n+\tut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA512;\n+\tut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA512;\n \n-\t/* Create Crypto session*/\n-\tut_params->sess =\n-\t\trte_cryptodev_sym_session_create(ts_params->valid_devs[0],\n-\t\t\t\t\t\t&ut_params->auth_xform);\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n+\treturn TEST_SUCCESS;\n+}\n+\n+\n+static int\n+test_AES_CBC_HMAC_SHA512_decrypt_perform(struct rte_cryptodev_sym_session *sess,\n+\t\tstruct crypto_unittest_params *ut_params,\n+\t\tstruct crypto_testsuite_params *ts_params)\n+{\n+\t/* Generate test mbuf data and digest */\n+\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n+\t\t\t(const char *)\n+\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n+\t\t\tQUOTE_512_BYTES, 0);\n+\n+\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n+\t\t\tDIGEST_BYTE_LENGTH_SHA512);\n+\tTEST_ASSERT_NOT_NULL(ut_params->digest, \"no room to append digest\");\n+\n+\trte_memcpy(ut_params->digest,\n+\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA512_digest,\n+\t\t\tDIGEST_BYTE_LENGTH_SHA512);\n \n \t/* Generate Crypto op data structure */\n \tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n@@ -2232,34 +1000,25 @@ test_AES_CBC_HMAC_AES_XCBC_decrypt_digest_verify(void)\n \tTEST_ASSERT_NOT_NULL(ut_params->op,\n \t\t\t\"Failed to allocate symmetric crypto operation struct\");\n \n-\t/* Set crypto operation data parameters */\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n+\trte_crypto_op_attach_sym_session(ut_params->op, sess);\n \n \tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n \n \t/* set crypto operation source mbuf */\n \tsym_op->m_src = ut_params->ibuf;\n \n-\n-\tsym_op->auth.digest.data = (uint8_t *)rte_pktmbuf_append(\n-\t\t\t\tut_params->ibuf, DIGEST_BYTE_LENGTH_AES_XCBC);\n-\tTEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,\n-\t\t\t\"no room to append digest\");\n-\n+\tsym_op->auth.digest.data = ut_params->digest;\n \tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n \t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_AES_XCBC;\n-\n-\trte_memcpy(sym_op->auth.digest.data,\n-\t\t\tcatch_22_quote_2_512_bytes_HMAC_AES_XCBC_digest,\n-\t\t\tDIGEST_BYTE_LENGTH_AES_XCBC);\n+\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA512;\n \n \tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n \tsym_op->auth.data.length = QUOTE_512_BYTES;\n \n \tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(\n \t\t\tut_params->ibuf, CIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys(ut_params->ibuf);\n+\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys_offset(\n+\t\t\tut_params->ibuf, 0);\n \tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n \n \trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n@@ -2282,14 +1041,45 @@ test_AES_CBC_HMAC_AES_XCBC_decrypt_digest_verify(void)\n \t\t\trte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +\n \t\t\tCIPHER_IV_LENGTH_AES_CBC, catch_22_quote,\n \t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Ciphertext data not as expected\");\n+\t\t\t\"Plaintext data not as expected\");\n \n+\t/* Validate obuf */\n \tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n \t\t\t\"Digest verification failed\");\n \n \treturn TEST_SUCCESS;\n }\n \n+static int\n+test_AES_mb_all(void)\n+{\n+\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n+\tint status;\n+\n+\tstatus = test_AES_all_tests(ts_params->mbuf_pool,\n+\t\tts_params->op_mpool, ts_params->valid_devs[0],\n+\t\tRTE_CRYPTODEV_AESNI_MB_PMD);\n+\n+\tTEST_ASSERT_EQUAL(status, 0, \"Test failed\");\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n+test_AES_qat_all(void)\n+{\n+\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n+\tint status;\n+\n+\tstatus = test_AES_all_tests(ts_params->mbuf_pool,\n+\t\tts_params->op_mpool, ts_params->valid_devs[0],\n+\t\tRTE_CRYPTODEV_QAT_SYM_PMD);\n+\n+\tTEST_ASSERT_EQUAL(status, 0, \"Test failed\");\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n /* ***** Snow3G Tests ***** */\n static int\n create_snow3g_hash_session(uint8_t dev_id,\n@@ -4046,92 +2836,6 @@ test_multi_session(void)\n }\n \n static int\n-test_not_in_place_crypto(void)\n-{\n-\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n-\tstruct crypto_unittest_params *ut_params = &unittest_params;\n-\tstruct rte_mbuf *dst_m = rte_pktmbuf_alloc(ts_params->mbuf_pool);\n-\n-\ttest_AES_CBC_HMAC_SHA512_decrypt_create_session_params(ut_params);\n-\n-\t/* Create multiple crypto sessions*/\n-\n-\tut_params->sess = rte_cryptodev_sym_session_create(\n-\t\t\tts_params->valid_devs[0], &ut_params->auth_xform);\n-\n-\tTEST_ASSERT_NOT_NULL(ut_params->sess, \"Session creation failed\");\n-\n-\n-\t/* Generate test mbuf data and digest */\n-\tut_params->ibuf = setup_test_string(ts_params->mbuf_pool,\n-\t\t\t(const char *)\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_ciphertext,\n-\t\t\tQUOTE_512_BYTES, 0);\n-\n-\tut_params->digest = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA512);\n-\tTEST_ASSERT_NOT_NULL(ut_params->digest, \"no room to append digest\");\n-\n-\trte_memcpy(ut_params->digest,\n-\t\t\tcatch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA512_digest,\n-\t\t\tDIGEST_BYTE_LENGTH_SHA512);\n-\n-\t/* Generate Crypto op data structure */\n-\tut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,\n-\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op,\n-\t\t\t\"Failed to allocate symmetric crypto operation struct\");\n-\n-\n-\t/* Set crypto operation data parameters */\n-\trte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);\n-\n-\tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n-\n-\t/* set crypto operation source mbuf */\n-\tsym_op->m_src = ut_params->ibuf;\n-\tsym_op->m_dst = dst_m;\n-\n-\tsym_op->auth.digest.data = ut_params->digest;\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, QUOTE_512_BYTES);\n-\tsym_op->auth.digest.length = DIGEST_BYTE_LENGTH_SHA512;\n-\n-\tsym_op->auth.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->auth.data.length = QUOTE_512_BYTES;\n-\n-\n-\tsym_op->cipher.iv.data = (uint8_t *)rte_pktmbuf_prepend(\n-\t\t\tut_params->ibuf, CIPHER_IV_LENGTH_AES_CBC);\n-\tsym_op->cipher.iv.phys_addr = rte_pktmbuf_mtophys_offset(\n-\t\t\tut_params->ibuf, 0);\n-\tsym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;\n-\n-\trte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv,\n-\t\t\tCIPHER_IV_LENGTH_AES_CBC);\n-\n-\tsym_op->cipher.data.offset = CIPHER_IV_LENGTH_AES_CBC;\n-\tsym_op->cipher.data.length = QUOTE_512_BYTES;\n-\n-\t/* Process crypto operation */\n-\tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n-\t\t\tut_params->op);\n-\tTEST_ASSERT_NOT_NULL(ut_params->op, \"no crypto operation returned\");\n-\n-\tTEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,\n-\t\t\t\"crypto operation processing failed\");\n-\n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\trte_pktmbuf_mtod(ut_params->op->sym->m_dst, char *),\n-\t\t\tcatch_22_quote,\n-\t\t\tQUOTE_512_BYTES,\n-\t\t\t\"Plaintext data not as expected\");\n-\n-\treturn TEST_SUCCESS;\n-}\n-\n-static int\n test_null_cipher_only_operation(void)\n {\n \tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n@@ -4501,43 +3205,7 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\t\ttest_multi_session),\n \n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA1_encrypt_digest_oop),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA1_decrypt_digest_oop_ver),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA1_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA1_decrypt_digest_verify),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA256_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA256_decrypt_digest_verify),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA512_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_SHA512_decrypt_digest_verify),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_encrypt_digest_case_1),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_encrypt_digest_case_2),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_encrypt_digest_case_3),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_digest_verify_decrypt_case_1),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_digest_verify_decrypt_case_2),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_digest_verify_decrypt_case_3),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_AES_XCBC_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CBC_HMAC_AES_XCBC_decrypt_digest_verify),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown, test_AES_qat_all),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown, test_stats),\n \n \t\t/** AES GCM Authenticated Encryption */\n@@ -4625,44 +3293,7 @@ static struct unit_test_suite cryptodev_aesni_mb_testsuite  = {\n \t.setup = testsuite_setup,\n \t.teardown = testsuite_teardown,\n \t.unit_test_cases = {\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_SHA1_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_SHA1_decrypt_digest_verify),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_SHA256_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_SHA256_decrypt_digest_verify),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_SHA512_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_SHA512_decrypt_digest_verify),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_AES_XCBC_encrypt_digest),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_AES_XCBC_decrypt_digest_verify),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_AES_CBC_HMAC_SHA1_encrypt_digest_sessionless),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_encrypt_digest_case_1),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_encrypt_digest_case_2),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_encrypt_digest_case_3),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_digest_verify_decrypt_case_1),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_digest_verify_decrypt_case_2),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\t\ttest_AES_CTR_digest_verify_decrypt_case_3),\n-\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_not_in_place_crypto),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown, test_AES_mb_all),\n \n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\ndiff --git a/app/test/test_cryptodev_aes_ctr_test_vectors.h b/app/test/test_cryptodev_aes_ctr_test_vectors.h\ndeleted file mode 100644\nindex 9ec5fbc..0000000\n--- a/app/test/test_cryptodev_aes_ctr_test_vectors.h\n+++ /dev/null\n@@ -1,257 +0,0 @@\n-/*-\n- *   BSD LICENSE\n- *\n- *   Copyright(c) 2016 Intel Corporation. All rights reserved.\n- *\n- *   Redistribution and use in source and binary forms, with or without\n- *   modification, are permitted provided that the following conditions\n- *   are met:\n- *\n- *\t * Redistributions of source code must retain the above copyright\n- *\t   notice, this list of conditions and the following disclaimer.\n- *\t * Redistributions in binary form must reproduce the above copyright\n- *\t   notice, this list of conditions and the following disclaimer in\n- *\t   the documentation and/or other materials provided with the\n- *\t   distribution.\n- *\t * Neither the name of Intel Corporation nor the names of its\n- *\t   contributors may be used to endorse or promote products derived\n- *\t   from this software without specific prior written permission.\n- *\n- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef TEST_CRYPTODEV_AES_CTR_TEST_VECTORS_H_\n-#define TEST_CRYPTODEV_AES_CTR_TEST_VECTORS_H_\n-\n-struct aes_ctr_test_data {\n-\n-\tstruct {\n-\t\tuint8_t data[64];\n-\t\tunsigned len;\n-\t} key;\n-\n-\tstruct {\n-\t\tuint8_t data[64] __rte_aligned(16);\n-\t\tunsigned len;\n-\t} iv;\n-\n-\tstruct {\n-\t\tuint8_t data[1024];\n-\t\tunsigned len;\n-\t} plaintext;\n-\n-\tstruct {\n-\t\tuint8_t data[1024];\n-\t\tunsigned len;\n-\t} ciphertext;\n-\n-\tstruct {\n-\t\tenum rte_crypto_auth_algorithm algo;\n-\t\tuint8_t data[64];\n-\t\tunsigned len;\n-\t} auth_key;\n-\n-\tstruct {\n-\t\tuint8_t data[1024];\n-\t\tunsigned len;\n-\t} digest;\n-};\n-\n-/* CTR-AES128-Encrypt-SHA1 test vector */\n-\n-static const struct aes_ctr_test_data aes_ctr_test_case_1 = {\n-\t.key = {\n-\t\t.data = {\n-\t\t\t0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,\n-\t\t\t0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C\n-\t\t},\n-\t\t.len = 16\n-\t},\n-\t.iv = {\n-\t\t.data = {\n-\t\t\t0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,\n-\t\t\t0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF\n-\t\t},\n-\t\t.len = 16\n-\t},\n-\t.plaintext = {\n-\t\t.data = {\n-\t\t\t0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96,\n-\t\t\t0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A,\n-\t\t\t0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, 0xAC, 0x9C,\n-\t\t\t0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51,\n-\t\t\t0x30, 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11,\n-\t\t\t0xE5, 0xFB, 0xC1, 0x19, 0x1A, 0x0A, 0x52, 0xEF,\n-\t\t\t0xF6, 0x9F, 0x24, 0x45, 0xDF, 0x4F, 0x9B, 0x17,\n-\t\t\t0xAD, 0x2B, 0x41, 0x7B, 0xE6, 0x6C, 0x37, 0x10\n-\t\t},\n-\t\t.len = 64\n-\t},\n-\t.ciphertext = {\n-\t\t.data = {\n-\t\t\t0x87, 0x4D, 0x61, 0x91, 0xB6, 0x20, 0xE3, 0x26,\n-\t\t\t0x1B, 0xEF, 0x68, 0x64, 0x99, 0x0D, 0xB6, 0xCE,\n-\t\t\t0x98, 0x06, 0xF6, 0x6B, 0x79, 0x70, 0xFD, 0xFF,\n-\t\t\t0x86, 0x17, 0x18, 0x7B, 0xB9, 0xFF, 0xFD, 0xFF,\n-\t\t\t0x5A, 0xE4, 0xDF, 0x3E, 0xDB, 0xD5, 0xD3, 0x5E,\n-\t\t\t0x5B, 0x4F, 0x09, 0x02, 0x0D, 0xB0, 0x3E, 0xAB,\n-\t\t\t0x1E, 0x03, 0x1D, 0xDA, 0x2F, 0xBE, 0x03, 0xD1,\n-\t\t\t0x79, 0x21, 0x70, 0xA0, 0xF3, 0x00, 0x9C, 0xEE\n-\t\t},\n-\t\t.len = 64\n-\t},\n-\t.auth_key = {\n-\t\t.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,\n-\t\t.data = {\n-\t\t\t0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,\n-\t\t\t0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,\n-\t\t\t0xDE, 0xF4, 0xDE, 0xAD\n-\t\t},\n-\t\t.len = 20\n-\t},\n-\t.digest = {\n-\t\t.data = {\n-\t\t\t0x9B, 0x6F, 0x0C, 0x43, 0xF5, 0xC1, 0x3E, 0xB0,\n-\t\t\t0xB1, 0x70, 0xB8, 0x2B, 0x33, 0x09, 0xD2, 0xB2,\n-\t\t\t0x56, 0x20, 0xFB, 0xFE\n-\t\t},\n-\t\t/* Limitation of Multi-buffer library */\n-\t\t.len = TRUNCATED_DIGEST_BYTE_LENGTH_SHA1\n-\t}\n-};\n-\n-/** AES-192-XCBC Encrypt test vector */\n-\n-static const struct aes_ctr_test_data aes_ctr_test_case_2 = {\n-\t.key = {\n-\t\t.data = {\n-\t\t\t0xCB, 0xC5, 0xED, 0x5B, 0xE7, 0x7C, 0xBD, 0x8C,\n-\t\t\t0x50, 0xD9, 0x30, 0xF2, 0xB5, 0x6A, 0x0E, 0x5F,\n-\t\t\t0xAA, 0xAE, 0xAD, 0xA2, 0x1F, 0x49, 0x52, 0xD4\n-\t\t},\n-\t\t.len = 24\n-\t},\n-\t.iv = {\n-\t\t.data = {\n-\t\t\t0x3F, 0x69, 0xA8, 0xCD, 0xE8, 0xF0, 0xEF, 0x40,\n-\t\t\t0xB8, 0x7A, 0x4B, 0xED, 0x2B, 0xAF, 0xBF, 0x57\n-\t\t},\n-\t\t.len = 16\n-\t},\n-\t.plaintext = {\n-\t\t.data = {\n-\t\t\t0x01, 0x0F, 0x10, 0x1F, 0x20, 0x1C, 0x0E, 0xB8,\n-\t\t\t0xFB, 0x5C, 0xCD, 0xCC, 0x1F, 0xF9, 0xAF, 0x0B,\n-\t\t\t0x95, 0x03, 0x74, 0x99, 0x49, 0xE7, 0x62, 0x55,\n-\t\t\t0xDA, 0xEA, 0x13, 0x20, 0x1D, 0xC6, 0xCC, 0xCC,\n-\t\t\t0xD1, 0x70, 0x75, 0x47, 0x02, 0x2F, 0xFB, 0x86,\n-\t\t\t0xBB, 0x6B, 0x23, 0xD2, 0xC9, 0x74, 0xD7, 0x7B,\n-\t\t\t0x08, 0x03, 0x3B, 0x79, 0x39, 0xBB, 0x91, 0x29,\n-\t\t\t0xDA, 0x14, 0x39, 0x8D, 0xFF, 0x81, 0x50, 0x96,\n-\t\t},\n-\t\t.len = 64\n-\t},\n-\t.ciphertext = {\n-\t\t.data = {\n-\t\t\t0x4A, 0x6C, 0xC8, 0xCC, 0x96, 0x2A, 0x13, 0x84,\n-\t\t\t0x1C, 0x36, 0x88, 0xE9, 0xE5, 0x94, 0x70, 0xB2,\n-\t\t\t0x14, 0x5B, 0x13, 0x80, 0xEA, 0xD8, 0x8D, 0x37,\n-\t\t\t0xFD, 0x70, 0xA8, 0x83, 0xE8, 0x2B, 0x88, 0x1E,\n-\t\t\t0xBA, 0x94, 0x3F, 0xF6, 0xB3, 0x1F, 0xDE, 0x34,\n-\t\t\t0xF3, 0x5B, 0x80, 0xE9, 0xAB, 0xF5, 0x1C, 0x29,\n-\t\t\t0xB6, 0xD9, 0x76, 0x2B, 0x06, 0xC6, 0x74, 0xF1,\n-\t\t\t0x59, 0x5E, 0x9E, 0xA5, 0x7B, 0x2D, 0xD7, 0xF0\n-\t\t},\n-\t\t.len = 64\n-\t},\n-\t.auth_key = {\n-\t\t.algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC,\n-\t\t.data = {\n-\t\t\t0x87, 0x61, 0x54, 0x53, 0xC4, 0x6D, 0xDD, 0x51,\n-\t\t\t0xE1, 0x9F, 0x86, 0x64, 0x39, 0x0A, 0xE6, 0x59\n-\t\t},\n-\t\t.len = 16\n-\t},\n-\t.digest = {\n-\t\t.data = {\n-\t\t\t0xCA, 0x33, 0xB3, 0x3B, 0x16, 0x94, 0xAA, 0x55,\n-\t\t\t0x36, 0x6B, 0x45, 0x46\n-\t\t},\n-\t\t.len = TRUNCATED_DIGEST_BYTE_LENGTH_SHA1\n-\t}\n-};\n-\n-/* CTR-AES256-Encrypt-SHA1 test vector */\n-\n-static const struct aes_ctr_test_data aes_ctr_test_case_3 = {\n-\t.key = {\n-\t\t.data = {\n-\t\t\t0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE,\n-\t\t\t0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81,\n-\t\t\t0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7,\n-\t\t\t0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4\n-\t\t},\n-\t\t.len = 32\n-\t},\n-\t.iv = {\n-\t\t.data = {\n-\t\t\t0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,\n-\t\t\t0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF\n-\t\t},\n-\t\t.len = 16\n-\t},\n-\t.plaintext = {\n-\t\t.data = {\n-\t\t\t0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96,\n-\t\t\t0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A,\n-\t\t\t0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, 0xAC, 0x9C,\n-\t\t\t0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51,\n-\t\t\t0x30, 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11,\n-\t\t\t0xE5, 0xFB, 0xC1, 0x19, 0x1A, 0x0A, 0x52, 0xEF,\n-\t\t\t0xF6, 0x9F, 0x24, 0x45, 0xDF, 0x4F, 0x9B, 0x17,\n-\t\t\t0xAD, 0x2B, 0x41, 0x7B, 0xE6, 0x6C, 0x37, 0x10\n-\t\t},\n-\t\t.len = 64\n-\t},\n-\t.ciphertext = {\n-\t\t.data = {\n-\t\t\t0x60, 0x1E, 0xC3, 0x13, 0x77, 0x57, 0x89, 0xA5,\n-\t\t\t0xB7, 0xA7, 0xF5, 0x04, 0xBB, 0xF3, 0xD2, 0x28,\n-\t\t\t0xF4, 0x43, 0xE3, 0xCA, 0x4D, 0x62, 0xB5, 0x9A,\n-\t\t\t0xCA, 0x84, 0xE9, 0x90, 0xCA, 0xCA, 0xF5, 0xC5,\n-\t\t\t0x2B, 0x09, 0x30, 0xDA, 0xA2, 0x3D, 0xE9, 0x4C,\n-\t\t\t0xE8, 0x70, 0x17, 0xBA, 0x2D, 0x84, 0x98, 0x8D,\n-\t\t\t0xDF, 0xC9, 0xC5, 0x8D, 0xB6, 0x7A, 0xAD, 0xA6,\n-\t\t\t0x13, 0xC2, 0xDD, 0x08, 0x45, 0x79, 0x41, 0xA6\n-\t\t},\n-\t\t.len = 64\n-\t},\n-\t.auth_key = {\n-\t\t.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,\n-\t\t.data = {\n-\t\t\t0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,\n-\t\t\t0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,\n-\t\t\t0xDE, 0xF4, 0xDE, 0xAD\n-\t\t},\n-\t\t.len = 20\n-\t},\n-\t.digest = {\n-\t\t.data = {\n-\t\t\t0x3B, 0x1A, 0x9D, 0x82, 0x35, 0xD5, 0xDD, 0x64,\n-\t\t\t0xCC, 0x1B, 0xA9, 0xC0, 0xEB, 0xE9, 0x42, 0x16,\n-\t\t\t0xE7, 0x87, 0xA3, 0xEF\n-\t\t},\n-\t\t.len = TRUNCATED_DIGEST_BYTE_LENGTH_SHA1\n-\t}\n-};\n-#endif /* TEST_CRYPTODEV_AES_CTR_TEST_VECTORS_H_ */\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "3/4"
    ]
}