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 43167A0487 for ; Sun, 30 Jun 2019 16:55:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A053F5680; Sun, 30 Jun 2019 16:55:20 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 7D38C559A for ; Sun, 30 Jun 2019 16:55:19 +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 x5UEtH25031741; Sun, 30 Jun 2019 07:55:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=LHVXlKG5U8yrikgSUMK42Xv9cs2o4+LFUHOLEUWuyzE=; b=yxUnPC/8gcyJFMRs9PRB0SMX7xH+HoD3I6cHwy4MoJ6X8AxvWApM/KHSZQULgsO48Ly0 /S7UcZJQw8pk95WRfVz+UfJlJlUCox+CvrzV9vekTnBgIn98a3Dj3SIxvtZu9xIfx8xo mbP/v6R6yjhTTIK0kgKH3MsyxyGUetwwfj9TXtRwprxtMeHnmA897s06bKNL3zArwuZC EDBZ049dU/Y9aAbxnXdNW9+W1dWJLIVdKrsGhjw+MSNe9LUt9QaxNlm+NAzTnNpgJuty oZNXVtI4eubgtBxoZPQu6Fr5Ae/5x1eHcOtwaqP8H3AeCt557e03wDFnmnTLdJLtUZ6T sA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2te7gm3g3h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 30 Jun 2019 07:55:17 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 30 Jun 2019 07:55:15 -0700 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (104.47.34.57) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 30 Jun 2019 07:55:15 -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=LHVXlKG5U8yrikgSUMK42Xv9cs2o4+LFUHOLEUWuyzE=; b=HPW1ysSHnBU5aCMoMGNFZQqHjxp4nTTSz84JYh4lsqIyR6L9busHCgY4prr9+eJYTIG08X5w2LjIY4a9eC9VeWckHv+vKa63cT6GDdou2Vxhyu73xRHdzIee7K9tS/rCTtlezyhhPsdCKlAYT7C54MhUKBHrF3OGOs+TfMxbDyk= Received: from BN6PR1801MB2052.namprd18.prod.outlook.com (10.161.157.11) by BN6PR1801MB1892.namprd18.prod.outlook.com (10.161.153.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Sun, 30 Jun 2019 14:55:13 +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.019; Sun, 30 Jun 2019 14:55:13 +0000 From: Shally Verma To: Tomasz Jozwiak , "dev@dpdk.org" , "fiona.trahe@intel.com" , "arturx.trybula@intel.com" Thread-Topic: [EXT] [PATCH v4 3/6] app/test-compress-perf: add verification test case Thread-Index: AQHVLTin5XIwk7dlok2O8UGrqhLwTqa0SbmA Date: Sun, 30 Jun 2019 14:55:13 +0000 Message-ID: References: <1561566633-12329-1-git-send-email-tjozwiakgm@gmail.com> <1561674337-22086-1-git-send-email-tjozwiakgm@gmail.com> <1561674337-22086-4-git-send-email-tjozwiakgm@gmail.com> In-Reply-To: <1561674337-22086-4-git-send-email-tjozwiakgm@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [171.49.225.231] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a1da2db3-315f-4173-8a06-08d6fd6af4f7 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:BN6PR1801MB1892; x-ms-traffictypediagnostic: BN6PR1801MB1892: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1265; x-forefront-prvs: 008421A8FF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(376002)(366004)(39850400004)(396003)(346002)(189003)(199004)(13464003)(76116006)(2906002)(186003)(66476007)(66946007)(73956011)(66556008)(229853002)(66066001)(76176011)(66446008)(64756008)(14454004)(5660300002)(52536014)(3846002)(99286004)(9686003)(7696005)(2501003)(55016002)(86362001)(26005)(6116002)(2201001)(7736002)(81166006)(81156014)(55236004)(8936002)(478600001)(25786009)(6246003)(33656002)(316002)(71200400001)(71190400001)(110136005)(53936002)(8676002)(68736007)(446003)(11346002)(6436002)(256004)(14444005)(15650500001)(102836004)(53546011)(74316002)(6506007)(476003)(305945005)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1801MB1892; H:BN6PR1801MB2052.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: 0ic2OCiTX2XvPA28rrmhnm3jgjmobXmgqI5S/qR3sdAVSaeFbnHPh621smKX6+vcfofRUVqiCkzd/YcjCDZWCeFGBa+iU75CyWkpcWKt4aQyAG4aTeK+8LfzPeXLqT4vGdNcoCIdEah7ioOJ1teHhVgHvofZYXiTvOtYDkd+mujx1MAOZKcjJIiF05e3RjmqoDEdf65NCXbefc50T/DIO056tkKp0sYpoEMLVg8nB8YAAjuCpsY7xPhQ46cbQqUEZuuYG3S27lmmcT2l1uG985enKpIXspv/xkzUltS5SEuYLzu8qY8RS6cvkqZNcGRCEqy2+ET+WRBqShrIsb5Llwu41NPcpaydTNjtvyquZHeGT22a4zEjASPb3SqYNXq6ZT265OnuqJ1AqskULz07tQUTgfT7xFlPTdrX4MNJgwQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: a1da2db3-315f-4173-8a06-08d6fd6af4f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2019 14:55:13.5799 (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: BN6PR1801MB1892 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-30_07:, , signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v4 3/6] app/test-compress-perf: add verification test case 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: Tomasz Jozwiak > Sent: Friday, June 28, 2019 3:56 AM > To: dev@dpdk.org; fiona.trahe@intel.com; tjozwiakgm@gmail.com; Shally > Verma ; arturx.trybula@intel.com > Subject: [EXT] [PATCH v4 3/6] app/test-compress-perf: add verification te= st > case >=20 > External Email >=20 > ---------------------------------------------------------------------- > From: Tomasz Jozwiak ... > diff --git a/app/test-compress-perf/comp_perf_test_verify.c b/app/test- > compress-perf/comp_perf_test_verify.c > index 28a0fe8..c2aab70 100644 > --- a/app/test-compress-perf/comp_perf_test_verify.c > +++ b/app/test-compress-perf/comp_perf_test_verify.c > @@ -8,14 +8,48 @@ > #include >=20 > #include "comp_perf_test_verify.h" > +#include "comp_perf_test_common.h" > + > +void > +cperf_verify_test_destructor(void *arg) { > + if (arg) { > + comp_perf_free_memory(&((struct cperf_verify_ctx *)arg)- > >mem); > + rte_free(arg); > + } > +} > + > +void * > +cperf_verify_test_constructor(uint8_t dev_id, uint16_t qp_id, > + struct comp_test_data *options) > +{ > + struct cperf_verify_ctx *ctx =3D NULL; > + > + ctx =3D rte_malloc(NULL, sizeof(struct cperf_verify_ctx), 0); > + Better just return from here > + if (ctx !=3D NULL) { > + ctx->mem.dev_id =3D dev_id; > + ctx->mem.qp_id =3D qp_id; > + ctx->options =3D options; > + > + if (!comp_perf_allocate_memory(ctx->options, &ctx->mem) > && > + !prepare_bufs(ctx->options, &ctx->mem)) > + return ctx; What if condition fails on comp_per_allocate_memory(), then it will go to v= erify_test_destructor(), so comp_perf_free_memory() check if mem !=3D NULL = before calling actual free? > + } > + > + cperf_verify_test_destructor(ctx); > + return NULL; > +} >=20 > 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) > +main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type) ... > -- > 2.7.4