DPDK usage discussions
 help / color / mirror / Atom feed
From: Alan Beadle <ab.beadle@gmail.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: users@dpdk.org
Subject: Re: Multiprocess App Problems with tx_burst
Date: Mon, 6 Jan 2025 15:34:34 -0500	[thread overview]
Message-ID: <CANTAOdwcNNUjtvdR2P_7tfJn++LhmCpiF-yAUJHadKM4=LBwhQ@mail.gmail.com> (raw)
In-Reply-To: <20250106231038.59a6fc4e@sovereign>

> I suspect that mbufs in use are put into mempool somehow.
> Which functions do you use to free mbufs to the pool
> on processing paths that do not end with `rte_eth_tx_burst()`?
> You can build DPDK with `-Dc_args='-DRTE_LIBRTE_MBUF_DEBUG'`
> to enable debug checks in the library.

I am using rte_pktmbuf_free(). My understanding is that it decrements
the refcount, and unless it really reaches 0, will not free it back to
the mempool. This is the only function that I ever use to decrement
the refcount of any mbuf, or to free them.

I think I might have found an error in my library's heap allocator
which can result in duplicate references to copies of the same data
header, which are supposed to be different headers. This could explain
some of my problems if the above usage is correct. I will continue
investigating this possibility. One thing gives me doubt. My code
includes frequent checks of all refcounts, so if it was accessing
something with a refcount of 0 then it should detect that, and so far
it has not.

I'll also try those debug checks. If they can detect a double free,
that would be helpful evidence.

Thank you,
-Alan

  reply	other threads:[~2025-01-06 20:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-31 17:49 Alan Beadle
2025-01-04 16:22 ` Alan Beadle
2025-01-04 18:40   ` Dmitry Kozlyuk
2025-01-04 19:16     ` Alan Beadle
2025-01-04 22:01       ` Dmitry Kozlyuk
2025-01-05 16:01         ` Alan Beadle
2025-01-06 16:05           ` Alan Beadle
2025-01-06 20:10             ` Dmitry Kozlyuk
2025-01-06 20:34               ` Alan Beadle [this message]
2025-01-07 16:09                 ` Alan Beadle

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='CANTAOdwcNNUjtvdR2P_7tfJn++LhmCpiF-yAUJHadKM4=LBwhQ@mail.gmail.com' \
    --to=ab.beadle@gmail.com \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=users@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).