From: David Marchand <david.marchand@redhat.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] mbuf: dump Tx offload metadata
Date: Tue, 4 Nov 2025 08:43:36 +0100 [thread overview]
Message-ID: <CAJFAV8yt8WmGnqBBe7Ay87iWLmfG5aO1MMS5RSwrSh2b_xOJ7A@mail.gmail.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35F65524@smartserver.smartshare.dk>
On Fri, 31 Oct 2025 at 15:29, Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > From: David Marchand [mailto:david.marchand@redhat.com]
> > Sent: Friday, 31 October 2025 15.08
> >
> > On Fri, 31 Oct 2025 at 14:28, Morten Brørup <mb@smartsharesystems.com>
> > 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.
>
> The intention is not do make the output shorter, but to reduce the amount of "noise" (useless data) in the output.
> My suggestion omits noise for non-tunneled packets.
>
> Maybe tso_segsz could be conditional on non-zero too.
>
> It depends on what the user/developer is debugging, whether l2/l3/l4_len are considered noise. I don't object to making them conditional too, if you prefer.
>
> Anyway, I just realized that the tx_offload field is not cleared on RX, so the discussed zero-check is useless (checking uninitialized data) when dumping an mbuf at an early stage in the application's packet processing pipeline.
> I have an idea to get around this... The TX flags in ol_flags are cleared at RX, so we can consider tx_offload uninitialized until one of the TX flags in ol_flags has been set.
LGTM, it is stated that those fields are for Tx offloads.
I'll post a v2.
--
David Marchand
next prev parent reply other threads:[~2025-11-04 7:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 13:11 David Marchand
2025-10-31 13:28 ` Morten Brørup
2025-10-31 14:07 ` David Marchand
2025-10-31 14:29 ` Morten Brørup
2025-11-04 7:43 ` David Marchand [this message]
2025-11-04 10:02 ` [PATCH v2] " David Marchand
2025-11-04 11:45 ` Morten Brørup
2025-11-04 13:58 ` David Marchand
2025-11-04 18:45 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJFAV8yt8WmGnqBBe7Ay87iWLmfG5aO1MMS5RSwrSh2b_xOJ7A@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).