From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E6EE842A50; Wed, 3 May 2023 17:00:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 744674114B; Wed, 3 May 2023 17:00:40 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 570AF41144 for ; Wed, 3 May 2023 17:00:38 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 343A6un1026271; Wed, 3 May 2023 08:00:37 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qbnjn10fg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 May 2023 08:00:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DpYq+VX+GqyebPWj62dHkn0Go+TDZVlaNP4qnHvP+wIraBVi8GqHXxClz9irJPqtVW4HrYURZyWRsOGjDUwecIcxUxncCB+ipEmkR8H0A0sS8aKpGOcCg6eR8yTd3BxaXMussrCgat3LPNtAWAcZSOH3d+ICV4uuEC/NgBzpmJMWoC/uZBfjCRz6tbcDxuF7jyOcgBRqnySpH6H5G6hRU2nrx3Bhqchbh1tEzgFTl5gmlhUIHptH+OfCqzZETTRmQXzNVyD5UlAMw8xUPiVZfznj8KrgyP9VHRu/oR0lF/I8RsYoLBELG1bfkausimhbCkZaYB/UgD3lBQVLE+WUvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qdR7/6ZASd4aC+dmaQOQELP4ILilDVsimK6myzCGF0c=; b=GJ40vrfA6ovBgEAIrFTyD1LcSlw5dxN26zKf0sDOheFtETF1vTAxPf27ZhQFt3iQt4s5A8CiZY2aUF1/KV4g7e3kUcXM4x9GoQUKxjr3lLa+z4vQq1Ye7IDB76DUZ1ySm+7rmbVrCmcpNxLYBoIf/j8wYbHt+3f1IWZ6Va+/HqQkh3v/TLytcVTlNf4YbCUyBHCt03ArQSf8jWMlmXUhk9aUMnOdIf/vAqbZKcOn8doT9R4dXKjHXTTFqAkS43jcS74ttwUhHKJp3ECtDEYdnqjnZgU1kJifgAtFHqpKaDK+DJfRh2Sd0KaN+yM/mF2B+yMWfy8RsbmWQng4gVOaDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qdR7/6ZASd4aC+dmaQOQELP4ILilDVsimK6myzCGF0c=; b=UQuC+r4QdDHeWJvKNkst1qX7TeUm5/bEEa4EduUBXK7zBSOT5a6efzRokxq7bWzAPbBAedhi4Qn3982NmBUWnELpm+OLHr4PSIQuzXJ25tAQy6fz70KaePdWuXfhS5evZTWUzcq3PVfQRwvV1G0DNZc8r3h30PCeSwPADdko+S8= Received: from CO6PR18MB3939.namprd18.prod.outlook.com (2603:10b6:5:34d::18) by DM6PR18MB3179.namprd18.prod.outlook.com (2603:10b6:5:1c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.30; Wed, 3 May 2023 14:59:40 +0000 Received: from CO6PR18MB3939.namprd18.prod.outlook.com ([fe80::9c19:bfe6:ec90:1661]) by CO6PR18MB3939.namprd18.prod.outlook.com ([fe80::9c19:bfe6:ec90:1661%5]) with mapi id 15.20.6363.022; Wed, 3 May 2023 14:59:40 +0000 From: Srikanth Yalavarthi To: Stephen Hemminger CC: Anup Prabhu , "dev@dpdk.org" , Shivah Shankar Shankar Narayan Rao , Prince Takkar , Srikanth Yalavarthi Subject: RE: [EXT] Re: [PATCH v3] app/mldev: add internal function for file read Thread-Topic: [EXT] Re: [PATCH v3] app/mldev: add internal function for file read Thread-Index: AQHZfZ0yJm3qxMweokqLJ3u/eOOklK9Iov8AgAAAo6A= Date: Wed, 3 May 2023 14:59:40 +0000 Message-ID: References: <20230323152801.27666-1-syalavarthi@marvell.com> <20230503085642.7284-1-syalavarthi@marvell.com> <20230503075408.455ee334@hermes.local> In-Reply-To: <20230503075408.455ee334@hermes.local> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: =?us-ascii?Q?PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcc3lhbGF2YXJ0?= =?us-ascii?Q?aGlcYXBwZGF0YVxyb2FtaW5nXDA5ZDg0OWI2LTMyZDMtNGE0MC04NWVlLTZi?= =?us-ascii?Q?ODRiYTI5ZTM1Ylxtc2dzXG1zZy0xZWY4YjgzOC1lOWMzLTExZWQtOWYxMC00?= =?us-ascii?Q?ODJhZTNiNmU1MWFcYW1lLXRlc3RcMWVmOGI4M2EtZTljMy0xMWVkLTlmMTAt?= =?us-ascii?Q?NDgyYWUzYjZlNTFhYm9keS50eHQiIHN6PSIzODA4IiB0PSIxMzMyNzU5OTU3?= =?us-ascii?Q?NzYxNjcyNDgiIGg9IkdXN3pIY2xMbmlpWE9qTVJpanRVMUZaVXVGQT0iIGlk?= =?us-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true x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB3939:EE_|DM6PR18MB3179:EE_ x-ms-office365-filtering-correlation-id: 9384ddef-df97-42e0-1001-08db4be70579 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YXaMvH6/b4w8+t5V2ygjYBG+j3bbV6eEtRLFPW643p7ZHpmoMdraYmuWA64X3lermkTIA7ymHZy3Ls8T0ZyM5kZQ4THtw9s00tkIf8fmMWcKq40YIJ/idQkV1zDPHFbPcoS/k6wZR3kZeKBJRcBl9IsM61chTZKRhQhdUpph5iKzKMx+xmwYbHE1p67VoUL9qGjFXpMSM5/ra79TBzMM7t4vRFnGzAuwTxgV/UI5sXV4SZibH2y7IMr/mNURhHE5aKx9tSmnWUA/z2u8jVTh8AHtemqLuiHWmnrrxUWx4fgFl/vxWp4w2jkMn7PLG1i8tQqbLX9czbK2pYYvuZWfuHal7yhzRzSHrFyJu7nvsEzo0HaCGJzeF5CluhQ46oEbdb8lXhzKHJ+QOFUr5YMKczKtapQUiTEvERZr/STO/innanu/ZlpwfLbWnJCaLB5sY1nwPVHSND7QbqkfFVfg2AoEbuWLFK2CKlpPMX4szqWxvcHLOEwXMxRBPJZcPJB1uTIaoy6tR4Y7QIauhOiATBUZuTGYG9u6gjVOujIW6mp5fBK+4LAovNBYQsKYztYS8l+6FmvKw7X5raQwZyRy0Jx7432qcKIZnqclr/dcOVCIxMmEYRYNlfeU1ZJ5hsmf x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB3939.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(396003)(39860400002)(376002)(366004)(451199021)(66946007)(76116006)(66476007)(2906002)(64756008)(66556008)(66446008)(86362001)(5660300002)(52536014)(4326008)(8936002)(478600001)(8676002)(33656002)(71200400001)(41300700001)(6916009)(54906003)(7696005)(316002)(55016003)(53546011)(186003)(26005)(6506007)(9686003)(83380400001)(122000001)(107886003)(38070700005)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U+tbcGDu6gm/1CCGjzPtsNoiv1gAzj+deQRlFOVqLtPSgXcoZI5zK4MLJ1Yo?= =?us-ascii?Q?SJ4I/Sv+ssK+QodwYo+R4YdawsSrpMsOUIETP+gLsTPcm5YClcrv4nXPPZ6w?= =?us-ascii?Q?dE6k34exSMRDQ0EhgL1JeDpPMjB0b2wv2dIr9BZeyysvvJVc5UC+6p3W1XOh?= =?us-ascii?Q?s89+w+PfOnX70wEBpoRO9oBdC4pj3C5GEmogTZjxut6iA+lJIRRPcyiAxF1w?= =?us-ascii?Q?CT4KzHzxPI2TuJIk86vO/lul8QWg1BHiwycVNeVWlObCia/yMwDA5zD7+MSR?= =?us-ascii?Q?oAIXH1It2X/zSEm85OfDiM9lue6Ca4NV+UDjRUZHJBXLTwS3kkR3g1QI7Xfo?= =?us-ascii?Q?JIini6CG82xNJtN7J+SymZpo5h+EQPP7NwxeiojFrfSBAb8wCZEPFThUpAuV?= =?us-ascii?Q?qsHKtEAAqqsQ/hzQ3jKnzWrwxVL9DkFciY0AlWieYvmEZiJ690vjeZ8BA/AJ?= =?us-ascii?Q?+GGhZD8jdCAoHKqc+F9+9Hf5EKBZwWDNEsQiFYIVqXTQ9OayN3nJfC77EeIt?= =?us-ascii?Q?Sl9gQi3qIm/9jHlrBUIxkx7gtRfPePdTeYG4jGwO1ihh/S0/PtaVytg/+Rt7?= =?us-ascii?Q?nwweTGnq9Mipg8cKSJyCWOSrKGjijM9kjl36I+fW/mP320H5+pmrCfePWM4x?= =?us-ascii?Q?kFP1vkLcWvsiUkbwYq3j3oNKzQsngnDN96PUMv3Krx/Vd7aTq94auuiBmr2/?= =?us-ascii?Q?fNJPwmaOcAzQUTyC/uw27c717zh6COj0fdaNHhe+2pmF0T4KxtVpirj2UlNC?= =?us-ascii?Q?tqy0Z/RNmnZ3/7Jbugh/JTmDfk2n95so4ukrmaGariiBo7G4DEpEflP/OBP3?= =?us-ascii?Q?nTjrOq0JnbQLx+t4t1WezlwmpCMCwHIQM2mueVBwzVy/SnpzVKSlnaVHBDq0?= =?us-ascii?Q?gnA1t+yEHJFffVkua/B7lA6UeBP3UsogAqW5dfttAFXK5adnOpjCwWOWHKsY?= =?us-ascii?Q?EnXvBFe9/P1dbw4JYSAPpHqVaeoo4clDtSjQ57DDh7q+EGCZwuHCX0Kfk6GX?= =?us-ascii?Q?kdBge1BhX04m37KM24PJSR6XEAcLHTXk/PeE6XATWUQKWSJauNgvgAwhzi6l?= =?us-ascii?Q?YeM2W3v6idhNYcM2csd2HKJuMqHw83X4dtTHK1m6NQfSWVD+nkFc/KFoOGgY?= =?us-ascii?Q?fYTEuZwcQgGD9awSYcE3jFM4dRa2p1JTBabknDOhHU9t6XGZ81kKld6Ti9kK?= =?us-ascii?Q?fUQ6drdUtMVH6YS+WaPwRxtYxdKd2zXCg/rAum8YzDvQXs08xgxpKGeLwskh?= =?us-ascii?Q?PeAtiPiJoMWHe8bR5vjolsThis6xJLjKfnTHFA+IK9KJKI/jKOCNdp+uo+Su?= =?us-ascii?Q?Vfzwe1uN415CDbcM/YhiFgL/v1C9JRWiVuLXucT18drSHu0Kdj5BdMdl5yo0?= =?us-ascii?Q?mh5U/RpXr29WNa9h8tcQtxDxaHT8uOoO70sur5gsrDGows2Sx+Ja/EORzu2I?= =?us-ascii?Q?b4em9jjAngAkxD8CMxLTWZ3Poe16aQfYOclNMdYb09VPFngcSbF4RSQyQQaT?= =?us-ascii?Q?DZiT/1yCEY1WuMnMLA4+rhunoqD3lc5uOgPPd/27V9mxxloQxspVx+NWNWVp?= =?us-ascii?Q?mYQHRB9iVY1fI32vymJkQ5hi0aGgzCHPx7bZMlD+?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB3939.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9384ddef-df97-42e0-1001-08db4be70579 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2023 14:59:40.4001 (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: 9qAdIBFabkaMF06yDeqtM2y1Ax4kCGHHRriA7S9TP3U7Ww6xnCFQMDPsQQPQ8ih6tWouJkqG1ggiBX57mFuasg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB3179 X-Proofpoint-ORIG-GUID: kkIKvUdJARTP3RJl9cBti9XrpmyL4hFa X-Proofpoint-GUID: kkIKvUdJARTP3RJl9cBti9XrpmyL4hFa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-03_10,2023-05-03_01,2023-02-09_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Stephen Hemminger > Sent: 03 May 2023 20:24 > To: Srikanth Yalavarthi > Cc: Anup Prabhu ; dev@dpdk.org; Shivah Shankar > Shankar Narayan Rao ; Prince Takkar > > Subject: [EXT] Re: [PATCH v3] app/mldev: add internal function for file r= ead >=20 > External Email >=20 > ---------------------------------------------------------------------- > On Wed, 3 May 2023 01:56:41 -0700 > Srikanth Yalavarthi wrote: >=20 > > Added internal function to read model, input and reference files with > > required error checks. This change fixes the unchecked return value > > and improper use of negative value issues reported by coverity scan > > for file read operations. > > > > Coverity issue: 383742, 383743 > > Fixes: f6661e6d9a3a ("app/mldev: validate model operations") > > Fixes: da6793390596 ("app/mldev: support inference validation") > > > > Signed-off-by: Srikanth Yalavarthi > > --- > > v3: > > * Fix incorrect use of rte_free with free > > > > v2: > > * Replace rte_malloc in ml_read_file with malloc > > > > v1: > > * Initial patch > > > > app/test-mldev/test_common.c | 59 ++++++++++++++++++++++++++ > > app/test-mldev/test_common.h | 2 + > > app/test-mldev/test_inference_common.c | 54 +++++++++-------------- > > app/test-mldev/test_model_common.c | 39 ++++------------- > > 4 files changed, 90 insertions(+), 64 deletions(-) > > > > diff --git a/app/test-mldev/test_common.c > > b/app/test-mldev/test_common.c index 016b31c6ba..d8a8e8a448 100644 > > --- a/app/test-mldev/test_common.c > > +++ b/app/test-mldev/test_common.c > > @@ -5,12 +5,71 @@ > > #include > > > > #include > > +#include > > #include > > #include > > > > #include "ml_common.h" > > #include "test_common.h" > > > > +int > > +ml_read_file(char *file, size_t *size, char **buffer) { > > + char *file_buffer =3D NULL; > > + long file_size =3D 0; > > + int ret =3D 0; > > + FILE *fp; > > + > > + fp =3D fopen(file, "r"); > > + if (fp =3D=3D NULL) { > > + ml_err("Failed to open file: %s\n", file); > > + return -EIO; > > + } > > + > > + if (fseek(fp, 0, SEEK_END) =3D=3D 0) { > > + file_size =3D ftell(fp); > > + if (file_size =3D=3D -1) { > > + ret =3D -EIO; > > + goto error; > > + } > > + > > + file_buffer =3D malloc(file_size); > > + if (file_buffer =3D=3D NULL) { > > + ml_err("Failed to allocate memory: %s\n", file); > > + ret =3D -ENOMEM; > > + goto error; > > + } > > + > > + if (fseek(fp, 0, SEEK_SET) !=3D 0) { > > + ret =3D -EIO; > > + goto error; > > + } > > + > > + if (fread(file_buffer, sizeof(char), file_size, fp) !=3D (unsigned > long)file_size) { > > + ml_err("Failed to read file : %s\n", file); > > + ret =3D -EIO; > > + goto error; > > + } > > + fclose(fp); > > + } else { >=20 >=20 > Granted this is a test program. But why did you ignore my feedback that t= his > is the slowest way to read a file. Stdio requires extra buffering, use re= gular > read() or better yet mmap(). Agree on the improvement, but, considering that this is a test code and the= se operations are done in slow-path, I would prefer to have the implementat= ion based on C library calls rather than using system calls. Also, using system calls may not make this code portable? Though we are not= supporting this app on platforms other than Linux, as of now. Pls let me know what you think. I had shared my additional comments on v2 patch.