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 B36DAA0487 for ; Tue, 2 Jul 2019 14:41:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8958C1B945; Tue, 2 Jul 2019 14:41:46 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4AA1C7CBC for ; Tue, 2 Jul 2019 14:41:44 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 05:41:43 -0700 X-IronPort-AV: E=Sophos;i="5.63,443,1557212400"; d="scan'208";a="338952889" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 05:41:41 -0700 Date: Tue, 2 Jul 2019 13:41:38 +0100 From: Bruce Richardson To: Shreyansh Jain Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "jerinj@marvell.com" , "jiayu.hu@intel.com" , Hemant Agrawal Message-ID: <20190702124137.GB405@bricha3-MOBL.ger.corp.intel.com> References: <20190530212525.40370-1-bruce.richardson@intel.com> <20190701155600.43695-1-bruce.richardson@intel.com> <20190701155600.43695-2-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) 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" On Tue, Jul 02, 2019 at 11:43:58AM +0000, Shreyansh Jain wrote: > > -----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 > > > > 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 them 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 declaring 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 > * to that slot for the driver to use. > * > * @param name > * Unique identifier name for each device > * @param dev_private_size > * Private data allocated within rte_rawdev object. > * Set to 0 to disable internal allocation and allow for self-allocation > * @param socket_id > * Socket to allocate resources on. > * @return > * - Slot in the rte_dev_devices array for a new device; > */ > struct rte_rawdev * > rte_rawdev_pmd_allocate(const char *name, size_t dev_private_size, > int socket_id); > --->8--- > > > > > While adjusting the code for new indent level, fix incorrect error > > message. > > > > 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 > Thanks Shreyansh, will do. /Bruce