From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E603A2EFC for ; Mon, 14 Oct 2019 16:20:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E4C991C0B7; Mon, 14 Oct 2019 16:20:29 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 11CF61C0B6 for ; Mon, 14 Oct 2019 16:20:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 07:20:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,295,1566889200"; d="scan'208";a="195007855" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga007.fm.intel.com with ESMTP; 14 Oct 2019 07:20:25 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 14 Oct 2019 07:20:25 -0700 Received: from hasmsx114.ger.corp.intel.com (10.184.198.65) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 14 Oct 2019 07:20:24 -0700 Received: from hasmsx107.ger.corp.intel.com ([169.254.2.187]) by HASMSX114.ger.corp.intel.com ([169.254.14.242]) with mapi id 14.03.0439.000; Mon, 14 Oct 2019 17:20:22 +0300 From: "Trybula, ArturX" To: "Trahe, Fiona" , "dev@dpdk.org" , "shallyv@marvell.com" , "Dybkowski, AdamX" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH v3 2/2] test/compress: unit test for stateless overflow recovery Thread-Index: AQHVgFypO4aNnr4EmEyt2ATK45ZnN6dZ+SoAgAA0FmA= Date: Mon, 14 Oct 2019 14:20:21 +0000 Message-ID: <5B6D1C77E9D7034C93E97BD83D1D9F572F22BBAB@hasmsx107.ger.corp.intel.com> References: <20190926093238.16663-1-arturx.trybula@intel.com> <20191011174613.4770-1-arturx.trybula@intel.com> <20191011174613.4770-3-arturx.trybula@intel.com> <348A99DA5F5B7549AA880327E580B435A21709CB@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B435A21709CB@IRSMSX101.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDc4MDg0MjMtNDI1Zi00YjQ2LTk4MTAtMDNkMzE0MWVkYjkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibHZkVWZZTmJRMncwdDlIQk0zak5leWRxQkFleFVTczZaU1VXK2Y3cXRRWm1vN1JjM1ByUldTaGQ4UmxlRDl5diJ9 x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 2/2] test/compress: unit test for stateless overflow recovery X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Fiona, Please find my answer below, -----Original Message----- From: Trahe, Fiona=20 Sent: Monday, October 14, 2019 15:49 To: Trybula, ArturX ; dev@dpdk.org; shallyv@marve= ll.com; Dybkowski, AdamX ; akhil.goyal@nxp.com Cc: Trahe, Fiona Subject: RE: [PATCH v3 2/2] test/compress: unit test for stateless overflow= recovery Hi Artur, > -----Original Message----- > From: Trybula, ArturX > Sent: Friday, October 11, 2019 6:46 PM > To: dev@dpdk.org; Trahe, Fiona ;=20 > shallyv@marvell.com; Dybkowski, AdamX ;=20 > Trybula, ArturX ; akhil.goyal@nxp.com > Subject: [PATCH v3 2/2] test/compress: unit test for stateless=20 > overflow recovery >=20 > Added unit test to check out-of-space recoverable feature. >=20 > Signed-off-by: Artur Trybula > --- > app/test/test_compressdev.c | 261=20 > +++++++++++++++++++++++++++++------- > 1 file changed, 214 insertions(+), 47 deletions(-) //snip// > @@ -987,40 +1058,41 @@ test_deflate_comp_decomp(const struct interim_data= _params *int_data, > ops[i]->private_xform =3D priv_xforms[i]; > } >=20 > - /* Enqueue and dequeue all operations */ > - num_enqd =3D rte_compressdev_enqueue_burst(0, 0, ops, num_bufs); > - if (num_enqd < num_bufs) { > +recovery_lb: > + ret =3D test_run_enqueue_dequeue(ops, num_bufs, ops_processed); > + if (ret < 0) { > RTE_LOG(ERR, USER1, > - "The operations could not be enqueued\n"); > + "Enqueue/dequeue operation failed\n"); > goto exit; > } >=20 > - num_total_deqd =3D 0; > - do { > - /* > - * If retrying a dequeue call, wait for 10 ms to allow > - * enough time to the driver to process the operations > - */ > - if (deqd_retries !=3D 0) { > - /* > - * Avoid infinite loop if not all the > - * operations get out of the device > - */ > - if (deqd_retries =3D=3D MAX_DEQD_RETRIES) { > + for (i =3D 0; i < num_bufs; i++) { > + compressed_data_size[i] +=3D ops_processed[i]->produced; > + > + if (ops_processed[i]->status =3D=3D > + RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) { > + > + ops[i]->status =3D > + RTE_COMP_OP_STATUS_NOT_PROCESSED; > + ops[i]->src.offset +=3D > + ops_processed[i]->consumed; > + ops[i]->src.length -=3D > + ops_processed[i]->consumed; > + ops[i]->dst.offset +=3D > + ops_processed[i]->produced; > + > + buf_ptr =3D rte_pktmbuf_append( > + ops[i]->m_dst, > + ops_processed[i]->produced); > + > + if (buf_ptr =3D=3D NULL) { > RTE_LOG(ERR, USER1, > - "Not all operations could be " > - "dequeued\n"); > + "Data recovery: append extra bytes to the current > mbuf failed\n"); > goto exit; > } > - usleep(DEQUEUE_WAIT_TIME); > + goto recovery_lb; > } > - num_deqd =3D rte_compressdev_dequeue_burst(0, 0, > - &ops_processed[num_total_deqd], num_bufs); > - num_total_deqd +=3D num_deqd; > - deqd_retries++; > - > - } while (num_total_deqd < num_enqd); > - > + } > deqd_retries =3D 0; //snip// Not all drivers support OUT_OF_SPACE_RECOVERABLE - some may return OUT_OF_S= PACE_TERMINATED. There's no capability feature-flag which can be checked before running the = test. How would this test behave in this case? Ideally it should recognise that OUT_OF_SPACE_TERMINATED is a valid respons= e, but indicates that the driver doesn't support RECOVERABLE status and so = return unsupported rather than failed. [Artur] It can fail if a device doesn't support overflow capability. Tomorr= ow I will run tests using ISAL.=20