From: David Marchand <david.marchand@redhat.com>
To: Julien Hascoet <jhascoet@kalrayinc.com>,
Olivier Matz <olivier.matz@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [TEST] dpdk/app/test/test_mbuf.c test_refcnt_mbuf instability + fix proposal
Date: Mon, 7 Aug 2023 09:26:51 +0200 [thread overview]
Message-ID: <CAJFAV8zyhGmf0aOrHOuZRn+JD5p8FPE9JkPZWuZYiCNUFYBaCw@mail.gmail.com> (raw)
In-Reply-To: <MR1P264MB172997D1815F2F49AA6AB6A7D00CA@MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM>
Hello Julien,
On Mon, Aug 7, 2023 at 8:19 AM Julien Hascoet <jhascoet@kalrayinc.com> wrote:
> from my understanding after debugging, in test_refcnt_iter the return value of rte_ring_enqueue is not checked; leading to lack of expected mbufs at the end checks.
>
> Here is some fix proposal that seems to work after running endurance tests for several days:
>
> diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
> index b4f436b5e2..8a5d26e4f6 100644
> --- a/app/test/test_mbuf.c
> +++ b/app/test/test_mbuf.c
> @@ -1033,12 +1033,17 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,
> tref += ref;
> if ((ref & 1) != 0) {
> rte_pktmbuf_refcnt_update(m, ref);
> - while (ref-- != 0)
> - rte_ring_enqueue(refcnt_mbuf_ring, m);
> + while (ref-- != 0) {
> + /* retry in case of failure */
> + while (rte_ring_enqueue(refcnt_mbuf_ring, m) != 0)
> + ;
> + }
> } else {
> while (ref-- != 0) {
> rte_pktmbuf_refcnt_update(m, 1);
> - rte_ring_enqueue(refcnt_mbuf_ring, m);
> + /* retry in case of failure */
> + while (rte_ring_enqueue(refcnt_mbuf_ring, m) != 0)
> + ;
> }
> }
> rte_pktmbuf_free(m);
>
> Can you confirm ?
This analysis looks correct (though failing to enqueue in this unit
test seems strange to me).
Could you send a fix with a Fixes: line in the commitlog, and copying
the maintainer?
Thanks.
--
David Marchand
next prev parent reply other threads:[~2023-08-07 7:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 6:18 Julien Hascoet
2023-08-07 7:26 ` David Marchand [this message]
2023-08-07 8:02 ` Julien Hascoet
2023-08-08 7:03 ` David Marchand
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=CAJFAV8zyhGmf0aOrHOuZRn+JD5p8FPE9JkPZWuZYiCNUFYBaCw@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jhascoet@kalrayinc.com \
--cc=olivier.matz@6wind.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).