[dpdk-dev] [PATCH v4 7/9] raw/ioat: add configure, start and stop functions

Bruce Richardson bruce.richardson at intel.com
Tue Jul 2 11:59:39 CEST 2019


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.richardson at intel.com>
> > Tested-by: Harry van Haaren <harry.van.haaren at 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.burakov at intel.com>
> 
> -- 
> Thanks,
> Anatoly


More information about the dev mailing list