From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690052.outbound.protection.outlook.com [40.107.69.52]) by dpdk.org (Postfix) with ESMTP id BBEE34C96 for ; Tue, 16 Oct 2018 07:18:26 +0200 (CEST) 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=gqwIEj3YsuNVTGPViYjD/r/FFAoUve6igeFtCFM1CPA=; b=ZALxfrNyMg2gPd6Ktz/oFRtYjc+BEu5O4SRc8zZX6LV0QhaJcHGuNOem3M2/5u+H6MgsOIhE/fjHGQriozUdaH3BnhCYSK3kpOvn94eDMaymXIw84Q1vQ6WmGW12qfbjEkXBemacbUARKVxIIqFBURyCUVkKutlPIo4PNEtDzBQ= Received: from SN6PR07MB5152.namprd07.prod.outlook.com (52.135.101.33) by SN6PR07MB4399.namprd07.prod.outlook.com (52.135.91.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Tue, 16 Oct 2018 05:18:24 +0000 Received: from SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::308f:470:554e:a3a4]) by SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::308f:470:554e:a3a4%5]) with mapi id 15.20.1228.027; Tue, 16 Oct 2018 05:18:24 +0000 From: "Verma, Shally" To: "Daly, Lee" CC: "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: AQHUZJk28lZzGIoUx06rWRnV5/lDBqUhU7QQ Date: Tue, 16 Oct 2018 05:18:24 +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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.3] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB4399; 6:QQLwk1Ae+Y8vs2d0SWIMFVpn8OwOrXUCBiRnRwRiQkKSB2IZo7c4XpcvI2u+puWVWvcdZ+oRLyLUIu1xDNhgKMKxjuKdUthuoDZnNnclVRG+o0qM+HwbcBV0kGRsQhwu5kJKd8UNbSHFXCSByCq9Ak0l9QHqhsBzm5dDgJTUEjf5jhgqfwfAjmihc61YM3SrnJtg6IeGTQz6SZdtioT5SW9tAaPiUD9dzKelufhyvnXg7nZaqXeikJZBfKgujwyXltQr50pYSgfT2+t6H4eaxai7st/GkVDI7RY+Sik4++mlZjAOM8NWdsShh8Pc7gJTAvIpI5KIiiitOnGzc/EF4CjmETogRyjOMMwq3g/+Vb0MOLexr8qjiZ1kACc624eGV0psNhQzHxLrQcAP0i2J5fGlpXIkPEbABNccbmY2qV02Nufu6h5+yJN1beINf1PHde3eIo9E3oiQwTSWWxfZYQ==; 5:yVJ11VdQqi1GgjzRjhjMXV+69uexqqeHWWC888jmPWYAryxl75Pq8hlciZdiPGO5hxay5lvKKHuubqZbGhKgzLTqljtVGn8aWN6dk9nNTGaXX+TrD52DsdU7UZ+pRPZNxdX9/iq20Z/ubOS6Dwd+keyULeHghWJgpoZrhugJtqk=; 7:neT99Ivu9v4jt85rntLnvNNc76Yw9GnQ2b+KKo8eK/LDiqVwKNHehiNjW8tNJEa8mujGkmQblTXrng+uILs2MfzCow7jj5LhdEcMql+K4nHVJJSfl12ONckxhNrk+5ViPs1EhLIX0dScY5LlzPQU3gUzIOu8WAyMdxK3gHEznGqCV7d0GpLTEOHsiVq0VHndO8YgDsc8khtEQEMXZTtuAdCGUrG6PhVQ/GOp2hs+5at6JkvPbXEt46pz4Lq3u/a6 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: d8873c22-78f6-4069-60e1-08d63326cbd7 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4399; x-ms-traffictypediagnostic: SN6PR07MB4399: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699051); SRVR:SN6PR07MB4399; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4399; x-forefront-prvs: 0827D7ACB9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(39850400004)(396003)(366004)(57704003)(199004)(189003)(51914003)(13464003)(9686003)(6506007)(105586002)(55016002)(106356001)(256004)(26005)(81166006)(81156014)(102836004)(93886005)(86362001)(186003)(305945005)(74316002)(68736007)(316002)(486006)(6436002)(7736002)(11346002)(476003)(229853002)(446003)(25786009)(8936002)(5250100002)(5660300001)(4326008)(97736004)(6916009)(71190400001)(7696005)(71200400001)(33656002)(2900100001)(66066001)(76176011)(99286004)(55236004)(53546011)(478600001)(6246003)(6116002)(3846002)(14454004)(72206003)(53936002)(54906003)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4399; 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: AdG4081qy7XE4oH1cOq5jkjSAAqbeBOmCfDXuiOmUj8XCXNlFdReGKzCYD33ObYGYE/D10LhyZmZtXsmrV4L4uBfSmrGdJk+qt7NmH8YNSueETbthd8qX/dZp0ZZtlJl/IU6VE3Zk6PAtM4GDsRbmW/GzrDLf7OonliD1nq79dUsOPkrfCjZxweDQFUFLsrpP45WRdw2xKGdaaVHsc/cfkWiVP0Fi9SkBGjA8WTxuEVH+k8FTkWVZWG5i+CLffOV2idDHLZOnvN0U8pbYTQcZ2nLLQP0wer6Ff2mMZkcs8KoPcGXlGYLue1weBqeRcnuXV9gRZeKcb9amIvkJE2CiD+kqgDA6br8vw2lTazIhq0= 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: d8873c22-78f6-4069-60e1-08d63326cbd7 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2018 05:18:24.0196 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4399 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, 16 Oct 2018 05:18:27 -0000 >-----Original Message----- >From: Daly, Lee >Sent: 15 October 2018 20:40 >To: Verma, Shally >Cc: Jozwiak, TomaszX ; dev@dpdk.org; Trahe, Fio= na ; akhil.goyal@nxp.com >Subject: RE: [dpdk-dev] [PATCH 2/3] app/compress-perf: add performance mea= surement > >External Email > >Thanks for your input Shally see comments below. > > >I will be reviewing these changes while Tomasz is out this week. > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Verma, Shally >> Sent: Friday, October 12, 2018 11:16 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 >> >> HI TomaszX >> >> Sorry for delay in response. Comments inline. >> > ><...> >> >+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 Huffm= an\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 Huf= fman\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? >What do you mean when you say cap->window_size =3D 0? >Cap->window_size is the range structure here, min, max and increment, whic= h are filled out by the driver. >Our implementation default in the perf tool will set the window size to ma= x the driver can support. If I recall and if I am not mixing my memories, I believe, we added a cond= ition in lib where driver can set window sz , min =3D 0 or max =3D 0 to jus= t mark implementation default. If that's not the case supported yet on lib,= then you can ignore this comment. > ... >> 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 repeated data. >> Is that the intention here? >>From what I can see, yes, this will only enter this while loop a second ti= me if the file is smaller than the data_size requested. >Repeating the data from your input file as much as requested. >If we were to pad with 0's or random data it would skew the ratio a lot. >Even though I do understand the ratio may be better here in this case as w= ell, due to the repetition of data. > Yea. So I think not to influence benchmark data here. we should stick to in= put filesz user is giving. As performance at a particular level will vary by content type so lets app choose and find= out performance for a given content type. >> ... >> >+ if (benchmarking) { >> >+ tsc_end =3D rte_rdtsc(); >> >+ tsc_duration =3D tsc_end - tsc_start; >> >+ >> >+ if (type =3D=3D RTE_COMP_COMPRESS) >> test looks for stateless operations only, so can we add perf test type l= ike: test >> type perf, op type:STATELESS/STATEFUL >Are you asking for the tool to support stateful ops? Since no drivers supp= ort stateful yet >We just wanted to ensure current driver functionality was covered with thi= s first version. Since it's an app so should be generic enough to be extensible for stateful= benchmarking. So, either we name app as test_comp_benchmark_statless or we make it generi= c to handling both, would be my suggestion. Thanks Shally > >>Also, why do we need --max-num- >> sgl-segs as an input option from user? Shouldn't input_sz and seg_sz >> internally decide on num-segs? >> Or is it added to serve some other different purpose? >Will have to get back to you on this one, seems illogical to get this inpu= t from user, >But I will have to do further investigation to find if there was a differe= nt purpose. >> >> Thanks >> Shally >> >Thanks for the feedback, >We hope to get V2 sent asap. >