get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61294,
    "url": "http://patches.dpdk.org/api/patches/61294/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191016094045.19895-3-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": "<20191016094045.19895-3-arturx.trybula@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191016094045.19895-3-arturx.trybula@intel.com",
    "date": "2019-10-16T09:40:45",
    "name": "[v4,2/2] test/compress: unit test for stateless overflow recovery",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "eb16841cf3c2eaa68bbbcd950165bfe3b0b26f00",
    "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/20191016094045.19895-3-arturx.trybula@intel.com/mbox/",
    "series": [
        {
            "id": 6878,
            "url": "http://patches.dpdk.org/api/series/6878/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6878",
            "date": "2019-10-16T09:40:43",
            "name": "Add overflow recovery for stateless compression",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/6878/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/61294/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/61294/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 DCEAD1E8D1;\n\tWed, 16 Oct 2019 11:40:58 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id DEF171E8E9\n\tfor <dev@dpdk.org>; Wed, 16 Oct 2019 11:40:54 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Oct 2019 02:40:54 -0700",
            "from atrybulx-mobl.ger.corp.intel.com (HELO\n\tbuild-VirtualBox.isw.intel.com) ([10.103.104.115])\n\tby orsmga001.jf.intel.com with ESMTP; 16 Oct 2019 02:40:52 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.67,303,1566889200\"; d=\"scan'208\";a=\"279476721\"",
        "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": "Wed, 16 Oct 2019 11:40:45 +0200",
        "Message-Id": "<20191016094045.19895-3-arturx.trybula@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191016094045.19895-1-arturx.trybula@intel.com>",
        "References": "<20191011174613.4770-1-arturx.trybula@intel.com>\n\t<20191016094045.19895-1-arturx.trybula@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 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 | 280 ++++++++++++++++++++++++++++++------\n 1 file changed, 233 insertions(+), 47 deletions(-)",
    "diff": "diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c\nindex d470c34b9..283c64971 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@@ -72,6 +73,11 @@ enum varied_buff {\n \tLB_TO_SGL\t/* output buffer is chained */\n };\n \n+enum overflow_test {\n+\tOVERFLOW_DISABLED,\n+\tOVERFLOW_ENABLED\n+};\n+\n struct priv_op_data {\n \tuint16_t orig_idx;\n };\n@@ -110,6 +116,8 @@ struct test_data_params {\n \tconst struct rte_memzone *inbuf_memzone;\n \tconst struct rte_memzone *compbuf_memzone;\n \tconst struct rte_memzone *uncompbuf_memzone;\n+\t/* overflow test activation */\n+\tenum overflow_test overflow;\n };\n \n static struct comp_testsuite_params testsuite_params = { 0 };\n@@ -725,6 +733,49 @@ extbuf_free_callback(void *addr __rte_unused, void *opaque __rte_unused)\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@@ -745,6 +796,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 = TEST_FAILED;\n \tstruct rte_mbuf_ext_shared_info inbuf_info;\n \tstruct rte_mbuf_ext_shared_info compbuf_info;\n@@ -773,6 +825,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 \tvoid *stream = NULL;\n \tchar *all_decomp_data = NULL;\n \tunsigned int decomp_produced_data_size = 0;\n@@ -793,6 +846,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 (decompress_state == RTE_COMP_OP_STATEFUL) {\n \t\tdata_size = strlen(test_bufs[0]) + 1;\n@@ -845,6 +899,11 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\tfor (i = 0; i < num_bufs; i++) {\n \t\t\tdata_size = strlen(test_bufs[i]) + 1;\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@@ -893,11 +952,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@@ -963,7 +1033,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\tops[i]->private_xform = priv_xforms[i % num_xforms];\n@@ -987,40 +1058,41 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\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@@ -1064,7 +1136,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 = TEST_FAILED;\n \t\t\t\tRTE_LOG(ERR, USER1,\n \t\t\t\t\t\"Operation without expected out of \"\n@@ -1075,6 +1147,16 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,\n \t\t}\n \n \t\tif (ops_processed[i]->status != RTE_COMP_OP_STATUS_SUCCESS) {\n+\t\t\tif (overflow_tst == OVERFLOW_ENABLED) {\n+\t\t\t\tif (ops_processed[i]->status ==\n+\t\t\t\tRTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED) {\n+\t\t\t\t\tret_status = 1;\n+\t\t\t\t\tRTE_LOG(INFO, USER1,\n+\t\t\t\t\t\"Out-of-space-recoverable functionality\"\n+\t\t\t\t\t\" is not supported on this device\\n\");\n+\t\t\t\t\tgoto exit;\n+\t\t\t\t}\n+\t\t\t}\n \t\t\tRTE_LOG(ERR, USER1,\n \t\t\t\t\"Some operations were not successful\\n\");\n \t\t\tgoto exit;\n@@ -1147,7 +1229,12 @@ 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 \t\t}\n \t}\n \n@@ -1169,7 +1256,10 @@ 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+\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 (decompress_state == RTE_COMP_OP_STATELESS) {\n@@ -1541,7 +1631,8 @@ test_compressdev_deflate_stateless_fixed(void)\n \t\t.buff_type = LB_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1611,7 +1702,8 @@ test_compressdev_deflate_stateless_dynamic(void)\n \t\t.buff_type = LB_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1665,7 +1757,8 @@ test_compressdev_deflate_stateless_multi_op(void)\n \t\t.buff_type = LB_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \t/* Compress with compressdev, decompress with Zlib */\n@@ -1718,7 +1811,8 @@ test_compressdev_deflate_stateless_multi_level(void)\n \t\t.buff_type = LB_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1807,7 +1901,8 @@ test_compressdev_deflate_stateless_multi_xform(void)\n \t\t.buff_type = LB_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \t/* Compress with compressdev, decompress with Zlib */\n@@ -1855,7 +1950,8 @@ test_compressdev_deflate_stateless_sgl(void)\n \t\t.buff_type = SGL_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -1965,7 +2061,8 @@ test_compressdev_deflate_stateless_checksum(void)\n \t\t.buff_type = LB_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \t/* Check if driver supports crc32 checksum and test */\n@@ -2082,7 +2179,8 @@ test_compressdev_out_of_space_buffer(void)\n \t\t.buff_type = LB_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 1,  /* run out-of-space test */\n-\t\t.big_data = 0\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \t/* Compress with compressdev, decompress with Zlib */\n \ttest_data.zlib_dir = ZLIB_DECOMPRESS;\n@@ -2159,7 +2257,8 @@ test_compressdev_deflate_stateless_dynamic_big(void)\n \t\t.buff_type = SGL_BOTH,\n \t\t.zlib_dir = ZLIB_DECOMPRESS,\n \t\t.out_of_space = 0,\n-\t\t.big_data = 1\n+\t\t.big_data = 1,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \tts_params->def_comp_xform->compress.deflate.huffman =\n@@ -2223,7 +2322,8 @@ test_compressdev_deflate_stateful_decomp(void)\n \t\t.out_of_space = 0,\n \t\t.big_data = 0,\n \t\t.decompress_output_block_size = 2000,\n-\t\t.decompress_steps_max = 4\n+\t\t.decompress_steps_max = 4,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \t/* Compress with Zlib, decompress with compressdev */\n@@ -2305,7 +2405,8 @@ test_compressdev_deflate_stateful_decomp_checksum(void)\n \t\t.out_of_space = 0,\n \t\t.big_data = 0,\n \t\t.decompress_output_block_size = 2000,\n-\t\t.decompress_steps_max = 4\n+\t\t.decompress_steps_max = 4,\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \t/* Check if driver supports crc32 checksum and test */\n@@ -2441,7 +2542,8 @@ test_compressdev_external_mbufs(void)\n \t\t.inbuf_memzone = make_memzone(\"inbuf\", data_len),\n \t\t.compbuf_memzone = make_memzone(\"compbuf\", data_len *\n \t\t\t\t\t\tCOMPRESS_BUF_SIZE_RATIO),\n-\t\t.uncompbuf_memzone = make_memzone(\"decompbuf\", data_len)\n+\t\t.uncompbuf_memzone = make_memzone(\"decompbuf\", data_len),\n+\t\t.overflow = OVERFLOW_DISABLED\n \t};\n \n \tfor (i = 0; i < RTE_DIM(compress_test_bufs); i++) {\n@@ -2472,6 +2574,88 @@ test_compressdev_external_mbufs(void)\n \treturn ret;\n }\n \n+static int\n+test_compressdev_deflate_stateless_fixed_oos_recoverable(void)\n+{\n+\tstruct comp_testsuite_params *ts_params = &testsuite_params;\n+\tuint16_t i;\n+\tint ret;\n+\tint comp_result;\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\t.compress_state = RTE_COMP_OP_STATELESS,\n+\t\t.decompress_state = RTE_COMP_OP_STATELESS,\n+\t\t.buff_type = LB_BOTH,\n+\t\t.zlib_dir = ZLIB_DECOMPRESS,\n+\t\t.out_of_space = 0,\n+\t\t.big_data = 0,\n+\t\t.overflow = OVERFLOW_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\tcomp_result = test_deflate_comp_decomp(&int_data, &test_data);\n+\t\tif (comp_result < 0) {\n+\t\t\tret = TEST_FAILED;\n+\t\t\tgoto exit;\n+\t\t} else if (comp_result > 0) {\n+\t\t\tret = -ENOTSUP;\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\tcomp_result = test_deflate_comp_decomp(&int_data, &test_data);\n+\t\tif (comp_result < 0) {\n+\t\t\tret = TEST_FAILED;\n+\t\t\tgoto exit;\n+\t\t} else if (comp_result > 0) {\n+\t\t\tret = -ENOTSUP;\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@@ -2503,6 +2687,8 @@ static struct unit_test_suite compressdev_testsuite  = {\n \t\t\ttest_compressdev_deflate_stateful_decomp_checksum),\n \t\tTEST_CASE_ST(generic_ut_setup, generic_ut_teardown,\n \t\t\ttest_compressdev_external_mbufs),\n+\t\tTEST_CASE_ST(generic_ut_setup, generic_ut_teardown,\n+\t\ttest_compressdev_deflate_stateless_fixed_oos_recoverable),\n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n };\n",
    "prefixes": [
        "v4",
        "2/2"
    ]
}