DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "David Marchand" <david.marchand@redhat.com>
Cc: <dev@dpdk.org>
Subject: RE: [PATCH] mbuf: dump Tx offload metadata
Date: Fri, 31 Oct 2025 15:29:06 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F65524@smartserver.smartshare.dk> (raw)
In-Reply-To: <CAJFAV8xfDUuAt_aC0rzi6pJ+7YXWfEBejx3MJB6Szi28+bZU5g@mail.gmail.com>

> 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.


      reply	other threads:[~2025-10-31 14:29 UTC|newest]

Thread overview: 4+ 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 [this message]

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=98CBD80474FA8B44BF855DF32C47DC35F65524@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /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).