[dpdk-dev] [PATCH v2 05/10] dma/ioat: add start and stop functions

Walsh, Conor conor.walsh at intel.com
Tue Sep 7 12:35:47 CEST 2021


<snip>

> > +/* Stop a configured device. */
> > +static int
> > +ioat_dev_stop(struct rte_dmadev *dev)
> > +{
> > +	struct ioat_dmadev *ioat = dev->dev_private;
> > +
> > +	ioat->regs->chancmd = IOAT_CHANCMD_SUSPEND;
> > +	/* Allow the device time to suspend itself. */
> > +	rte_delay_ms(1);
> > +
> > +	return 0;
> 
> It be more beneficial to check if the device has actually suspended
> before returning. Similar to recover, a timeout could be set by which
> the device is expected to be suspended. If the device is still not
> suspended by then, return error.
> 
> IMO this would be more useful to an application that always returning 0,
> since the device may still be active.
> 
> 
> With the above addressed,
> 
> Reviewed-by: Kevin Laatz <kevin.laatz at intel.com>

Thanks for the review Kevin, I agree this is a better solution than just delaying and returning 0.
I will implement this and include it as part of v3.
/Conor.



More information about the dev mailing list