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 D15D4A2EFC for ; Mon, 14 Oct 2019 15:48:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C1831C1C2; Mon, 14 Oct 2019 15:48:48 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 286262BE5 for ; Mon, 14 Oct 2019 15:48:45 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 06:48:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,295,1566889200"; d="scan'208";a="220107251" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga004.fm.intel.com with ESMTP; 14 Oct 2019 06:48:43 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.76]) by IRSMSX104.ger.corp.intel.com ([169.254.5.252]) with mapi id 14.03.0439.000; Mon, 14 Oct 2019 14:48:42 +0100 From: "Trahe, Fiona" To: "Trybula, ArturX" , "dev@dpdk.org" , "shallyv@marvell.com" , "Dybkowski, AdamX" , "akhil.goyal@nxp.com" CC: "Trahe, Fiona" Thread-Topic: [PATCH v3 2/2] test/compress: unit test for stateless overflow recovery Thread-Index: AQHVgFypaIdDzQcGb0mUDbKL/EO9RadaKLOg Date: Mon, 14 Oct 2019 13:48:42 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435A21709CB@IRSMSX101.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> In-Reply-To: <20191011174613.4770-3-arturx.trybula@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDc4MDg0MjMtNDI1Zi00YjQ2LTk4MTAtMDNkMzE0MWVkYjkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibHZkVWZZTmJRMncwdDlIQk0zak5leWRxQkFleFVTczZaU1VXK2Y3cXRRWm1vN1JjM1ByUldTaGQ4UmxlRDl5diJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.181] 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 Artur, > -----Original Message----- > From: Trybula, ArturX > Sent: Friday, October 11, 2019 6:46 PM > To: dev@dpdk.org; Trahe, Fiona ; shallyv@marvell.c= om; Dybkowski, AdamX > ; Trybula, ArturX ; = akhil.goyal@nxp.com > Subject: [PATCH v3 2/2] test/compress: unit test for stateless overflow r= ecovery >=20 > Added unit test to check out-of-space recoverable feature. >=20 > Signed-off-by: Artur Trybula > --- > app/test/test_compressdev.c | 261 +++++++++++++++++++++++++++++------- > 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.