[PATCH v3] app/procinfo: display eventdev xstats for PMD data

Stephen Hemminger stephen at networkplumber.org
Tue Feb 7 01:22:27 CET 2023


On Mon,  6 Feb 2023 17:05:05 -0600
Abdullah Sevincer <abdullah.sevincer at intel.com> wrote:

> +
> +	size = (unsigned int)ret; /* number of names */
> +
> +	/* Get memory to hold stat names, IDs, and values */
> +
> +	xstats_names = malloc(sizeof(struct rte_event_dev_xstats_name) * size);
> +	ids = malloc(sizeof(unsigned int) * size);
> +
> +
> +	if (!xstats_names || !ids)
> +		rte_panic("unable to alloc memory for stats retrieval\n");

You might want to use calloc() here.

Seems like lots of extra blank lines.


More information about the dev mailing list