> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Thursday, 16 May 2024 17.21 > > On Thu, 16 May 2024 10:59:40 +0200 > Morten Brørup <m...@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 > ...
I agree, but I followed the existing convention for how the dump output is formatted. That's also why I show the index in the mem_list; without it, the output would look silly, showing the same fields multiple times with different values.