[PATCH] mempool: dump includes list of memory chunks

Stephen Hemminger stephen at networkplumber.org
Thu May 16 17:20:57 CEST 2024


On Thu, 16 May 2024 10:59:40 +0200
Morten Brørup <mb at smartsharesystems.com> wrote:

> +	fprintf(f, "  mem_list:\n");
> +	n = 0;
> +	STAILQ_FOREACH(memhdr, &mp->mem_list, next) {
> +		fprintf(f, "    addr[%u]=%p\n", n, memhdr->addr);
> +		fprintf(f, "    iova[%u]=0x%" PRIx64 "\n", n, memhdr->iova);
> +		fprintf(f, "    len[%u]=%zu\n", n, memhdr->len);
> +		n++;
> +	}

The output would look better if it was a table with one line per mempool, and the name first
and column headers, and n is redundant

mem_list:
Addr	Iova	Len
...


More information about the dev mailing list