From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700084.outbound.protection.outlook.com [40.107.70.84]) by dpdk.org (Postfix) with ESMTP id 2086114EC for ; Tue, 6 Nov 2018 09:15:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2Q9jqcHFHfb/gcyDxWZTEQt+DS+zBhV+TE4tC2MdQI4=; b=dG3tWPm+9RA6jH6CK4cNhrBkRPiriAUm4i6hvzElUIFsO0P+Og8d48Iojsd1g5LB88LRGh6hmBJn06tMaeYUjsRdcF4DAzYk8ydBqQ1TE/vd98+4ZNEwVEDxJZCuEGKM9u8jWI6lw5KaMPRGYgC1hAslznlRjxdQl/wlXJpDGN4= Received: from SN6PR07MB5152.namprd07.prod.outlook.com (52.135.101.33) by SN6PR07MB5759.namprd07.prod.outlook.com (20.177.252.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Tue, 6 Nov 2018 08:15:44 +0000 Received: from SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::49cb:b2a:974:2211]) by SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::49cb:b2a:974:2211%4]) with mapi id 15.20.1294.034; Tue, 6 Nov 2018 08:15:44 +0000 From: "Verma, Shally" To: "Jozwiak, TomaszX" , "dev@dpdk.org" , "Trahe, Fiona" , "akhil.goyal@nxp.com" Thread-Topic: [dpdk-dev] [PATCH 2/3] app/compress-perf: add performance measurement Thread-Index: AQHUWYqjhLJt3XAtpkeXnW8WfRqeNaUVmp7AgCbXsACABJ3+AIABizAAgAACQCA= Date: Tue, 6 Nov 2018 08:15:44 +0000 Message-ID: References: <1538400427-20164-1-git-send-email-tomaszx.jozwiak@intel.com> <1538400427-20164-3-git-send-email-tomaszx.jozwiak@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB5759; 6:U+Cw0UUthpVbfuk11mWM3zva8bzWlo+F/qf7k5GHrKkjaoRIZUN4ipikjqUE1gPClTCtaiiJgckVu9w213/e+k4O9h6FraZAsll/PNuPfYLdFyHuK7gcfrxEQ4M4DcF/M39p0+1rxVZcrqgpVk9MJwqoiQPiSbtVjzsM1SVcTcVdCzH4oIfzx2/dSKDkFjx39Sqpc4b/cSHL7ujyV4bRqf94Cj8ENkDWds620jg0tihLDD3bdh2SCC3wP8XI85P0etrmqaEgO046us+A9uam0YjH1BtTUrY4lqYBUNsVLrlIHPP2AxS0mDui7o4SnDWzaXiLI+9PUPD9jkkdaZx6m+fKJHlcSrGWjYmOfSLxYS8chQ1eEzXN/tLc4rBxL8nv/7ruyVk6CnbEO/zYAjse2KGA0aIRXH4tYl+wcUE0Ni+lah4uQAhCG41uf/nCMajvZp5RWKIqIMyApb7CKNguvw==; 5:D667MyLIn/+zW2fjnf5uUJ4qX4ev5vTiOqv619e070bFqfjQT+6uHMPSaz6g2MqTIBtVAtzBcHrYpX2CafLwfC0ooP28ZN/B6LLtns4HoQRbzeP7JmCTpRSVqyEG0MYvhX1Le22c6sofSgXYnidTzitDCmsFwMhNld411MFDsDA=; 7:960p6Ez+bg63d5q3XXVxI5ATu3Sj6HXXJrrNEWmaYH/XQ0c4W2tTvMKbMqifymBlZbFHuISgK2De+V08IC0dIMNWyOmnRAsRokHacAieiNLeOYmgrbKi+r6qM2d+C0w3lDcC0+ace6mOtUfupxkLjg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 80bd5b5d-3440-4e2f-deea-08d643c00ce0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5759; x-ms-traffictypediagnostic: SN6PR07MB5759: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699)(17755550239193); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB5759; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5759; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(366004)(396003)(39860400002)(199004)(13464003)(189003)(256004)(81156014)(478600001)(5660300001)(66066001)(97736004)(486006)(105586002)(11346002)(106356001)(25786009)(74316002)(476003)(229853002)(186003)(446003)(76176011)(102836004)(33656002)(99286004)(316002)(93886005)(53936002)(6116002)(26005)(55016002)(6506007)(55236004)(72206003)(53546011)(68736007)(6436002)(2900100001)(6246003)(53946003)(7736002)(2906002)(86362001)(305945005)(8936002)(110136005)(4744004)(2501003)(71190400001)(81166006)(7696005)(3846002)(14454004)(9686003)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5759; H:SN6PR07MB5152.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: JpLzh3JUPjwviTawv1c/d0ZGsBB85OvH/1tbWEXBTxs1/WFNxU2YufLIwOJflh/O1GZnNESg0XPo/XnBVI4kyVS06+dTqAJPzCgthfUpNUcTHV3hXCzy+bUNeawqhX4OjG7Pf223LuvI2MkVpxnVbIFyypdFn6zit4AaJVPZspPNIUa58lMsRd2Wag8i1LN10p5lvJJ3BtsKGLVvCP0inmIkoKFgo2Iwh8gdky/h+JSyjeOMPwuo9S3yfHzyIR7qyu+3q6ngb490qqs1vfm0Xt9hBRLl3bksF0Azdq/a+36Um2Tkmw0q5HcT3E0duBZKsF3ob5g2uoss92wT4z21MnW9ufnFzoxsNI1XQu++4sY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80bd5b5d-3440-4e2f-deea-08d643c00ce0 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 08:15:44.6598 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5759 Subject: Re: [dpdk-dev] [PATCH 2/3] app/compress-perf: add performance measurement 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: , X-List-Received-Date: Tue, 06 Nov 2018 08:15:47 -0000 >-----Original Message----- >From: Jozwiak, TomaszX >Sent: 06 November 2018 13:34 >To: Verma, Shally ; dev@dpdk.org; Trahe, Fiona ; akhil.goyal@nxp.com >Subject: RE: [dpdk-dev] [PATCH 2/3] app/compress-perf: add performance mea= surement > >External Email > >Hi Shally, > >Please see my comment inline. > >> -----Original Message----- >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] >> Sent: Monday, November 5, 2018 9:34 AM >> To: Jozwiak, TomaszX ; dev@dpdk.org; Trahe, >> Fiona ; akhil.goyal@nxp.com; De Lara Guarch, Pabl= o >> >> Cc: De@dpdk.org; Lara@dpdk.org; Guarch@dpdk.org >> Subject: RE: [dpdk-dev] [PATCH 2/3] app/compress-perf: add performance >> measurement >> >> >> >> >-----Original Message----- >> >From: Jozwiak, TomaszX >> >Sent: 02 November 2018 15:29 >> >To: dev@dpdk.org; Trahe, Fiona ; >> >akhil.goyal@nxp.com; Verma, Shally ; De Lara >> >Guarch, Pablo >> >Cc: De@dpdk.org; Lara@dpdk.org; Guarch@dpdk.org >> >Subject: RE: [dpdk-dev] [PATCH 2/3] app/compress-perf: add performance >> >measurement >> > >> >External Email >> > >> >Hi Shally, >> > >> >Sorry for delay - I was on sick leave. >> >We had some issues with dynamic compression test so I block this test >> >in V2. May be there's too late to add this into this release but we've = decided >> to send this V2 to DPDK. >> > >> >My comment inline (not all have answer so far, still working on that) >> > >> >> -----Original Message----- >> >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] >> >> Sent: Friday, October 12, 2018 12:16 PM >> >> To: Jozwiak, TomaszX ; dev@dpdk.org; >> >> Trahe, Fiona ; akhil.goyal@nxp.com; De Lara >> >> Guarch, Pablo >> >> Cc: De@dpdk.org; Lara@dpdk.org; Guarch@dpdk.org >> >> Subject: RE: [dpdk-dev] [PATCH 2/3] app/compress-perf: add >> >> performance measurement >> >> >> >> HI TomaszX >> >> >> >> Sorry for delay in response. Comments inline. >> >> >> >> >-----Original Message----- >> >> >From: dev On Behalf Of Tomasz Jozwiak >> >> >Sent: 01 October 2018 18:57 >> >> >To: dev@dpdk.org; fiona.trahe@intel.com; tomaszx.jozwiak@intel.com; >> >> >akhil.goyal@nxp.com; pablo.de.lara.guarch@intel.com >> >> >Cc: De@dpdk.org; Lara@dpdk.org; Guarch@dpdk.org >> >> >Subject: [dpdk-dev] [PATCH 2/3] app/compress-perf: add performance >> >> >measurement >> >> > >> >> >External Email >> >> > >> >> >Added performance measurement part into compression perf. test. >> >> > >> >> >Signed-off-by: De Lara Guarch, Pablo >> >> > >> >> >Signed-off-by: Tomasz Jozwiak >> >> >--- >> >> > app/test-compress-perf/main.c | 844 >> >> >++++++++++++++++++++++++++++++++++++++++++ >> >> > 1 file changed, 844 insertions(+) >> >> > >> >> >diff --git a/app/test-compress-perf/main.c >> >> >b/app/test-compress-perf/main.c index f52b98d..093dfaf 100644 >> >> >--- a/app/test-compress-perf/main.c >> >> >+++ b/app/test-compress-perf/main.c >> >> >@@ -5,13 +5,721 @@ >> >> > #include >> >> > #include >> >> > #include >> >> >+#include >> >> > #include >> >> > >> >> > #include "comp_perf_options.h" >> >> > >> >> >+#define NUM_MAX_XFORMS 16 >> >> >+#define NUM_MAX_INFLIGHT_OPS 512 >> >> >+#define EXPANSE_RATIO 1.05 >> >> >+#define MIN_ISAL_SIZE 8 >> >> >+ >> >> >+#define DIV_CEIL(a, b) ((a) / (b) + ((a) % (b) !=3D 0)) >> >> >+ >> >> >+static int >> >> >+param_range_check(uint16_t size, const struct rte_param_log2_range >> >> >+*range) { >> >> >+ unsigned int next_size; >> >> >+ >> >> >+ /* Check lower/upper bounds */ >> >> >+ if (size < range->min) >> >> >+ return -1; >> >> >+ >> >> >+ if (size > range->max) >> >> >+ return -1; >> >> >+ >> >> >+ /* If range is actually only one value, size is correct */ >> >> >+ if (range->increment =3D=3D 0) >> >> >+ return 0; >> >> >+ >> >> >+ /* Check if value is one of the supported sizes */ >> >> >+ for (next_size =3D range->min; next_size <=3D range->max; >> >> >+ next_size +=3D range->increment) >> >> >+ if (size =3D=3D next_size) >> >> >+ return 0; >> >> >+ >> >> >+ return -1; >> >> >+} >> >> >+ >> >> >+static int >> >> >+comp_perf_check_capabilities(struct comp_test_data *test_data) { >> >> >+ const struct rte_compressdev_capabilities *cap; >> >> >+ >> >> >+ cap =3D rte_compressdev_capability_get(test_data->cdev_id, >> >> >+ RTE_COMP_ALGO_DEFLATE); >> >> >+ >> >> >+ if (cap =3D=3D NULL) { >> >> >+ RTE_LOG(ERR, USER1, >> >> >+ "Compress device does not support DEFLATE\n"= ); >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ uint64_t comp_flags =3D cap->comp_feature_flags; >> >> >+ >> >> >+ /* Huffman enconding */ >> >> >+ if (test_data->huffman_enc =3D=3D RTE_COMP_HUFFMAN_FIXED && >> >> >+ (comp_flags & RTE_COMP_FF_HUFFMAN_FIXED) =3D= =3D 0) { >> >> >+ RTE_LOG(ERR, USER1, >> >> >+ "Compress device does not supported Fixed Hu= ffman\n"); >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ if (test_data->huffman_enc =3D=3D RTE_COMP_HUFFMAN_DYNAMIC >> && >> >> >+ (comp_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) = =3D=3D 0) >> { >> >> >+ RTE_LOG(ERR, USER1, >> >> >+ "Compress device does not supported Dynamic >> Huffman\n"); >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ /* Window size */ >> >> >+ if (test_data->window_sz !=3D -1) { >> >> >+ if (param_range_check(test_data->window_sz, >> >> >+ &cap->window_size) >> >> What if cap->window_size is 0 i.e. implementation default? >> > >> >TJ: You probably mean cap->window_size.increment =3D 0 (because >> >cap->window_size is a structure). In that case we check if >> >test_data->window_sz >=3Dmin and test_data->window_sz <=3D max only, >> because increment =3D 0 means (base on compression API) we have only one >> value of windows_size (no range is supported). >> But PMD can set min and max too 0 for such case. > >TJ: I can't see any issue in that case too. Maybe I don't understand what = you mean but the logic is as follow: >1) if you pass '--window-sz ...' param. into command line your intention= is to force that value of window size during test. We check is >this value is allow (by param_range_check() function). >2) if you plan to use default value - just don't pass '--window-sz' param.= in command line at all. In that case we get windows size from >window_size.max field, so if window_size.min=3D window_size.max=3D0 >test_data->window_sz will be zero, as well. >If you mean that behavior is not good - I will be grateful for other sugge= stions. This is fine. but I am thinking of 3rd case here: c) user pass window sz but PMD window_sz.min =3D max =3D 0, then user reque= sted windowsz is not applicable right?! > >> >> > >> > >> > >> .... >> >> >> >+ >> >> >+ if (fread(data, data_to_read, 1, f) !=3D 1) { >> >> >+ RTE_LOG(ERR, USER1, "Input file could not be= read\n"); >> >> >+ goto err; >> >> >+ } >> >> >+ if (fseek(f, 0, SEEK_SET) !=3D 0) { >> >> >+ RTE_LOG(ERR, USER1, >> >> >+ "Size of input could not be calculat= ed\n"); >> >> >+ goto err; >> >> >+ } >> >> >+ remaining_data -=3D data_to_read; >> >> >+ data +=3D data_to_read; >> >> It looks like it will run 2nd time only if input file size < input >> >> data size in which case it will just keep filling input buffer with r= epeated >> data. >> >> Is that the intention here? >> > >> >TJ: Yes exactly. If test_data->input_data_sz is bigger than >> >actual_file_sz then we fill the buffer with repeated data from file to = fill >> whole buffer. >> I mentioned in one of the earlier reply, wont that then influence the >> compression behaviour and o/p? my suggestion was to work on actual user >> provided input to take perf to get actual perf for given content. > >TJ: You right, but this solution is flexible. You can pass ' --extended-in= put-sz" or not, so you can use original input data or extend it if >you want. Ok. but still not sure if it's really needed. Might be practically most of = the time it wont be exercised. No hard opinion on this though. Thanks Shally > >> >> > >> >> >> ... >> >> >> >+ if (data_addr =3D=3D NULL) { >> >> >+ RTE_LOG(ERR, USER1, "Could not >> >> >+ append data\n"); >> >> Since a new buffer per segment is allocated, so is it possible for >> >> append to fail? think, this check is redundant here. >> > >> >TJ: Yes, you're right, it should never fail. But I think it's good codi= ng practice >> to add the check just in case. >> > >> Unless it is called in data path which might cost perf a bit. > >TJ: prepare_bufs() is out of perf measurement, so shouldn't impact to mea= surements. The performance measurement is inside >main_loop() only. > > >Br, Tomek > >> >> Thanks >> Shally >> >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ rte_memcpy(data_addr, input_data_ptr, data_s= z); >> >> >+ input_data_ptr +=3D data_sz; >> >> >+ remaining_data -=3D data_sz; >> >> >+ >> >> >+ if (rte_pktmbuf_chain(test_data->decomp_bufs= [i], >> >> >+ next_seg) < 0) { >> >> >+ RTE_LOG(ERR, USER1, "Could not chain= mbufs\n"); >> >> >+ return -1; >> >> >+ } >> >> >+ segs_per_mbuf++; >> >> >+ } >> >> >+ >> >> >+ /* Allocate data in output mbuf */ >> >> >+ test_data->comp_bufs[i] =3D >> >> >+ rte_pktmbuf_alloc(test_data->comp_buf_pool); >> >> >+ if (test_data->comp_bufs[i] =3D=3D NULL) { >> >> >+ RTE_LOG(ERR, USER1, "Could not allocate mbuf= \n"); >> >> >+ return -1; >> >> >+ } >> >> >+ data_addr =3D (uint8_t *) rte_pktmbuf_append( >> >> >+ test_data->comp_bufs[i], >> >> >+ test_data->seg_sz); >> >> >+ if (data_addr =3D=3D NULL) { >> >> >+ RTE_LOG(ERR, USER1, "Could not append data\n= "); >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ /* Chain mbufs if needed for output mbufs */ >> >> >+ for (j =3D 1; j < segs_per_mbuf; j++) { >> >> >+ struct rte_mbuf *next_seg =3D >> >> >+ >> >> >+ rte_pktmbuf_alloc(test_data->comp_buf_pool); >> >> >+ >> >> >+ if (next_seg =3D=3D NULL) { >> >> >+ RTE_LOG(ERR, USER1, >> >> >+ "Could not allocate mbuf\n")= ; >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ data_addr =3D (uint8_t *)rte_pktmbuf_append(= next_seg, >> >> >+ test_data->seg_sz); >> >> >+ >> >> >+ if (data_addr =3D=3D NULL) { >> >> >+ RTE_LOG(ERR, USER1, "Could not appen= d data\n"); >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ if (rte_pktmbuf_chain(test_data->comp_bufs[i= ], >> >> >+ next_seg) < 0) { >> >> >+ RTE_LOG(ERR, USER1, "Could not chain= mbufs\n"); >> >> >+ return -1; >> >> >+ } >> >> >+ } >> >> >+ } >> >> >+ >> >> >+ return 0; >> >> >+} >> >> >+ >> >> >+static void >> >> >+free_bufs(struct comp_test_data *test_data) { >> >> >+ uint32_t i; >> >> >+ >> >> >+ for (i =3D 0; i < test_data->total_bufs; i++) { >> >> >+ rte_pktmbuf_free(test_data->comp_bufs[i]); >> >> >+ rte_pktmbuf_free(test_data->decomp_bufs[i]); >> >> >+ } >> >> >+ rte_free(test_data->comp_bufs); >> >> >+ rte_free(test_data->decomp_bufs); } >> >> >+ >> >> >+static int >> >> >+main_loop(struct comp_test_data *test_data, uint8_t level, >> >> >+ enum rte_comp_xform_type type, >> >> >+ uint8_t *output_data_ptr, >> >> >+ size_t *output_data_sz, >> >> >+ unsigned int benchmarking) { >> >> >+ uint8_t dev_id =3D test_data->cdev_id; >> >> >+ uint32_t i, iter, num_iter; >> >> >+ struct rte_comp_op **ops, **deq_ops; >> >> >+ void *priv_xform =3D NULL; >> >> >+ struct rte_comp_xform xform; >> >> >+ size_t output_size =3D 0; >> >> >+ struct rte_mbuf **input_bufs, **output_bufs; >> >> >+ int res =3D 0; >> >> >+ int allocated =3D 0; >> >> >+ >> >> >+ if (test_data =3D=3D NULL || !test_data->burst_sz) { >> >> >+ RTE_LOG(ERR, USER1, >> >> >+ "Unknow burst size\n"); >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ ops =3D rte_zmalloc_socket(NULL, >> >> >+ 2 * test_data->total_bufs * sizeof(struct rte_comp_o= p *), >> >> >+ 0, rte_socket_id()); >> >> >+ >> >> >+ if (ops =3D=3D NULL) { >> >> >+ RTE_LOG(ERR, USER1, >> >> >+ "Can't allocate memory for ops strucures\n")= ; >> >> >+ return -1; >> >> >+ } >> >> >+ >> >> >+ deq_ops =3D &ops[test_data->total_bufs]; >> >> >+ >> >> >+ if (type =3D=3D RTE_COMP_COMPRESS) { >> >> >+ xform =3D (struct rte_comp_xform) { >> >> >+ .type =3D RTE_COMP_COMPRESS, >> >> >+ .compress =3D { >> >> >+ .algo =3D RTE_COMP_ALGO_DEFLATE, >> >> >+ .deflate.huffman =3D test_data->huff= man_enc, >> >> >+ .level =3D level, >> >> >+ .window_size =3D test_data->window_s= z, >> >> >+ .chksum =3D RTE_COMP_CHECKSUM_NONE, >> >> >+ .hash_algo =3D RTE_COMP_HASH_ALGO_NO= NE >> >> >+ } >> >> >+ }; >> >> >+ input_bufs =3D test_data->decomp_bufs; >> >> >+ output_bufs =3D test_data->comp_bufs; >> >> >+ } else { >> >> >+ xform =3D (struct rte_comp_xform) { >> >> >+ .type =3D RTE_COMP_DECOMPRESS, >> >> >+ .decompress =3D { >> >> >+ .algo =3D RTE_COMP_ALGO_DEFLATE, >> >> >+ .chksum =3D RTE_COMP_CHECKSUM_NONE, >> >> >+ .window_size =3D test_data->window_s= z, >> >> >+ .hash_algo =3D RTE_COMP_HASH_ALGO_NO= NE >> >> >+ } >> >> >+ }; >> >> >+ input_bufs =3D test_data->comp_bufs; >> >> >+ output_bufs =3D test_data->decomp_bufs; >> >> >+ } >> >> >+ >> >> >+ /* Create private xform */ >> >> >+ if (rte_compressdev_private_xform_create(dev_id, &xform, >> >> >+ &priv_xform) < 0) { >> >> >+ RTE_LOG(ERR, USER1, "Private xform could not be crea= ted\n"); >> >> >+ res =3D -1; >> >> >+ goto end; >> >> >+ } >> >> >+ >> >> >+ uint64_t tsc_start, tsc_end, tsc_duration; >> >> >+ >> >> >+ tsc_start =3D tsc_end =3D tsc_duration =3D 0; >> >> >+ if (benchmarking) { >> >> >+ tsc_start =3D rte_rdtsc(); >> >> >+ num_iter =3D test_data->num_iter; >> >> >+ } else >> >> >+ num_iter =3D 1; >> >> Looks like in same code we're doing benchmarking and functional >> validation. >> >> It can be reorganised to keep validation test separately like done in >> >> crypto_perf. >> > >> >TJ: Ok, makes sense. However in the interests of getting this into the >> >18.11 release I'd like to defer this refactoring and the remainder of y= our >> comments below to the next release. >> > >> > >> >Next comments - WIP >> > >> > >> >Br, Tomek