On Fri, 31 Oct 2025 at 14:28, Morten Brørup <[email protected]> wrote:
> Printing of outer_l2_len and outer_l3_len could be omitted if not present, 
> like the VLAN IDs, e.g.:
>
> fprintf(f, "  ");
> if (m->outer_l2_len != 0)
>         fprintf(f, "outer_l2_len=%u, ", m->outer_l2_len);
> if (m->outer_l3_len != 0)
>         fprintf(f, "outer_l3_len=%u, ", m->outer_l3_len);
> fprintf(f, "l2_len=%u, l3_len=%u, l4_len=%u, tso_segsz=%u\n",
>         m->l2_len, m->l3_len, m->l4_len, m->tso_segsz);

Mm, why specifically those two only?
If the intention is to make this debug output shorter, I would apply
the same to all those fields, and omit the whole (new) line if no
field is set.


-- 
David Marchand

Reply via email to