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 E9C0B43927; Mon, 22 Jan 2024 11:10:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA5AD40291; Mon, 22 Jan 2024 11:10:44 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2139.outbound.protection.outlook.com [40.107.243.139]) by mails.dpdk.org (Postfix) with ESMTP id 5373B4028B for ; Mon, 22 Jan 2024 11:10:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPnKlyjcUQO43ZaHmm7aur/vBXU0gb29/PZUbojVe0GWq+G4MdzG16zK15MqVJUdbELjyXuMWqTl2QC44A23r92NSibbVMQ+aLOvG69DudY3tdfmpRbWBK7LyPFDV2LIyiaSw8Ntsv5auzbh+EL0/m4rtY80PwR1ucmLQH+MjFVoMu7+73mU7wvZj5oLg9+s3lR+U37KmqL3qnzPgPqg3E8lUwacbxF3ALKrlV7EvV8Dugkl+Uq7Vg11at5odlVuY2lhTkgLntxwdM496JETHGxiEAEdc/hEh+/96z/yLFE6PuF06rbrK+H3RRqmPXsKqvOph8cPBzgP5E2Bo+TyjA== 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=pcdlo1BmQVFkSL6NIp5FaqJyQZLG3bfcId4uvwbjHXU=; b=HwTEvSiFM7MpXj5MqItdVeQdcdKGrL+04VQ6i4feZLSCvt2hG1OcwKSrgOH8eVOhhelw5H/R6a+cyTCIh37AAKDNP8EMtuIhiMobChCuHFKt64MRACEQzJseEMecwFH9VxO6ft3i6Tv0smIWzo5I5m5kiss0hjetEw6D2Vws08B9PyZNKJv9MzkW2yevN6nNFheM699T8aGW+wsYln6Im4CmGzqTXfO/40ABtcnchI/0OC98I1sVHvVs/C35kG/41+oJpiAQJ3ZIY2IkRvmW2TA4BL81tGr1VW389rlKGgjMFcPRFPVB0JVXAjC+/Rxi1cKsam4oxlrZE2rX/r5o4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pcdlo1BmQVFkSL6NIp5FaqJyQZLG3bfcId4uvwbjHXU=; b=mlNTUxVtRSsFHbvav9+S6if5bhwmahpzCWJ/+DbHFH/4dDuuifYnjj4fPoWaH5T8qRNTcfOqKjJk8VlhFtSZWbWse8PcY20TEg0+XnnR3WPUe0L11d6BMqB9xKyIZ03oOc5jzZ684Eqh3x5JgPbGaiXMGCCacnESTijTpxznLng= Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by MN2PR13MB3727.namprd13.prod.outlook.com (2603:10b6:208:1e8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.33; Mon, 22 Jan 2024 10:10:38 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::8e02:f738:570a:f8aa]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::8e02:f738:570a:f8aa%7]) with mapi id 15.20.7202.031; Mon, 22 Jan 2024 10:10:38 +0000 From: Chaoyong He To: Harman Kalra , "dev@dpdk.org" , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ajit Khaparde , Somnath Kotur , John Daley , Hyong Youb Kim , Yuying Zhang , Beilei Xing , Qiming Yang , Qi Zhang , Wenjun Wu , Dariusz Sosnowski , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad Subject: RE: [PATCH v4 1/1] ethdev: parsing multiple representor devargs string Thread-Topic: [PATCH v4 1/1] ethdev: parsing multiple representor devargs string Thread-Index: AQHaTJ7DLsYJJ7RLuUOMADEyzs82ZrDlBaIQgACF3gCAABGR4A== Date: Mon, 22 Jan 2024 10:10:38 +0000 Message-ID: References: <20240111064432.193119-1-hkalra@marvell.com> <20240121191908.156149-1-hkalra@marvell.com> <20240121191908.156149-2-hkalra@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR13MB5545:EE_|MN2PR13MB3727:EE_ x-ms-office365-filtering-correlation-id: 9b935aa3-2ce5-4414-d6d2-08dc1b3261c1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jfeZDovWrpXXNAU9XvDCdCEdZkhjeTrqFwt0X/4OHSfWbwkeM1FJvmnolMfT9q2pGn+8L1gQhGG0Fa0j49Q06Eq5csPIljXo/axxP3RUfxPC7Xe9dAQv5IpT6TNgUIwEH0bQ6wCtRWWwA5Q03u2yIpAxquvn/MlnIJHagXnCT2mDaolPf9ut4DUqs0IsaOmJKbvQPZjHO1sRut9wI7Fae0Pq7RvbA3eltUwGIdSTalCXrsnobmrYjjwCR9A22NKlzmztbvJNhSUIN7LDZfd9jnG/r7XAbPA8z3Arqsff75bgAaNtFiMsF0gMGCzGd1iKA33oeixCO98rjOBEKhyvyhajzGlVlBTgd0HJBbChgthNW++kS2gYeYwgIoI8+9b4UiaS9TNgy0KG0XclAbg/zU1VXUugt+m/5ss0GZ2nm9ys5CxLsgLMULqlbXc9CZq+D7JDXKz1AHtlVc3vzFFDAJ/wI3vi1ufVxVWY5go4VhIwO3YKpfOd2RFOLO2JAG3J2m+lkJEBxmbfvMBuC7VhOcqpbaFXinxWkwZGtyH25y+bJRrKxLU9VCpsDso0KAQgmAchY/V/2RenxnZjTjTUkfBjkQhizVXGo3yL0QEQY2f0IvVQ/Z1S0WjFH1ietAsW x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(136003)(39840400004)(346002)(376002)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(55016003)(921011)(41300700001)(86362001)(33656002)(38070700009)(122000001)(38100700002)(9686003)(7696005)(66476007)(6506007)(2906002)(110136005)(478600001)(66946007)(316002)(66556008)(76116006)(66446008)(64756008)(71200400001)(44832011)(52536014)(7416002)(5660300002)(8936002)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?L5ERdg7F+X4oX/UP/dAvq7YxbkZsJm9ILgPmaj2haDeLPwSdeyZqQZHyI+Nn?= =?us-ascii?Q?EiM/Zf25Rg94FcUROTY7AgRV+trBoeV1I4h3PHTvgMBX539HKSbq68NT7hPC?= =?us-ascii?Q?lsfdeFeV/JeY+kl7N+aqBHTkK7zLNt7VF09rk0TMfl8HfZBIep89NnfYZYIY?= =?us-ascii?Q?KWE1lElAKIpELXlIM0QpCEIirDIlGH8fA1snV82gO2887pyop9ZUWWRSGIFn?= =?us-ascii?Q?K0FJ8P0cs57eSptHsLYjKjRKEFTA18kox6MA3IIBKSqqy5eWUC+55nR33R/v?= =?us-ascii?Q?7d6sxnWmJVFJRsgwPIvbZPr4Oe9NOAAwxHy4Bm5ugEAeVCSWhJEspJl7Xaho?= =?us-ascii?Q?/JXZorDpYttUwtb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GfPJ?= =?us-ascii?Q?SUtHnirR+6ehPfbIiExl9lj0xD/xRXeENY+Fx7lSo1P9zYkWtdFRuDByGWyS?= =?us-ascii?Q?KryD+UKpNxxHR132XozMxbsH+uorwkF0Z4irS/ia26K50nxSHsYMvlWPdwSg?= =?us-ascii?Q?naCjDwlPfrk5JwWYuR6mvlKMTYGkjF8busZ89Y1B/0Fk0t4djtxyLTSzO/3M?= =?us-ascii?Q?9Dsvcn2KYgUkHoJNABBybkepGiAIN40yNOSKT2YY6wppoYbihfaRSMZ6pzrh?= =?us-ascii?Q?SoIX3Nz0IMgjTHQ5il04edWhN0TJsuHdcIrHwnEQNEjpnb8DmiLXhAEDUoet?= =?us-ascii?Q?hgWYYk5iCf/byCekS9U=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b935aa3-2ce5-4414-d6d2-08dc1b3261c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jan 2024 10:10:38.2154 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: X+ovIHYv/T9i/xJbMWOvwiDvCOZjiNl5b43C+zVT833VbjT64WHCqhS8pQOAM9XlROAhRfh6kILqaq8tSP8Ukb5gItlMMOB4fe9dYzdG+5Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3727 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 >=20 > Hi Chaoyong, >=20 > Please see responses inline >=20 >=20 > >=20 > > > return ret; > > > } > > > > > ... > > > a/drivers/net/nfp/flower/nfp_flower_representor.c > > > b/drivers/net/nfp/flower/nfp_flower_representor.c > > > index 5f7c1fa737..63fe37c8d7 100644 > > > --- a/drivers/net/nfp/flower/nfp_flower_representor.c > > > +++ b/drivers/net/nfp/flower/nfp_flower_representor.c > > > @@ -792,8 +792,8 @@ nfp_flower_repr_create(struct > nfp_app_fw_flower > > > *app_fw_flower) > > > > > > /* Now parse PCI device args passed for representor info */ > > > if (pci_dev->device.devargs !=3D NULL) { > > > - ret =3D rte_eth_devargs_parse(pci_dev->device.devargs= ->args, > > > ð_da); > > > - if (ret !=3D 0) { > > > + ret =3D > > > + rte_eth_devargs_parse(pci_dev->device.devargs->args, > > > ð_da, 1); > > > + if (ret < 0) { > > > PMD_INIT_LOG(ERR, "devarg parse failed"); > > > return -EINVAL; > > > } > > > > Sorry, I don't quite understand why change 'ret !=3D 0' to 'ret < 0'? > > Compare return value with 0 or NULL is the specification for our PMD, > > we prefer not to change it if don't have a good reason. > > Thanks. >=20 > To support multiple representors under one PCI BDF, "eth_devargs args" > parameter passed to rte_eth_devargs_parse() is now an array which gets > populated with multiple "struct rte_eth_devargs" elements viz different p= fvf > representor devargs. >=20 > We are proposing a change to the return value of this API, I.e. negative = means > error condition and positive value refers to no of "struct rte_eth_devarg= s" > elements populated. So it can't be zero, else we wont know how many > elements were populated in the array. >=20 > Thanks > Harman >=20 Got it, thanks to make it clear. Then it looks good to me. > > > > > -- > > > 2.18.0