On Tue, Jul 02, 2019 at 11:43:58AM +0000, Shreyansh Jain wrote: > > -----Original Message----- > > From: Bruce Richardson <[email protected]> > > Sent: Monday, July 1, 2019 9:26 PM > > To: [email protected] > > Cc: [email protected]; [email protected]; [email protected]; Bruce > > Richardson <[email protected]>; Shreyansh Jain > > <[email protected]>; Hemant Agrawal <[email protected]> > > 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 <[email protected]> > > Cc: Hemant Agrawal <[email protected]> > > Signed-off-by: Bruce Richardson <[email protected]> > > --- > > If you can update the header, please use my ACK in next version. > > Acked-by: Shreyansh Jain <[email protected]> > Thanks Shreyansh, will do.
/Bruce

