On Tue, Jul 02, 2019 at 10:49:42AM +0100, Burakov, Anatoly wrote: > On 01-Jul-19 4:55 PM, Bruce Richardson wrote: > > Allow initializing a driver instance. Include selftest to validate these > > functions. > > > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> > > Tested-by: Harry van Haaren <harry.van.haa...@intel.com> > > --- > > > > V4: Guarantee correct SUCCESS/FAILURE return values from test function > > Use memzone rather than malloc for ring allocation so we can guarantee > > contiguous memory. > > V3: don't add a new descriptor format struct, reuse from rte_ioat_spec.h > > V2: test cases placed in self-test routine > > --- > > <snip> > > > static void > > ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info) > > { > > @@ -44,11 +119,17 @@ ioat_dev_info_get(struct rte_rawdev *dev, > > rte_rawdev_obj_t dev_info) > > cfg->ring_size = ioat->ring_size; > > } > > +int ioat_rawdev_test(uint16_t dev_id); > > + > > static int > > ioat_rawdev_create(const char *name, struct rte_pci_device *dev) > > ...and... > > > + > > +int ioat_rawdev_test(uint16_t dev_id); /* pre-define to keep compiler > > happy */ > > + > > This looks like you're trying to avoid introducing a header file? (to my > great shame, i don't quite get how would that even work...) >
Yes, yes I am. I fail to see the need to create a whole new header file just for a single function prototype, which can be easily stuck in the C file instead. If the scope of internal data or prototypes needed grows beyond this, then we can create an internal header to store it, but I don't foresee that happening any time soon, since things are pretty self-contained apart from these test cases. > Otherwise, > > Acked-by: Anatoly Burakov <anatoly.bura...@intel.com> > > -- > Thanks, > Anatoly