get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56016,
    "url": "http://patches.dpdk.org/api/patches/56016/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190703111558.11552-8-damianx.nowak@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": "<20190703111558.11552-8-damianx.nowak@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190703111558.11552-8-damianx.nowak@intel.com",
    "date": "2019-07-03T11:15:57",
    "name": "[v3,7/8] test/crypto: add sgl test cases for ip and oop",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "510bbda680d6a6386b84a1f42f1abc4298529c06",
    "submitter": {
        "id": 1184,
        "url": "http://patches.dpdk.org/api/people/1184/?format=api",
        "name": "Damian Nowak",
        "email": "damianx.nowak@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190703111558.11552-8-damianx.nowak@intel.com/mbox/",
    "series": [
        {
            "id": 5309,
            "url": "http://patches.dpdk.org/api/series/5309/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5309",
            "date": "2019-07-03T11:15:50",
            "name": "cryptodev: support encrypted-digest use-cases",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/5309/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/56016/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/56016/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 480661B9C9;\n\tWed,  3 Jul 2019 13:16:41 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 13A771B9A8\n\tfor <dev@dpdk.org>; Wed,  3 Jul 2019 13:16:36 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jul 2019 04:16:36 -0700",
            "from damiannx-mobl1.ger.corp.intel.com ([10.103.104.101])\n\tby fmsmga001.fm.intel.com with ESMTP; 03 Jul 2019 04:16:34 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,446,1557212400\"; d=\"scan'208\";a=\"184724732\"",
        "From": "Damian Nowak <damianx.nowak@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "akhil.goyal@nxp.com, fiona.trahe@intel.com, arkadiuszx.kusztal@intel.com,\n\tDamian Nowak <damianx.nowak@intel.com>",
        "Date": "Wed,  3 Jul 2019 13:15:57 +0200",
        "Message-Id": "<20190703111558.11552-8-damianx.nowak@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "In-Reply-To": "<20190703111558.11552-1-damianx.nowak@intel.com>",
        "References": "<20190607100608.16212-1-damianx.nowak@intel.com>\n\t<20190703111558.11552-1-damianx.nowak@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 7/8] test/crypto: add sgl test cases for ip\n\tand oop",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/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 adds test cases for wireless in-place\nand out-of-place auth-cipher operations with\nscatter-gather lists as input and output mbufs.\nTest cases include buffer appended digest\ngeneration with encryption and buffer decryption\nwith appended digest verification.\nIt also adds cases where digest is encrypted\nonly partially.\n\nSigned-off-by: Damian Nowak <damianx.nowak@intel.com>\n---\n app/test/test_cryptodev.c                     | 783 +++++++++++++++++++++++++-\n app/test/test_cryptodev_snow3g_test_vectors.h |  67 +++\n 2 files changed, 830 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 518d3b5..336cfd0 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -2878,7 +2878,7 @@ create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,\n \t\tunsigned int data_pad_len,\n \t\tunsigned int cipher_len, unsigned int cipher_offset,\n \t\tunsigned int auth_len, unsigned int auth_offset,\n-\t\tuint8_t op_mode)\n+\t\tuint8_t op_mode, uint8_t do_sgl)\n {\n \tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n \tstruct crypto_unittest_params *ut_params = &unittest_params;\n@@ -2900,20 +2900,39 @@ create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,\n \t\tsym_op->m_dst = ut_params->obuf;\n \n \t/* digest */\n-\tsym_op->auth.digest.data = rte_pktmbuf_mtod_offset(\n-\t\t(op_mode == IN_PLACE ?\n-\t\t\tut_params->ibuf : ut_params->obuf),\n-\t\tuint8_t *, data_pad_len);\n-\n-\tTEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,\n+\tif (!do_sgl) {\n+\t\tsym_op->auth.digest.data = rte_pktmbuf_mtod_offset(\n+\t\t\t(op_mode == IN_PLACE ?\n+\t\t\t\tut_params->ibuf : ut_params->obuf),\n+\t\t\tuint8_t *, data_pad_len);\n+\t\tsym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(\n+\t\t\t(op_mode == IN_PLACE ?\n+\t\t\t\tut_params->ibuf : ut_params->obuf),\n+\t\t\tdata_pad_len);\n+\t\tTEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,\n \t\t\t\"no room to append auth tag\");\n-\n-\tsym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(\n-\t\t(op_mode == IN_PLACE ?\n-\t\t\tut_params->ibuf : ut_params->obuf),\n-\t\tdata_pad_len);\n-\n-\tmemset(sym_op->auth.digest.data, 0, auth_tag_len);\n+\t\tmemset(sym_op->auth.digest.data, 0, auth_tag_len);\n+\t} else {\n+\t\tuint16_t remaining_off = (auth_offset >> 3) + (auth_len >> 3);\n+\t\tstruct rte_mbuf *sgl_buf = (op_mode == IN_PLACE ?\n+\t\t\t\tsym_op->m_src : sym_op->m_dst);\n+\t\twhile (remaining_off >= rte_pktmbuf_data_len(sgl_buf)) {\n+\t\t\tremaining_off -= rte_pktmbuf_data_len(sgl_buf);\n+\t\t\tsgl_buf = sgl_buf->next;\n+\t\t}\n+\t\tsym_op->auth.digest.data = rte_pktmbuf_mtod_offset(sgl_buf,\n+\t\t\t\tuint8_t *, remaining_off);\n+\t\tsym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(sgl_buf,\n+\t\t\t\tremaining_off);\n+\t\tTEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,\n+\t\t\t\"no room to append auth tag\");\n+\t\tmemset(sym_op->auth.digest.data, 0, remaining_off);\n+\t\twhile (sgl_buf->next != NULL) {\n+\t\t\tmemset(rte_pktmbuf_mtod(sgl_buf, uint8_t *),\n+\t\t\t\t0, rte_pktmbuf_data_len(sgl_buf));\n+\t\t\tsgl_buf = sgl_buf->next;\n+\t\t}\n+\t}\n \n \t/* Copy cipher and auth IVs at the end of the crypto operation */\n \tuint8_t *iv_ptr = rte_crypto_op_ctod_offset(\n@@ -4473,7 +4492,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,\n \t\ttdata->cipher.offset_bits,\n \t\ttdata->validAuthLenInBits.len,\n \t\ttdata->auth.offset_bits,\n-\t\top_mode);\n+\t\top_mode, 0);\n \n \tif (retval < 0)\n \t\treturn retval;\n@@ -4545,6 +4564,190 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,\n }\n \n static int\n+test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata,\n+\tuint8_t op_mode, uint8_t verify)\n+{\n+\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n+\tstruct crypto_unittest_params *ut_params = &unittest_params;\n+\n+\tint retval;\n+\n+\tconst uint8_t *plaintext = NULL;\n+\tconst uint8_t *ciphertext = NULL;\n+\tconst uint8_t *digest = NULL;\n+\tunsigned int plaintext_pad_len;\n+\tunsigned int plaintext_len;\n+\tunsigned int ciphertext_pad_len;\n+\tunsigned int ciphertext_len;\n+\tuint8_t buffer[10000];\n+\tuint8_t digest_buffer[10000];\n+\n+\tstruct rte_cryptodev_info dev_info;\n+\n+\trte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);\n+\n+\tuint64_t feat_flags = dev_info.feature_flags;\n+\n+\tif (op_mode == IN_PLACE) {\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {\n+\t\t\tprintf(\"Device doesn't support in-place scatter-gather \"\n+\t\t\t\t\t\"in both input and output mbufs.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t} else {\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {\n+\t\t\tprintf(\"Device doesn't support out-of-place scatter-gather \"\n+\t\t\t\t\t\"in both input and output mbufs.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) {\n+\t\t\tprintf(\"Device doesn't support digest encrypted.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t}\n+\n+\t/* Create SNOW 3G session */\n+\tretval = create_wireless_algo_auth_cipher_session(\n+\t\t\tts_params->valid_devs[0],\n+\t\t\t(verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT\n+\t\t\t\t\t: RTE_CRYPTO_CIPHER_OP_ENCRYPT),\n+\t\t\t(verify ? RTE_CRYPTO_AUTH_OP_VERIFY\n+\t\t\t\t\t: RTE_CRYPTO_AUTH_OP_GENERATE),\n+\t\t\tRTE_CRYPTO_AUTH_SNOW3G_UIA2,\n+\t\t\tRTE_CRYPTO_CIPHER_SNOW3G_UEA2,\n+\t\t\ttdata->key.data, tdata->key.len,\n+\t\t\ttdata->auth_iv.len, tdata->digest.len,\n+\t\t\ttdata->cipher_iv.len);\n+\n+\tif (retval < 0)\n+\t\treturn retval;\n+\n+\tciphertext_len = ceil_byte_length(tdata->ciphertext.len);\n+\tplaintext_len = ceil_byte_length(tdata->plaintext.len);\n+\tciphertext_pad_len = RTE_ALIGN_CEIL(ciphertext_len, 16);\n+\tplaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);\n+\n+\tut_params->ibuf = create_segmented_mbuf(ts_params->mbuf_pool,\n+\t\t\tplaintext_pad_len, 15, 0);\n+\tTEST_ASSERT_NOT_NULL(ut_params->ibuf,\n+\t\t\t\"Failed to allocate input buffer in mempool\");\n+\n+\tif (op_mode == OUT_OF_PLACE) {\n+\t\tut_params->obuf = create_segmented_mbuf(ts_params->mbuf_pool,\n+\t\t\t\tplaintext_pad_len, 15, 0);\n+\t\tTEST_ASSERT_NOT_NULL(ut_params->obuf,\n+\t\t\t\t\"Failed to allocate output buffer in mempool\");\n+\t}\n+\n+\tif (verify) {\n+\t\tpktmbuf_write(ut_params->ibuf, 0, ciphertext_len,\n+\t\t\ttdata->ciphertext.data);\n+\t\tciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t} else {\n+\t\tpktmbuf_write(ut_params->ibuf, 0, plaintext_len,\n+\t\t\ttdata->plaintext.data);\n+\t\tplaintext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext,\n+\t\t\tplaintext_len);\n+\t}\n+\tmemset(buffer, 0, sizeof(buffer));\n+\n+\t/* Create SNOW 3G operation */\n+\tretval = create_wireless_algo_auth_cipher_operation(\n+\t\ttdata->digest.len,\n+\t\ttdata->cipher_iv.data, tdata->cipher_iv.len,\n+\t\ttdata->auth_iv.data, tdata->auth_iv.len,\n+\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t(verify ? ciphertext_pad_len : plaintext_pad_len)\n+\t\t\t: tdata->digest.offset_bytes),\n+\t\ttdata->validCipherLenInBits.len,\n+\t\ttdata->cipher.offset_bits,\n+\t\ttdata->validAuthLenInBits.len,\n+\t\ttdata->auth.offset_bits,\n+\t\top_mode, 1);\n+\n+\tif (retval < 0)\n+\t\treturn retval;\n+\n+\tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n+\t\t\tut_params->op);\n+\n+\tTEST_ASSERT_NOT_NULL(ut_params->op, \"failed to retrieve obuf\");\n+\n+\tut_params->obuf = (op_mode == IN_PLACE ?\n+\t\tut_params->op->sym->m_src : ut_params->op->sym->m_dst);\n+\n+\tif (verify) {\n+\t\tif (ut_params->obuf)\n+\t\t\tplaintext = rte_pktmbuf_read(ut_params->obuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\t\telse\n+\t\t\tplaintext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"plaintext expected:\",\n+\t\t\ttdata->plaintext.data,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t} else {\n+\t\tif (ut_params->obuf)\n+\t\t\tciphertext = rte_pktmbuf_read(ut_params->obuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\t\telse\n+\t\t\tciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t\tdebug_hexdump(stdout, \"ciphertext expected:\",\n+\t\t\ttdata->ciphertext.data, tdata->ciphertext.len >> 3);\n+\n+\t\tif (ut_params->obuf)\n+\t\t\tdigest = rte_pktmbuf_read(ut_params->obuf,\n+\t\t\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t\t\tplaintext_pad_len : tdata->digest.offset_bytes),\n+\t\t\t\ttdata->digest.len, digest_buffer);\n+\t\telse\n+\t\t\tdigest = rte_pktmbuf_read(ut_params->ibuf,\n+\t\t\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t\t\tplaintext_pad_len : tdata->digest.offset_bytes),\n+\t\t\t\ttdata->digest.len, digest_buffer);\n+\n+\t\tdebug_hexdump(stdout, \"digest:\", digest,\n+\t\t\ttdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"digest expected:\",\n+\t\t\ttdata->digest.data, tdata->digest.len);\n+\t}\n+\n+\t/* Validate obuf */\n+\tif (verify) {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tplaintext,\n+\t\t\ttdata->plaintext.data,\n+\t\t\ttdata->plaintext.len >> 3,\n+\t\t\t\"SNOW 3G Plaintext data not as expected\");\n+\t} else {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tciphertext,\n+\t\t\ttdata->ciphertext.data,\n+\t\t\ttdata->validDataLenInBits.len,\n+\t\t\t\"SNOW 3G Ciphertext data not as expected\");\n+\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n+\t\t\tdigest,\n+\t\t\ttdata->digest.data,\n+\t\t\tDIGEST_BYTE_LENGTH_SNOW3G_UIA2,\n+\t\t\t\"SNOW 3G Generated auth tag not as expected\");\n+\t}\n+\treturn 0;\n+}\n+\n+static int\n test_kasumi_auth_cipher(const struct kasumi_test_data *tdata,\n \tuint8_t op_mode, uint8_t verify)\n {\n@@ -4634,7 +4837,7 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata,\n \t\ttdata->validCipherOffsetInBits.len,\n \t\ttdata->validAuthLenInBits.len,\n \t\t0,\n-\t\top_mode);\n+\t\top_mode, 0);\n \n \tif (retval < 0)\n \t\treturn retval;\n@@ -4677,7 +4880,191 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata,\n \t\t\t(tdata->digest.offset_bytes == 0 ?\n \t\t\tplaintext_pad_len : tdata->digest.offset_bytes);\n \n-\t\tdebug_hexdump(stdout, \"digest:\", ut_params->digest,\n+\t\tdebug_hexdump(stdout, \"digest:\", ut_params->digest,\n+\t\t\ttdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"digest expected:\",\n+\t\t\ttdata->digest.data, tdata->digest.len);\n+\t}\n+\n+\t/* Validate obuf */\n+\tif (verify) {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tplaintext,\n+\t\t\ttdata->plaintext.data,\n+\t\t\ttdata->plaintext.len >> 3,\n+\t\t\t\"KASUMI Plaintext data not as expected\");\n+\t} else {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tciphertext,\n+\t\t\ttdata->ciphertext.data,\n+\t\t\ttdata->ciphertext.len >> 3,\n+\t\t\t\"KASUMI Ciphertext data not as expected\");\n+\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n+\t\t\tut_params->digest,\n+\t\t\ttdata->digest.data,\n+\t\t\tDIGEST_BYTE_LENGTH_KASUMI_F9,\n+\t\t\t\"KASUMI Generated auth tag not as expected\");\n+\t}\n+\treturn 0;\n+}\n+\n+static int\n+test_kasumi_auth_cipher_sgl(const struct kasumi_test_data *tdata,\n+\tuint8_t op_mode, uint8_t verify)\n+{\n+\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n+\tstruct crypto_unittest_params *ut_params = &unittest_params;\n+\n+\tint retval;\n+\n+\tconst uint8_t *plaintext = NULL;\n+\tconst uint8_t *ciphertext = NULL;\n+\tconst uint8_t *digest = NULL;\n+\tunsigned int plaintext_pad_len;\n+\tunsigned int plaintext_len;\n+\tunsigned int ciphertext_pad_len;\n+\tunsigned int ciphertext_len;\n+\tuint8_t buffer[10000];\n+\tuint8_t digest_buffer[10000];\n+\n+\tstruct rte_cryptodev_info dev_info;\n+\n+\trte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);\n+\n+\tuint64_t feat_flags = dev_info.feature_flags;\n+\n+\tif (op_mode == IN_PLACE) {\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {\n+\t\t\tprintf(\"Device doesn't support in-place scatter-gather \"\n+\t\t\t\t\t\"in both input and output mbufs.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t} else {\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {\n+\t\t\tprintf(\"Device doesn't support out-of-place scatter-gather \"\n+\t\t\t\t\t\"in both input and output mbufs.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) {\n+\t\t\tprintf(\"Device doesn't support digest encrypted.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t}\n+\n+\t/* Create KASUMI session */\n+\tretval = create_wireless_algo_auth_cipher_session(\n+\t\t\tts_params->valid_devs[0],\n+\t\t\t(verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT\n+\t\t\t\t\t: RTE_CRYPTO_CIPHER_OP_ENCRYPT),\n+\t\t\t(verify ? RTE_CRYPTO_AUTH_OP_VERIFY\n+\t\t\t\t\t: RTE_CRYPTO_AUTH_OP_GENERATE),\n+\t\t\tRTE_CRYPTO_AUTH_KASUMI_F9,\n+\t\t\tRTE_CRYPTO_CIPHER_KASUMI_F8,\n+\t\t\ttdata->key.data, tdata->key.len,\n+\t\t\t0, tdata->digest.len,\n+\t\t\ttdata->cipher_iv.len);\n+\n+\tif (retval < 0)\n+\t\treturn retval;\n+\n+\tciphertext_len = ceil_byte_length(tdata->ciphertext.len);\n+\tplaintext_len = ceil_byte_length(tdata->plaintext.len);\n+\tciphertext_pad_len = RTE_ALIGN_CEIL(ciphertext_len, 16);\n+\tplaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);\n+\n+\tut_params->ibuf = create_segmented_mbuf(ts_params->mbuf_pool,\n+\t\t\tplaintext_pad_len, 15, 0);\n+\tTEST_ASSERT_NOT_NULL(ut_params->ibuf,\n+\t\t\t\"Failed to allocate input buffer in mempool\");\n+\n+\tif (op_mode == OUT_OF_PLACE) {\n+\t\tut_params->obuf = create_segmented_mbuf(ts_params->mbuf_pool,\n+\t\t\t\tplaintext_pad_len, 15, 0);\n+\t\tTEST_ASSERT_NOT_NULL(ut_params->obuf,\n+\t\t\t\t\"Failed to allocate output buffer in mempool\");\n+\t}\n+\n+\tif (verify) {\n+\t\tpktmbuf_write(ut_params->ibuf, 0, ciphertext_len,\n+\t\t\ttdata->ciphertext.data);\n+\t\tciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t} else {\n+\t\tpktmbuf_write(ut_params->ibuf, 0, plaintext_len,\n+\t\t\ttdata->plaintext.data);\n+\t\tplaintext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext,\n+\t\t\tplaintext_len);\n+\t}\n+\tmemset(buffer, 0, sizeof(buffer));\n+\n+\t/* Create SNOW 3G operation */\n+\tretval = create_wireless_algo_auth_cipher_operation(\n+\t\ttdata->digest.len,\n+\t\ttdata->cipher_iv.data, tdata->cipher_iv.len,\n+\t\tNULL, 0,\n+\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t(verify ? ciphertext_pad_len : plaintext_pad_len)\n+\t\t\t: tdata->digest.offset_bytes),\n+\t\ttdata->validCipherLenInBits.len,\n+\t\ttdata->validCipherOffsetInBits.len,\n+\t\ttdata->validAuthLenInBits.len,\n+\t\t0,\n+\t\top_mode, 1);\n+\n+\tif (retval < 0)\n+\t\treturn retval;\n+\n+\tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n+\t\t\tut_params->op);\n+\n+\tTEST_ASSERT_NOT_NULL(ut_params->op, \"failed to retrieve obuf\");\n+\n+\tut_params->obuf = (op_mode == IN_PLACE ?\n+\t\tut_params->op->sym->m_src : ut_params->op->sym->m_dst);\n+\n+\tif (verify) {\n+\t\tif (ut_params->obuf)\n+\t\t\tplaintext = rte_pktmbuf_read(ut_params->obuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\t\telse\n+\t\t\tplaintext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"plaintext expected:\",\n+\t\t\ttdata->plaintext.data,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t} else {\n+\t\tif (ut_params->obuf)\n+\t\t\tciphertext = rte_pktmbuf_read(ut_params->obuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\t\telse\n+\t\t\tciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t\tdebug_hexdump(stdout, \"ciphertext expected:\",\n+\t\t\ttdata->ciphertext.data, tdata->ciphertext.len >> 3);\n+\n+\t\tif (ut_params->obuf)\n+\t\t\tdigest = rte_pktmbuf_read(ut_params->obuf,\n+\t\t\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t\t\tplaintext_pad_len : tdata->digest.offset_bytes),\n+\t\t\t\ttdata->digest.len, digest_buffer);\n+\t\telse\n+\t\t\tdigest = rte_pktmbuf_read(ut_params->ibuf,\n+\t\t\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t\t\tplaintext_pad_len : tdata->digest.offset_bytes),\n+\t\t\t\ttdata->digest.len, digest_buffer);\n+\n+\t\tdebug_hexdump(stdout, \"digest:\", digest,\n \t\t\ttdata->digest.len);\n \t\tdebug_hexdump(stdout, \"digest expected:\",\n \t\t\ttdata->digest.data, tdata->digest.len);\n@@ -4694,11 +5081,11 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata,\n \t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n \t\t\tciphertext,\n \t\t\ttdata->ciphertext.data,\n-\t\t\ttdata->ciphertext.len >> 3,\n+\t\t\ttdata->validDataLenInBits.len,\n \t\t\t\"KASUMI Ciphertext data not as expected\");\n \n \t\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\t\tut_params->digest,\n+\t\t\tdigest,\n \t\t\ttdata->digest.data,\n \t\t\tDIGEST_BYTE_LENGTH_KASUMI_F9,\n \t\t\t\"KASUMI Generated auth tag not as expected\");\n@@ -5121,7 +5508,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,\n \t\ttdata->validCipherOffsetInBits.len,\n \t\ttdata->validAuthLenInBits.len,\n \t\t0,\n-\t\top_mode);\n+\t\top_mode, 0);\n \n \tif (retval < 0)\n \t\treturn retval;\n@@ -5194,6 +5581,190 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,\n }\n \n static int\n+test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,\n+\tuint8_t op_mode, uint8_t verify)\n+{\n+\tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n+\tstruct crypto_unittest_params *ut_params = &unittest_params;\n+\n+\tint retval;\n+\n+\tconst uint8_t *plaintext = NULL;\n+\tconst uint8_t *ciphertext = NULL;\n+\tconst uint8_t *digest = NULL;\n+\tunsigned int plaintext_pad_len;\n+\tunsigned int plaintext_len;\n+\tunsigned int ciphertext_pad_len;\n+\tunsigned int ciphertext_len;\n+\tuint8_t buffer[10000];\n+\tuint8_t digest_buffer[10000];\n+\n+\tstruct rte_cryptodev_info dev_info;\n+\n+\trte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);\n+\n+\tuint64_t feat_flags = dev_info.feature_flags;\n+\n+\tif (op_mode == IN_PLACE) {\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {\n+\t\t\tprintf(\"Device doesn't support in-place scatter-gather \"\n+\t\t\t\t\t\"in both input and output mbufs.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t} else {\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {\n+\t\t\tprintf(\"Device doesn't support out-of-place scatter-gather \"\n+\t\t\t\t\t\"in both input and output mbufs.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t\tif (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) {\n+\t\t\tprintf(\"Device doesn't support digest encrypted.\\n\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t}\n+\n+\t/* Create ZUC session */\n+\tretval = create_wireless_algo_auth_cipher_session(\n+\t\t\tts_params->valid_devs[0],\n+\t\t\t(verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT\n+\t\t\t\t\t: RTE_CRYPTO_CIPHER_OP_ENCRYPT),\n+\t\t\t(verify ? RTE_CRYPTO_AUTH_OP_VERIFY\n+\t\t\t\t\t: RTE_CRYPTO_AUTH_OP_GENERATE),\n+\t\t\tRTE_CRYPTO_AUTH_ZUC_EIA3,\n+\t\t\tRTE_CRYPTO_CIPHER_ZUC_EEA3,\n+\t\t\ttdata->key.data, tdata->key.len,\n+\t\t\ttdata->auth_iv.len, tdata->digest.len,\n+\t\t\ttdata->cipher_iv.len);\n+\n+\tif (retval < 0)\n+\t\treturn retval;\n+\n+\tciphertext_len = ceil_byte_length(tdata->ciphertext.len);\n+\tplaintext_len = ceil_byte_length(tdata->plaintext.len);\n+\tciphertext_pad_len = RTE_ALIGN_CEIL(ciphertext_len, 16);\n+\tplaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);\n+\n+\tut_params->ibuf = create_segmented_mbuf(ts_params->mbuf_pool,\n+\t\t\tplaintext_pad_len, 15, 0);\n+\tTEST_ASSERT_NOT_NULL(ut_params->ibuf,\n+\t\t\t\"Failed to allocate input buffer in mempool\");\n+\n+\tif (op_mode == OUT_OF_PLACE) {\n+\t\tut_params->obuf = create_segmented_mbuf(ts_params->mbuf_pool,\n+\t\t\t\tplaintext_pad_len, 15, 0);\n+\t\tTEST_ASSERT_NOT_NULL(ut_params->obuf,\n+\t\t\t\t\"Failed to allocate output buffer in mempool\");\n+\t}\n+\n+\tif (verify) {\n+\t\tpktmbuf_write(ut_params->ibuf, 0, ciphertext_len,\n+\t\t\ttdata->ciphertext.data);\n+\t\tciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t} else {\n+\t\tpktmbuf_write(ut_params->ibuf, 0, plaintext_len,\n+\t\t\ttdata->plaintext.data);\n+\t\tplaintext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext,\n+\t\t\tplaintext_len);\n+\t}\n+\tmemset(buffer, 0, sizeof(buffer));\n+\n+\t/* Create ZUC operation */\n+\tretval = create_wireless_algo_auth_cipher_operation(\n+\t\ttdata->digest.len,\n+\t\ttdata->cipher_iv.data, tdata->cipher_iv.len,\n+\t\tNULL, 0,\n+\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t(verify ? ciphertext_pad_len : plaintext_pad_len)\n+\t\t\t: tdata->digest.offset_bytes),\n+\t\ttdata->validCipherLenInBits.len,\n+\t\ttdata->validCipherOffsetInBits.len,\n+\t\ttdata->validAuthLenInBits.len,\n+\t\t0,\n+\t\top_mode, 1);\n+\n+\tif (retval < 0)\n+\t\treturn retval;\n+\n+\tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n+\t\t\tut_params->op);\n+\n+\tTEST_ASSERT_NOT_NULL(ut_params->op, \"failed to retrieve obuf\");\n+\n+\tut_params->obuf = (op_mode == IN_PLACE ?\n+\t\tut_params->op->sym->m_src : ut_params->op->sym->m_dst);\n+\n+\tif (verify) {\n+\t\tif (ut_params->obuf)\n+\t\t\tplaintext = rte_pktmbuf_read(ut_params->obuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\t\telse\n+\t\t\tplaintext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tplaintext_len, buffer);\n+\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"plaintext expected:\",\n+\t\t\ttdata->plaintext.data,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t} else {\n+\t\tif (ut_params->obuf)\n+\t\t\tciphertext = rte_pktmbuf_read(ut_params->obuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\t\telse\n+\t\t\tciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,\n+\t\t\t\t\tciphertext_len, buffer);\n+\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t\tdebug_hexdump(stdout, \"ciphertext expected:\",\n+\t\t\ttdata->ciphertext.data, tdata->ciphertext.len >> 3);\n+\n+\t\tif (ut_params->obuf)\n+\t\t\tdigest = rte_pktmbuf_read(ut_params->obuf,\n+\t\t\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t\t\tplaintext_pad_len : tdata->digest.offset_bytes),\n+\t\t\t\ttdata->digest.len, digest_buffer);\n+\t\telse\n+\t\t\tdigest = rte_pktmbuf_read(ut_params->ibuf,\n+\t\t\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t\t\tplaintext_pad_len : tdata->digest.offset_bytes),\n+\t\t\t\ttdata->digest.len, digest_buffer);\n+\n+\t\tdebug_hexdump(stdout, \"digest:\", digest,\n+\t\t\ttdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"digest expected:\",\n+\t\t\ttdata->digest.data, tdata->digest.len);\n+\t}\n+\n+\t/* Validate obuf */\n+\tif (verify) {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tplaintext,\n+\t\t\ttdata->plaintext.data,\n+\t\t\ttdata->plaintext.len >> 3,\n+\t\t\t\"ZUC Plaintext data not as expected\");\n+\t} else {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tciphertext,\n+\t\t\ttdata->ciphertext.data,\n+\t\t\ttdata->validDataLenInBits.len,\n+\t\t\t\"ZUC Ciphertext data not as expected\");\n+\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n+\t\t\tdigest,\n+\t\t\ttdata->digest.data,\n+\t\t\tDIGEST_BYTE_LENGTH_KASUMI_F9,\n+\t\t\t\"ZUC Generated auth tag not as expected\");\n+\t}\n+\treturn 0;\n+}\n+\n+static int\n test_kasumi_encryption_test_case_1(void)\n {\n \treturn test_kasumi_encryption(&kasumi_test_case_1);\n@@ -5459,6 +6030,36 @@ test_snow3g_auth_cipher_part_digest_enc_oop(void)\n }\n \n static int\n+test_snow3g_auth_cipher_test_case_3_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_test_case_3, IN_PLACE, 0);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_test_case_3_oop_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_test_case_3, OUT_OF_PLACE, 0);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_part_digest_enc_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_partial_digest_encryption,\n+\t\t\tIN_PLACE, 0);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_part_digest_enc_oop_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_partial_digest_encryption,\n+\t\t\tOUT_OF_PLACE, 0);\n+}\n+\n+static int\n test_snow3g_auth_cipher_verify_test_case_1(void)\n {\n \treturn test_snow3g_auth_cipher(\n@@ -5496,6 +6097,36 @@ test_snow3g_auth_cipher_verify_part_digest_enc_oop(void)\n }\n \n static int\n+test_snow3g_auth_cipher_verify_test_case_3_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_test_case_3, IN_PLACE, 1);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_verify_test_case_3_oop_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_test_case_3, OUT_OF_PLACE, 1);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_verify_part_digest_enc_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_partial_digest_encryption,\n+\t\t\tIN_PLACE, 1);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_verify_part_digest_enc_oop_sgl(void)\n+{\n+\treturn test_snow3g_auth_cipher_sgl(\n+\t\t&snow3g_auth_cipher_partial_digest_encryption,\n+\t\t\tOUT_OF_PLACE, 1);\n+}\n+\n+static int\n test_snow3g_auth_cipher_with_digest_test_case_1(void)\n {\n \treturn test_snow3g_auth_cipher(\n@@ -5524,6 +6155,20 @@ test_kasumi_auth_cipher_test_case_2_oop(void)\n }\n \n static int\n+test_kasumi_auth_cipher_test_case_2_sgl(void)\n+{\n+\treturn test_kasumi_auth_cipher_sgl(\n+\t\t&kasumi_auth_cipher_test_case_2, IN_PLACE, 0);\n+}\n+\n+static int\n+test_kasumi_auth_cipher_test_case_2_oop_sgl(void)\n+{\n+\treturn test_kasumi_auth_cipher_sgl(\n+\t\t&kasumi_auth_cipher_test_case_2, OUT_OF_PLACE, 0);\n+}\n+\n+static int\n test_kasumi_auth_cipher_verify_test_case_1(void)\n {\n \treturn test_kasumi_auth_cipher(\n@@ -5545,6 +6190,20 @@ test_kasumi_auth_cipher_verify_test_case_2_oop(void)\n }\n \n static int\n+test_kasumi_auth_cipher_verify_test_case_2_sgl(void)\n+{\n+\treturn test_kasumi_auth_cipher_sgl(\n+\t\t&kasumi_auth_cipher_test_case_2, IN_PLACE, 1);\n+}\n+\n+static int\n+test_kasumi_auth_cipher_verify_test_case_2_oop_sgl(void)\n+{\n+\treturn test_kasumi_auth_cipher_sgl(\n+\t\t&kasumi_auth_cipher_test_case_2, OUT_OF_PLACE, 1);\n+}\n+\n+static int\n test_kasumi_cipher_auth_test_case_1(void)\n {\n \treturn test_kasumi_cipher_auth(&kasumi_test_case_6);\n@@ -5661,6 +6320,20 @@ test_zuc_auth_cipher_test_case_1_oop(void)\n }\n \n static int\n+test_zuc_auth_cipher_test_case_1_sgl(void)\n+{\n+\treturn test_zuc_auth_cipher_sgl(\n+\t\t&zuc_auth_cipher_test_case_1, IN_PLACE, 0);\n+}\n+\n+static int\n+test_zuc_auth_cipher_test_case_1_oop_sgl(void)\n+{\n+\treturn test_zuc_auth_cipher_sgl(\n+\t\t&zuc_auth_cipher_test_case_1, OUT_OF_PLACE, 0);\n+}\n+\n+static int\n test_zuc_auth_cipher_verify_test_case_1(void)\n {\n \treturn test_zuc_auth_cipher(\n@@ -5675,6 +6348,20 @@ test_zuc_auth_cipher_verify_test_case_1_oop(void)\n }\n \n static int\n+test_zuc_auth_cipher_verify_test_case_1_sgl(void)\n+{\n+\treturn test_zuc_auth_cipher_sgl(\n+\t\t&zuc_auth_cipher_test_case_1, IN_PLACE, 1);\n+}\n+\n+static int\n+test_zuc_auth_cipher_verify_test_case_1_oop_sgl(void)\n+{\n+\treturn test_zuc_auth_cipher_sgl(\n+\t\t&zuc_auth_cipher_test_case_1, OUT_OF_PLACE, 1);\n+}\n+\n+static int\n test_3DES_chain_qat_all(void)\n {\n \tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n@@ -9716,6 +10403,14 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {\n \t\t\ttest_snow3g_auth_cipher_part_digest_enc),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_auth_cipher_part_digest_enc_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_test_case_3_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_test_case_3_oop_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_part_digest_enc_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_part_digest_enc_oop_sgl),\n \n \t\t/** SNOW 3G decrypt (UEA2), then verify auth */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n@@ -9728,6 +10423,14 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {\n \t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_test_case_3_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_test_case_3_oop_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc_oop_sgl),\n \n \t\t/** SNOW 3G decrypt only (UEA2) */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n@@ -9790,12 +10493,20 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {\n \t\t\ttest_zuc_auth_cipher_test_case_1),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_zuc_auth_cipher_test_case_1_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_zuc_auth_cipher_test_case_1_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_zuc_auth_cipher_test_case_1_oop_sgl),\n \n \t\t/** ZUC decrypt (EEA3), then verify auth */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_zuc_auth_cipher_verify_test_case_1),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_zuc_auth_cipher_verify_test_case_1_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_zuc_auth_cipher_verify_test_case_1_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_zuc_auth_cipher_verify_test_case_1_oop_sgl),\n \n \t\t/** HMAC_MD5 Authentication */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n@@ -9850,6 +10561,10 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {\n \t\t\ttest_kasumi_auth_cipher_test_case_2),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_kasumi_auth_cipher_test_case_2_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_test_case_2_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_test_case_2_oop_sgl),\n \n \t\t/** KASUMI decrypt (F8), then verify auth */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n@@ -9858,6 +10573,10 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {\n \t\t\ttest_kasumi_auth_cipher_verify_test_case_2),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_kasumi_auth_cipher_verify_test_case_2_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_verify_test_case_2_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_verify_test_case_2_oop_sgl),\n \n \t\t/** Negative tests */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n@@ -10483,6 +11202,10 @@ static struct unit_test_suite cryptodev_sw_kasumi_testsuite  = {\n \t\t\ttest_kasumi_auth_cipher_test_case_2),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_kasumi_auth_cipher_test_case_2_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_test_case_2_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_test_case_2_oop_sgl),\n \n \t\t/** KASUMI decrypt (F8), then verify auth */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n@@ -10491,6 +11214,10 @@ static struct unit_test_suite cryptodev_sw_kasumi_testsuite  = {\n \t\t\ttest_kasumi_auth_cipher_verify_test_case_2),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_kasumi_auth_cipher_verify_test_case_2_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_verify_test_case_2_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_kasumi_auth_cipher_verify_test_case_2_oop_sgl),\n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n };\n@@ -10576,6 +11303,14 @@ static struct unit_test_suite cryptodev_sw_snow3g_testsuite  = {\n \t\t\ttest_snow3g_auth_cipher_part_digest_enc),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_auth_cipher_part_digest_enc_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_test_case_3_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_test_case_3_oop_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_part_digest_enc_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_part_digest_enc_oop_sgl),\n \n \t\t/** SNOW 3G decrypt (UEA2), then verify auth */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n@@ -10588,6 +11323,14 @@ static struct unit_test_suite cryptodev_sw_snow3g_testsuite  = {\n \t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc_oop),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_test_case_3_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_test_case_3_oop_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc_sgl),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_part_digest_enc_oop_sgl),\n \n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\ndiff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h\nindex 3abc037..bbe0566 100644\n--- a/app/test/test_cryptodev_snow3g_test_vectors.h\n+++ b/app/test/test_cryptodev_snow3g_test_vectors.h\n@@ -602,6 +602,73 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {\n \t},\n };\n \n+struct snow3g_test_data snow3g_auth_cipher_test_case_3 = {\n+\t.key = {\n+\t\t.data = {\n+\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n+\t\t\t0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10\n+\n+\t\t\t},\n+\t\t.len = 16\n+\t},\n+\t.cipher_iv = {\n+\t\t.data = {\n+\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n+\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08\n+\t\t},\n+\t\t.len = 16\n+\t},\n+\t.auth_iv = {\n+\t\t.data = {\n+\t\t\t 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n+\t\t\t 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\n+\t\t},\n+\t\t.len = 16\n+\t},\n+\t.plaintext = {\n+\t\t.data = {\n+\t\t\t0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,\n+\t\t\t0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,\n+\t\t\t0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,\n+\t\t\t0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,\n+\t\t},\n+\t\t.len = 32 << 3\n+\t},\n+\t.ciphertext = {\n+\t\t.data = {\n+\t\t\t0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6,\n+\t\t\t0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47,\n+\t\t\t0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B,\n+\t\t\t0x90, 0x40, 0xBA, 0x0C, 0xBA, 0x6D, 0x6A, 0x5E,\n+\t\t},\n+\t\t.len = 32 << 3\n+\t},\n+\t.cipher = {\n+\t\t.len_bits = 30 << 3,\n+\t\t.offset_bits = 2 << 3\n+\t},\n+\t.auth = {\n+\t\t.len_bits = 28 << 3,\n+\t\t.offset_bits = 0\n+\t},\n+\t.digest = {\n+\t\t.data = {\n+\t\t\t0xBA, 0x6D, 0x6A, 0x5E\n+\t\t},\n+\t\t.len = 4,\n+\t\t.offset_bytes = 28\n+\t},\n+\t.validDataLenInBits = {\n+\t\t.len = 32 << 3\n+\t},\n+\t.validCipherLenInBits = {\n+\t\t.len = 30 << 3\n+\t},\n+\t.validAuthLenInBits = {\n+\t\t.len = 28 << 3\n+\t},\n+};\n+\n struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {\n \t.key = {\n \t\t.data = {\n",
    "prefixes": [
        "v3",
        "7/8"
    ]
}