[dpdk-dev] [PATCH v3 7/8] raw/ioat: add statistics functions

Pattan, Reshma reshma.pattan at intel.com
Mon Jul 1 12:11:20 CEST 2019



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson
> Sent: Thursday, June 27, 2019 11:41 AM
> To: dev at dpdk.org


<snip>

> +static int
> +ioat_xstats_get(const struct rte_rawdev *dev, const unsigned int ids[],
> +		uint64_t values[], unsigned int n)
> +{
> +	const struct rte_ioat_rawdev *ioat = dev->dev_private;
> +	unsigned int i;
> +
> +	for (i = 0; i < n; i++) {
> +		switch (ids[i]) {
> +		case 0: values[i] = ioat->enqueue_failed; break;
> +		case 1: values[i] = ioat->enqueued; break;
> +		case 2: values[i] = ioat->started; break;
> +		case 3: values[i] = ioat->completed; break;
> +		default: values[i] = 0; break;
> +		}
> +	}
> +	return n;

Should this return n or  how many actually filled ?

Thanks,
Reshma


More information about the dev mailing list