On Tue, Jul 02, 2019 at 11:43:58AM +0000, Shreyansh Jain wrote: > > -----Original Message----- > > From: Bruce Richardson <bruce.richard...@intel.com> > > Sent: Monday, July 1, 2019 9:26 PM > > To: dev@dpdk.org > > Cc: tho...@monjalon.net; jer...@marvell.com; jiayu...@intel.com; Bruce > > Richardson <bruce.richard...@intel.com>; Shreyansh Jain > > <shreyansh.j...@nxp.com>; Hemant Agrawal <hemant.agra...@nxp.com> > > 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. > * <b>Set to 0 to disable internal allocation and allow for > self-allocation</b> > * @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 <shreyansh.j...@nxp.com> > > Cc: Hemant Agrawal <hemant.agra...@nxp.com> > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> > > --- > > If you can update the header, please use my ACK in next version. > > Acked-by: Shreyansh Jain <shreyansh.j...@nxp.com> > Thanks Shreyansh, will do.
/Bruce