get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 58834,
    "url": "http://patches.dpdk.org/api/patches/58834/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190906111138.1582-2-arturx.trybula@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": "<20190906111138.1582-2-arturx.trybula@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190906111138.1582-2-arturx.trybula@intel.com",
    "date": "2019-09-06T11:11:38",
    "name": "[2/2] test/compress: unit test for stateless overflow recovery",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ca833f548c6407491b7587f90c1a2dbbe24a29ef",
    "submitter": {
        "id": 1327,
        "url": "http://patches.dpdk.org/api/people/1327/?format=api",
        "name": "Artur Trybula",
        "email": "arturx.trybula@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/20190906111138.1582-2-arturx.trybula@intel.com/mbox/",
    "series": [
        {
            "id": 6295,
            "url": "http://patches.dpdk.org/api/series/6295/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6295",
            "date": "2019-09-06T11:11:37",
            "name": "[1/2] compress/qat: overflow catching",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6295/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/58834/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/58834/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 072E11F31E;\n\tFri,  6 Sep 2019 13:11:46 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 863D41BF12\n\tfor <dev@dpdk.org>; Fri,  6 Sep 2019 13:11:43 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 Sep 2019 04:11:42 -0700",
            "from atrybulx-mobl.ger.corp.intel.com (HELO\n\tbuild-VirtualBox.isw.intel.com) ([10.103.104.115])\n\tby fmsmga001.fm.intel.com with ESMTP; 06 Sep 2019 04:11:40 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,472,1559545200\"; d=\"scan'208\";a=\"199498275\"",
        "From": "Artur Trybula <arturx.trybula@intel.com>",
        "To": "dev@dpdk.org, fiona.trahe@intel.com, shallyv@marvell.com,\n\tadamx.dybkowski@intel.com, arturx.trybula@intel.com, akhil.goyal@nxp.com",
        "Date": "Fri,  6 Sep 2019 13:11:38 +0200",
        "Message-Id": "<20190906111138.1582-2-arturx.trybula@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190906111138.1582-1-arturx.trybula@intel.com>",
        "References": "<20190906111138.1582-1-arturx.trybula@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/2] test/compress: unit test for stateless\n\toverflow recovery",
        "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": "Added unit test to check out-of-space recoverable feature.\n\nSigned-off-by: Artur Trybula <arturx.trybula@intel.com>\n---\n app/test/test_compressdev.c | 264 +++++++++++++++++++++++++++++-------\n 1 file changed, 216 insertions(+), 48 deletions(-)",
    "diff": "diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c\nindex 992eac8e0..3a655164f 100644\n--- a/app/test/test_compressdev.c\n+++ b/app/test/test_compressdev.c\n@@ -30,6 +30,7 @@\n  * due to the compress block headers\n  */\n #define COMPRESS_BUF_SIZE_RATIO 1.3\n+#define COMPRESS_BUF_SIZE_RATIO_OVERFLOW 0.2\n #define NUM_LARGE_MBUFS 16\n #define SMALL_SEG_SIZE 256\n #define MAX_SEGS 16\n@@ -65,6 +66,12 @@ enum zlib_direction {\n \tZLIB_ALL\n };\n \n+enum overflow_test {\n+\tOVERFLOW_DISABLED,\n+\tOVERFLOW_ENABLED\n+};\n+\n+\n enum varied_buff {\n \tLB_BOTH = 0,\t/* both input and output are linear*/\n \tSGL_BOTH,\t/* both input and output are chained */\n@@ -100,6 +107,7 @@ struct test_data_params {\n \tenum zlib_direction zlib_dir;\n \tunsigned int out_of_space;\n \tunsigned int big_data;\n+\tenum overflow_test overflow;\n };\n \n static struct comp_testsuite_params testsuite_params = { 0 };\n@@ -644,6 +652,7 @@ prepare_sgl_bufs(const char *test_buf, struct rte_mbuf *head_buf,\n \t\tdata_size = remaining_data;\n \telse\n \t\tdata_size = seg_size;\n+\n \tbuf_ptr = rte_pktmbuf_append(head_buf, data_size);\n \tif (buf_ptr == NULL) {\n \t\tRTE_LOG(ERR, USER1,\n@@ -710,6 +719,50 @@ prepare_sgl_bufs(const char *test_buf, struct rte_mbuf *head_buf,\n \treturn 0;\n }\n \n+\n+static int\n+test_run_enqueue_dequeue(struct rte_comp_op **ops, unsigned int num_bufs,\n+\t\t  struct rte_comp_op **ops_processed)\n+{\n+\tuint16_t num_enqd, num_deqd, num_total_deqd;\n+\tunsigned int deqd_retries = 0;\n+\n+\t/* Enqueue and dequeue all operations */\n+\tnum_enqd = rte_compressdev_enqueue_burst(0, 0, ops, num_bufs);\n+\tif (num_enqd < num_bufs) {\n+\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\"Some operations could not be enqueued\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tnum_total_deqd = 0;\n+\tdo {\n+\t\t/*\n+\t\t * If retrying a dequeue call, wait for 10 ms to allow\n+\t\t * enough time to the driver to process the operations\n+\t\t */\n+\t\tif (deqd_retries != 0) {\n+\t\t\t/*\n+\t\t\t * Avoid infinite loop if not all the\n+\t\t\t * operations get out of the device\n+\t\t\t */\n+\t\t\tif (deqd_retries == MAX_DEQD_RETRIES) {\n+\t\t\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\t\t\"Not all operations could be dequeued\\n\");\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\tusleep(DEQUEUE_WAIT_TIME);\n+\t\t}\n+\t\tnum_deqd = rte_compressdev_dequeue_burst(0, 0,\n+\t\t\t\t&ops_processed[num_total_deqd], num_bufs);\n+\t\tnum_total_deqd += num_deqd;\n+\t\tdeqd_retries++;\n+\n+\t} while (num_total_deqd < num_enqd);\n+\n+\treturn 0;\n+}\n+\n /*\n  * Compresses and decompresses buffer with compressdev API and Zlib API\n  */\n@@ -729,6 +782,7 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \tunsigned int out_of_space = test_data->out_of_space;\n \tunsigned int big_data = test_data->big_data;\n \tenum zlib_direction zlib_dir = test_data->zlib_dir;\n+\tenum overflow_test overflow_tst = test_data->overflow;\n \tint ret_status = -1;\n \tint ret;\n \tstruct rte_mbuf *uncomp_bufs[num_bufs];\n@@ -754,6 +808,7 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\trte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE);\n \tchar *contig_buf = NULL;\n \tuint64_t compress_checksum[num_bufs];\n+\tuint32_t compressed_data_size[num_bufs];\n \n \tif (capa == NULL) {\n \t\tRTE_LOG(ERR, USER1,\n@@ -767,6 +822,7 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \tmemset(ops, 0, sizeof(struct rte_comp_op *) * num_bufs);\n \tmemset(ops_processed, 0, sizeof(struct rte_comp_op *) * num_bufs);\n \tmemset(priv_xforms, 0, sizeof(void *) * num_bufs);\n+\tmemset(compressed_data_size, 0, sizeof(uint32_t) * num_bufs);\n \n \tif (big_data)\n \t\tbuf_pool = ts_params->big_mbuf_pool;\n@@ -799,7 +855,13 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t} else {\n \t\tfor (i = 0; i < num_bufs; i++) {\n \t\t\tdata_size = strlen(test_bufs[i]) + 1;\n+\n \t\t\tbuf_ptr = rte_pktmbuf_append(uncomp_bufs[i], data_size);\n+\t\t\tif (buf_ptr == NULL) {\n+\t\t\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\t\t\"Append extra bytes to the source mbuf failed\\n\");\n+\t\t\t\tgoto exit;\n+\t\t\t}\n \t\t\tstrlcpy(buf_ptr, test_bufs[i], data_size);\n \t\t}\n \t}\n@@ -835,11 +897,22 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\tfor (i = 0; i < num_bufs; i++) {\n \t\t\tif (out_of_space == 1 && oos_zlib_decompress)\n \t\t\t\tdata_size = OUT_OF_SPACE_BUF;\n-\t\t\telse\n-\t\t\t\t(data_size = strlen(test_bufs[i]) *\n-\t\t\t\t\tCOMPRESS_BUF_SIZE_RATIO);\n-\n-\t\t\trte_pktmbuf_append(comp_bufs[i], data_size);\n+\t\t\telse {\n+\t\t\t\tfloat ratio =\n+\t\t\t\t((test_data->zlib_dir == ZLIB_DECOMPRESS ||\n+\t\t\t\t   test_data->zlib_dir == ZLIB_NONE) &&\n+\t\t\t\t  overflow_tst == OVERFLOW_ENABLED) ?\n+\t\t\t\t\t COMPRESS_BUF_SIZE_RATIO_OVERFLOW :\n+\t\t\t\t\t COMPRESS_BUF_SIZE_RATIO;\n+\n+\t\t\t\tdata_size = strlen(test_bufs[i]) * ratio;\n+\t\t\t}\n+\t\t\tbuf_ptr = rte_pktmbuf_append(comp_bufs[i], data_size);\n+\t\t\tif (buf_ptr == NULL) {\n+\t\t\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\t\t\"Append extra bytes to the destination mbuf failed\\n\");\n+\t\t\t\tgoto exit;\n+\t\t\t}\n \t\t}\n \t}\n \n@@ -852,7 +925,6 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\tgoto exit;\n \t}\n \n-\n \tfor (i = 0; i < num_bufs; i++) {\n \t\tops[i]->m_src = uncomp_bufs[i];\n \t\tops[i]->m_dst = comp_bufs[i];\n@@ -928,41 +1000,41 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\t\tfor (i = 0; i < num_bufs; i++)\n \t\t\t\tops[i]->private_xform = priv_xforms[i];\n \t\t}\n-\n-\t\t/* Enqueue and dequeue all operations */\n-\t\tnum_enqd = rte_compressdev_enqueue_burst(0, 0, ops, num_bufs);\n-\t\tif (num_enqd < num_bufs) {\n+recovery_lb:\n+\t\tret = test_run_enqueue_dequeue(ops, num_bufs, ops_processed);\n+\t\tif (ret < 0) {\n \t\t\tRTE_LOG(ERR, USER1,\n-\t\t\t\t\"The operations could not be enqueued\\n\");\n+\t\t\t\t\"Enqueue/dequeue operation failed\\n\");\n \t\t\tgoto exit;\n \t\t}\n \n-\t\tnum_total_deqd = 0;\n-\t\tdo {\n-\t\t\t/*\n-\t\t\t * If retrying a dequeue call, wait for 10 ms to allow\n-\t\t\t * enough time to the driver to process the operations\n-\t\t\t */\n-\t\t\tif (deqd_retries != 0) {\n-\t\t\t\t/*\n-\t\t\t\t * Avoid infinite loop if not all the\n-\t\t\t\t * operations get out of the device\n-\t\t\t\t */\n-\t\t\t\tif (deqd_retries == MAX_DEQD_RETRIES) {\n+\t\tfor (i = 0; i < num_bufs; i++) {\n+\t\t\tcompressed_data_size[i] += ops_processed[i]->produced;\n+\n+\t\t\tif (ops_processed[i]->status ==\n+\t\t\t\tRTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) {\n+\n+\t\t\t\tops[i]->status =\n+\t\t\t\t\tRTE_COMP_OP_STATUS_NOT_PROCESSED;\n+\t\t\t\tops[i]->src.offset +=\n+\t\t\t\t\tops_processed[i]->consumed;\n+\t\t\t\tops[i]->src.length -=\n+\t\t\t\t\tops_processed[i]->consumed;\n+\t\t\t\tops[i]->dst.offset +=\n+\t\t\t\t\tops_processed[i]->produced;\n+\n+\t\t\t\tbuf_ptr = rte_pktmbuf_append(\n+\t\t\t\t\tops[i]->m_dst,\n+\t\t\t\t\tops_processed[i]->produced);\n+\n+\t\t\t\tif (buf_ptr == NULL) {\n \t\t\t\t\tRTE_LOG(ERR, USER1,\n-\t\t\t\t\t\t\"Not all operations could be \"\n-\t\t\t\t\t\t\"dequeued\\n\");\n+\t\t\t\t\t\t\"Data recovery: append extra bytes to the current mbuf failed\\n\");\n \t\t\t\t\tgoto exit;\n \t\t\t\t}\n-\t\t\t\tusleep(DEQUEUE_WAIT_TIME);\n+\t\t\t\tgoto recovery_lb;\n \t\t\t}\n-\t\t\tnum_deqd = rte_compressdev_dequeue_burst(0, 0,\n-\t\t\t\t\t&ops_processed[num_total_deqd], num_bufs);\n-\t\t\tnum_total_deqd += num_deqd;\n-\t\t\tdeqd_retries++;\n-\n-\t\t} while (num_total_deqd < num_enqd);\n-\n+\t\t}\n \t\tdeqd_retries = 0;\n \n \t\t/* Free compress private xforms */\n@@ -1006,7 +1078,7 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \tfor (i = 0; i < num_bufs; i++) {\n \t\tif (out_of_space && oos_zlib_decompress) {\n \t\t\tif (ops_processed[i]->status !=\n-\t\t\t\t\tRTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED) {\n+\t\t\t\tRTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED) {\n \t\t\t\tret_status = -1;\n \n \t\t\t\tRTE_LOG(ERR, USER1,\n@@ -1071,7 +1143,13 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\t\t\tdata_size =\n \t\t\t\tstrlen(test_bufs[priv_data->orig_idx]) + 1;\n \n-\t\t\trte_pktmbuf_append(uncomp_bufs[i], data_size);\n+\t\t\tbuf_ptr = rte_pktmbuf_append(uncomp_bufs[i], data_size);\n+\t\t\tif (buf_ptr == NULL) {\n+\t\t\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\t\t\"Append extra bytes to the decompressed mbuf failed\\n\");\n+\t\t\t\tgoto exit;\n+\t\t\t}\n+\n \t\t}\n \t}\n \n@@ -1093,7 +1171,12 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\t * Set the length of the compressed data to the\n \t\t * number of bytes that were produced in the previous stage\n \t\t */\n-\t\tops[i]->src.length = ops_processed[i]->produced;\n+\n+\t\tif (compressed_data_size[i])\n+\t\t\tops[i]->src.length = compressed_data_size[i];\n+\t\telse\n+\t\t\tops[i]->src.length = ops_processed[i]->produced;\n+\n \t\tops[i]->dst.offset = 0;\n \t\tif (state == RTE_COMP_OP_STATELESS) {\n \t\t\tops[i]->flush_flag = RTE_COMP_FLUSH_FINAL;\n@@ -1147,7 +1230,8 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\t\tnum_priv_xforms++;\n \t\t}\n \n-\t\tif (capa->comp_feature_flags & RTE_COMP_FF_SHAREABLE_PRIV_XFORM) {\n+\t\tif (capa->comp_feature_flags &\n+\t\t\t\tRTE_COMP_FF_SHAREABLE_PRIV_XFORM) {\n \t\t\t/* Attach shareable private xform data to ops */\n \t\t\tfor (i = 0; i < num_bufs; i++) {\n \t\t\t\tpriv_data = (struct priv_op_data *)(ops[i] + 1);\n@@ -1206,9 +1290,10 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\t\t\tusleep(DEQUEUE_WAIT_TIME);\n \t\t\t}\n \t\t\tnum_deqd = rte_compressdev_dequeue_burst(0, 0,\n-\t\t\t\t\t&ops_processed[num_total_deqd], num_bufs);\n+\t\t\t\t&ops_processed[num_total_deqd], num_bufs);\n \t\t\tnum_total_deqd += num_deqd;\n \t\t\tdeqd_retries++;\n+\n \t\t} while (num_total_deqd < num_enqd);\n \n \t\tdeqd_retries = 0;\n@@ -1233,7 +1318,7 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \tfor (i = 0; i < num_bufs; i++) {\n \t\tif (out_of_space && oos_zlib_compress) {\n \t\t\tif (ops_processed[i]->status !=\n-\t\t\t\t\tRTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED) {\n+\t\t\t\tRTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED) {\n \t\t\t\tret_status = -1;\n \n \t\t\t\tRTE_LOG(ERR, USER1,\n@@ -1358,7 +1443,8 @@ test_compressdev_deflate_stateless_fixed(void)\n \t\tLB_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1429,7 +1515,8 @@ test_compressdev_deflate_stateless_dynamic(void)\n \t\tLB_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1483,7 +1570,8 @@ test_compressdev_deflate_stateless_multi_op(void)\n \t\tLB_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \t/* Compress with compressdev, decompress with Zlib */\n@@ -1533,7 +1621,8 @@ test_compressdev_deflate_stateless_multi_level(void)\n \t\tLB_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1623,7 +1712,8 @@ test_compressdev_deflate_stateless_multi_xform(void)\n \t\tLB_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \t/* Compress with compressdev, decompress with Zlib */\n@@ -1669,7 +1759,8 @@ test_compressdev_deflate_stateless_sgl(void)\n \t\tSGL_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1777,7 +1868,8 @@ test_compressdev_deflate_stateless_checksum(void)\n \t\tLB_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \t/* Check if driver supports crc32 checksum and test */\n@@ -1908,7 +2000,8 @@ test_compressdev_out_of_space_buffer(void)\n \t\tLB_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t1,  /* run out-of-space test */\n-\t\t0\n+\t\t0,\n+\t\tOVERFLOW_DISABLED\n \t};\n \t/* Compress with compressdev, decompress with Zlib */\n \ttest_data.zlib_dir = ZLIB_DECOMPRESS;\n@@ -1989,7 +2082,8 @@ test_compressdev_deflate_stateless_dynamic_big(void)\n \t\tSGL_BOTH,\n \t\tZLIB_DECOMPRESS,\n \t\t0,\n-\t\t1\n+\t\t1,\n+\t\tOVERFLOW_DISABLED\n \t};\n \n \tts_params->def_comp_xform->compress.deflate.huffman =\n@@ -2023,6 +2117,78 @@ test_compressdev_deflate_stateless_dynamic_big(void)\n }\n \n \n+static int\n+test_compressdev_deflate_stateless_fixed_overflow(void)\n+{\n+\tstruct comp_testsuite_params *ts_params = &testsuite_params;\n+\tuint16_t i;\n+\tint ret;\n+\tconst struct rte_compressdev_capabilities *capab;\n+\n+\tcapab = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE);\n+\tTEST_ASSERT(capab != NULL, \"Failed to retrieve device capabilities\");\n+\n+\tif ((capab->comp_feature_flags & RTE_COMP_FF_HUFFMAN_FIXED) == 0)\n+\t\treturn -ENOTSUP;\n+\n+\tstruct rte_comp_xform *compress_xform =\n+\t\t\trte_malloc(NULL, sizeof(struct rte_comp_xform), 0);\n+\n+\tif (compress_xform == NULL) {\n+\t\tRTE_LOG(ERR, USER1,\n+\t\t\t\"Compress xform could not be created\\n\");\n+\t\tret = TEST_FAILED;\n+\t\tgoto exit;\n+\t}\n+\n+\tmemcpy(compress_xform, ts_params->def_comp_xform,\n+\t\t\tsizeof(struct rte_comp_xform));\n+\tcompress_xform->compress.deflate.huffman = RTE_COMP_HUFFMAN_FIXED;\n+\n+\tstruct interim_data_params int_data = {\n+\t\tNULL,\n+\t\t1,\n+\t\tNULL,\n+\t\t&compress_xform,\n+\t\t&ts_params->def_decomp_xform,\n+\t\t1\n+\t};\n+\n+\tstruct test_data_params test_data = {\n+\t\tRTE_COMP_OP_STATELESS,\n+\t\tLB_BOTH,\n+\t\tZLIB_DECOMPRESS,\n+\t\t0,\n+\t\t0,\n+\t\tOVERFLOW_ENABLED\n+\t};\n+\n+\tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n+\t\tint_data.test_bufs = &compress_test_bufs[i];\n+\t\tint_data.buf_idx = &i;\n+\n+\t\t/* Compress with compressdev, decompress with Zlib */\n+\t\ttest_data.zlib_dir = ZLIB_DECOMPRESS;\n+\t\tif (test_deflate_comp_decomp(&int_data, &test_data) < 0) {\n+\t\t\tret = TEST_FAILED;\n+\t\t\tgoto exit;\n+\t\t}\n+\n+\t\t/* Compress with Zlib, decompress with compressdev */\n+\t\ttest_data.zlib_dir = ZLIB_COMPRESS;\n+\t\tif (test_deflate_comp_decomp(&int_data, &test_data) < 0) {\n+\t\t\tret = TEST_FAILED;\n+\t\t\tgoto exit;\n+\t\t}\n+\t}\n+\n+\tret = TEST_SUCCESS;\n+\n+exit:\n+\trte_free(compress_xform);\n+\treturn ret;\n+}\n+\n static struct unit_test_suite compressdev_testsuite  = {\n \t.suite_name = \"compressdev unit test suite\",\n \t.setup = testsuite_setup,\n@@ -2048,6 +2214,8 @@ static struct unit_test_suite compressdev_testsuite  = {\n \t\t\ttest_compressdev_deflate_stateless_checksum),\n \t\tTEST_CASE_ST(generic_ut_setup, generic_ut_teardown,\n \t\t\ttest_compressdev_out_of_space_buffer),\n+\t\tTEST_CASE_ST(generic_ut_setup, generic_ut_teardown,\n+\t\t\ttest_compressdev_deflate_stateless_fixed_overflow),\n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n };\n",
    "prefixes": [
        "2/2"
    ]
}