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 9126DA0487 for ; Sat, 6 Jul 2019 11:31:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F3A55689; Sat, 6 Jul 2019 11:31:19 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 4F5762C60 for ; Sat, 6 Jul 2019 11:31:17 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x669U5qC027248; Sat, 6 Jul 2019 02:31:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=uHC3FpzyQwu7Ok4j1ZFf2syJzujSLlhPNHaB/ggltIA=; b=U5VgCQafP4DrhiG6Wmf5It+fQ6CAk1KFDPb8FJFMKPsCgBwJU3SumT9urQDkU7UYh0NX wrkPxStVaZzz0XQpqe7dc3rFMlRA7qq3Ulee35vVl9eJEKgndcDo0FCkI5MWVgM2k24c 3pLMpHf6mWevuJdvCaSsIDydGIKZb73lkePtZqw08yTjusE8k5q7XKtJyibC6BON5QKd TCVba0mR5aop38cUe1Tfu+4MqhZ1RsrHhyRY2f6YYn6VzaI8cHCHAaxyvOHlf4eVQfv7 uSQevX/MPp10qUdMK9RVxsQzQguuoIHXh4riAfoznIuiN3dbQpu8S4+P0SiSeQ76h7yQ JA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2tja5htkx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 06 Jul 2019 02:31:16 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sat, 6 Jul 2019 02:31:14 -0700 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (104.47.34.53) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sat, 6 Jul 2019 02:31:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uHC3FpzyQwu7Ok4j1ZFf2syJzujSLlhPNHaB/ggltIA=; b=bDmLGEgLIfTOR2SIhCe0Mj+bnUItZmfGVO8FhDqi0qHx8+rYCSR/0c4NaABefUtfUH7PN5yS3JU7Tal2bnxhnWvES/Pj2vE9FK/ds0qvHz8mYkK7tROnwA+vg5xlEcApS790R5LKzxDQYBan69z6L6K2LyRZ3Bg0VGOHo04BrP8= Received: from BN6PR1801MB2052.namprd18.prod.outlook.com (10.161.157.11) by BN6PR1801MB1859.namprd18.prod.outlook.com (10.161.154.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.19; Sat, 6 Jul 2019 09:31:09 +0000 Received: from BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b9c4:1fd1:a47e:cd72]) by BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b9c4:1fd1:a47e:cd72%6]) with mapi id 15.20.2032.022; Sat, 6 Jul 2019 09:31:09 +0000 From: Shally Verma To: Fiona Trahe , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "arturx.trybula@intel.com" , "tjozwiakgm@gmail.com" , Tomasz Jozwiak Thread-Topic: [EXT] [PATCH v7 1/6] app/test-compress-perf: add weak functions for multi-cores test Thread-Index: AQHVMyMdhhVe28oo/0KXA7hQUWDUPaa9NrHA Date: Sat, 6 Jul 2019 09:31:09 +0000 Message-ID: References: <20190703152418.8601-1-arturx.trybula@intel.com> <1562325340-3891-2-git-send-email-fiona.trahe@intel.com> In-Reply-To: <1562325340-3891-2-git-send-email-fiona.trahe@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.3] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7eb786d0-0b23-4d33-1b0c-08d701f4addf x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BN6PR1801MB1859; x-ms-traffictypediagnostic: BN6PR1801MB1859: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 00909363D5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(376002)(39850400004)(346002)(396003)(366004)(199004)(189003)(13464003)(476003)(486006)(74316002)(7736002)(305945005)(66066001)(11346002)(446003)(14444005)(86362001)(14454004)(102836004)(8676002)(8936002)(81156014)(81166006)(5660300002)(71200400001)(71190400001)(26005)(53546011)(6506007)(186003)(54906003)(110136005)(55236004)(52536014)(73956011)(55016002)(6246003)(9686003)(76116006)(66556008)(64756008)(66446008)(66946007)(2501003)(66476007)(68736007)(6116002)(3846002)(76176011)(4326008)(478600001)(316002)(2906002)(7696005)(229853002)(33656002)(256004)(99286004)(6436002)(53936002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1801MB1859; H:BN6PR1801MB2052.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: pdwEAvMr7YiRVRYchWqTZsXN0uu1nutPXTwf2zp9++VGVDMtDzN9MbZr3OX1NVISAf9v+1yiT2+2kmWbiPUvRMxUIVkiuzJ4uEh4CaQm2N+8EQ8Cb51etNk281EEF38jL/JRgtgzHpfY5/TW1a9TE+qckfaX8KeV0Glh8tkD+ak6NrajP79zjyGZ/aeQzzXxKfJpyXHIbn7i08b/XwZWprlgP90LlFh2NPHvwh2U0F4fhHNEci8TzM3xpnTBxDSPkom98IhUk2OvuTmuNN21PdO79XVtZ0aX+hAgAOcuKGCvQNpzsdgJ0RYknPeCts832AvMNCvx9yiQ02nKkglBLCUXAKLh6MrN2CbLrt1QfWxErSzCtX3FJ/msE3+mVsMy5NvFin6ZYpXNPaKeoAh+dt2m9Rosvl6H+5TTtR3izWE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7eb786d0-0b23-4d33-1b0c-08d701f4addf X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2019 09:31:09.6262 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: shallyv@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1801MB1859 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-06_02:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v7 1/6] app/test-compress-perf: add weak functions for multi-cores test 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" > -----Original Message----- > From: Fiona Trahe > Sent: Friday, July 5, 2019 4:46 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; Shally Verma ; > arturx.trybula@intel.com; tjozwiakgm@gmail.com; fiona.trahe@intel.com; > Tomasz Jozwiak > Subject: [EXT] [PATCH v7 1/6] app/test-compress-perf: add weak functions > for multi-cores test >=20 > External Email >=20 > ---------------------------------------------------------------------- ... .... > +enum cperf_perf_test_type { I think I had feedback here on enum name: it can be just cperf_test_type > + CPERF_TEST_TYPE_BENCHMARK, > + CPERF_TEST_TYPE_VERIFY > +}; > + ... > struct comp_test_data { > char driver_name[64]; > char input_file[64]; Rather than using magic number better use MACRO NAME? also where is limitat= ion mentioned on name sizes? > - struct rte_mbuf **comp_bufs; > - struct rte_mbuf **decomp_bufs; > - uint32_t total_bufs; > + enum cperf_perf_test_type test; > + > uint8_t *input_data; > size_t input_data_sz; > - uint8_t *compressed_data; > - uint8_t *decompressed_data; > - struct rte_mempool *comp_buf_pool; > - struct rte_mempool *decomp_buf_pool; > - struct rte_mempool *op_pool; > - int8_t cdev_id; > + uint16_t nb_qps; > uint16_t seg_sz; > uint16_t out_seg_sz; > uint16_t burst_sz; > uint32_t pool_sz; > uint32_t num_iter; > uint16_t max_sgl_segs; > + > enum rte_comp_huffman huffman_enc; > enum comp_operation test_op; > int window_sz; > - struct range_list level; > - /* Store TSC duration for all levels (including level 0) */ > - uint64_t comp_tsc_duration[RTE_COMP_LEVEL_MAX + 1]; > - uint64_t decomp_tsc_duration[RTE_COMP_LEVEL_MAX + 1]; > - size_t comp_data_sz; > - size_t decomp_data_sz; > + struct range_list level_lst; > + uint8_t level; > + > double ratio; > - double comp_gbps; > - double decomp_gbps; > - double comp_tsc_byte; > - double decomp_tsc_byte; > + enum cleanup_st cleanup; > }; >=20 > int > diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test- > compress-perf/comp_perf_options_parse.c > index a7a8c1f9e..74ea81d09 100644 > --- a/app/test-compress-perf/comp_perf_options_parse.c > +++ b/app/test-compress-perf/comp_perf_options_parse.c ... > @@ -500,7 +501,6 @@ struct long_opt_parser { }; >=20 > static struct option lgopts[] =3D { > - ... > - test_data->level.min =3D 1; > - test_data->level.max =3D 9; > - test_data->level.inc =3D 1; > + test_data->level_lst.min =3D 1; > + test_data->level_lst.max =3D 9; > + test_data->level_lst.inc =3D 1; Replace by Macro? > + test_data->test =3D CPERF_TEST_TYPE_BENCHMARK; > } >=20 > int > diff --git a/app/test-compress-perf/comp_perf_test_common.c b/app/test- > compress-perf/comp_perf_test_common.c > new file mode 100644 > index 000000000..dc9d0b0f4 > --- /dev/null > +++ b/app/test-compress-perf/comp_perf_test_common.c > @@ -0,0 +1,284 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2019 Intel Corporation > + */ > + > +#include > +#include > +#include > +#include > + > +#include "comp_perf_options.h" > +#include "comp_perf_test_verify.h" > +#include "comp_perf_test_benchmark.h" > +#include "comp_perf.h" Should this is before comp_perf_xx files to maintain alphabetical order? > +#include "comp_perf_test_common.h" > + ... > + > +static uint32_t > +find_buf_size(uint32_t input_size) > +{ > + uint32_t i; > + > + /* From performance point of view the buffer size should be a > + * power of 2 but also should be enough to store incompressible data > + */ > + > + /* We're looking for nearest power of 2 buffer size, which is greather Typo: greater > + * than input_size > + */ > + uint32_t size =3D > + !input_size ? MIN_COMPRESSED_BUF_SIZE : (input_size << > 1); > + > + for (i =3D UINT16_MAX + 1; !(i & size); i >>=3D 1) > + ; > + > + return i > ((UINT16_MAX + 1) >> 1) > + ? (uint32_t)((float)input_size * EXPANSE_RATIO) > + : i; > +} > + ... > -- > 2.13.6