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 57F1DA0487 for ; Tue, 2 Jul 2019 13:44:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 665821B946; Tue, 2 Jul 2019 13:44:30 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60041.outbound.protection.outlook.com [40.107.6.41]) by dpdk.org (Postfix) with ESMTP id 3DDC82BC8 for ; Tue, 2 Jul 2019 13:44:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T/snZM8PaLx7opHtHeVc0/YCzQrKzTLl2rqX4+3VKFE=; b=TtXPdoYomkExaptCV4mPYXg0UHUAkU0q1gZr6OM2JmSM4CwdP7vnPi7i1x39S2jpkz/LnqUY5P1UQ8AZ+W74KKW4TRzee3XpZhMKjaqrzrvdbcgl3QFT4e/Nb0mxC346VJ0nXtbe6Xtfdck+GF7nHERXLU+hxkP8JURnicfXvIM= Received: from VI1PR04MB4688.eurprd04.prod.outlook.com (20.177.56.80) by VI1PR04MB5006.eurprd04.prod.outlook.com (20.177.49.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Tue, 2 Jul 2019 11:44:27 +0000 Received: from VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::6566:d63e:eccc:92db]) by VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::6566:d63e:eccc:92db%6]) with mapi id 15.20.2032.019; Tue, 2 Jul 2019 11:44:27 +0000 From: Shreyansh Jain To: Bruce Richardson , "dev@dpdk.org" CC: "thomas@monjalon.net" , "jerinj@marvell.com" , "jiayu.hu@intel.com" , Hemant Agrawal Thread-Topic: [PATCH v4 1/9] rawdev: allow devices to skip extra memory allocation Thread-Index: AQHVMCWDb25aQOsgb0yumegdVDAia6a3NE8g Date: Tue, 2 Jul 2019 11:43:58 +0000 Deferred-Delivery: Tue, 2 Jul 2019 11:43:15 +0000 Message-ID: References: <20190530212525.40370-1-bruce.richardson@intel.com> <20190701155600.43695-1-bruce.richardson@intel.com> <20190701155600.43695-2-bruce.richardson@intel.com> In-Reply-To: <20190701155600.43695-2-bruce.richardson@intel.com> 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=shreyansh.jain@nxp.com; x-originating-ip: [92.120.1.69] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 40219fe2-b617-4aff-f0d3-08d6fee2a385 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB5006; x-ms-traffictypediagnostic: VI1PR04MB5006: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 008663486A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(346002)(376002)(366004)(39860400002)(13464003)(189003)(199004)(55016002)(6246003)(316002)(110136005)(71200400001)(71190400001)(486006)(33656002)(9686003)(14454004)(76176011)(7696005)(2501003)(446003)(4326008)(26005)(476003)(6666004)(44832011)(14444005)(256004)(25786009)(68736007)(11346002)(5660300002)(54906003)(53936002)(186003)(305945005)(6506007)(53546011)(2906002)(73956011)(66556008)(66476007)(52536014)(66946007)(99286004)(64756008)(74316002)(8676002)(81166006)(6436002)(229853002)(81156014)(66446008)(66066001)(478600001)(8936002)(76116006)(86362001)(102836004)(3846002)(6116002)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5006; H:VI1PR04MB4688.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: nlzqRW2JVTFfHa8PjdSmz9KuqlUxD/D09O6r+qdgghU5mHFiNu04ndOOY3f4FELTYOFQhd3LwnQ4rSTSS8S4fhZdg3alU+IrGVWco8ar55D2cfJBMgILc1s/zNhQFixR2ogtt0w/jZrl5Y4GRfhk+dHs0DhUOFFkMJ51ng5o+geBuiLWV3aYB6RChvWANHSn2N1TamR3/n9a6r3LpP4pS8QT98TGD6dOR7lWo7b4shtcHcKSObReT7oaDAl/R6eMtICuOQoHMKDCqXzJ691JgD6TwJeHD4NzVSUMXN/3eSUW15y0eiFE3rn1QpRKDSOElKKgJwG1WhYkM8vSPGupYeYZ1326HcKsQTNhvVnsx9H3LnmUjwtb1C6HCUq2KOy8dWh7NXZscvGP1+w2qbwG+8wL8jAxYjkM0/wY2eeiQeY= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40219fe2-b617-4aff-f0d3-08d6fee2a385 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2019 11:44:27.7912 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: shreyansh.jain@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5006 Subject: Re: [dpdk-dev] [PATCH v4 1/9] rawdev: allow devices to skip extra memory allocation 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: Bruce Richardson > Sent: Monday, July 1, 2019 9:26 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; jerinj@marvell.com; jiayu.hu@intel.com; Bruce > Richardson ; Shreyansh Jain > ; Hemant Agrawal > Subject: [PATCH v4 1/9] rawdev: allow devices to skip extra memory > allocation >=20 > Some device drivers want to allocate their own private memory, and > should > be allowed to do so. Therefore skip memory allocation and associated > error > checks if zero-length private memory is requested. Agree with this - rawdev was intended for flexibility and this (allowing th= em their own memory) is definitely better way ahead. Thanks for proposing. But, I think the kind of caveat should also be added to the header declarin= g this function: Probably something like this: --->8--- lib/librte_rawdev/rte_rawdev_pmd.h --- /** * Allocates a new rawdev slot for an raw device and returns the pointer=20 * to that slot for the driver to use. =20 * * @param name=20 * Unique identifier name for each device=20 * @param dev_private_size=20 * Private data allocated within rte_rawdev object. * Set to 0 to disable internal allocation and allow for self-allocati= on * @param socket_id=20 * Socket to allocate resources on.=20 * @return=20 * - Slot in the rte_dev_devices array for a new device;=20 */ struct rte_rawdev * rte_rawdev_pmd_allocate(const char *name, size_t dev_private_size,=20 int socket_id); --->8--- >=20 > While adjusting the code for new indent level, fix incorrect error > message. >=20 > Cc: Shreyansh Jain > Cc: Hemant Agrawal > Signed-off-by: Bruce Richardson > --- If you can update the header, please use my ACK in next version. Acked-by: Shreyansh Jain [...]