From: Stephen Hemminger <stephen@networkplumber.org>
To: jhascoet <ju.hascoet@gmail.com>
Cc: david.marchand@redhat.com, dev@dpdk.org
Subject: Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter
Date: Thu, 10 Aug 2023 08:33:33 -0700 [thread overview]
Message-ID: <20230810083333.4c0394c6@hermes.local> (raw)
In-Reply-To: <20230810060030.3759835-1-jhascoet@kalray.eu>
On Thu, 10 Aug 2023 08:00:30 +0200
jhascoet <ju.hascoet@gmail.com> wrote:
> diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
> index efac01806b..be114e3302 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)
> + ;
Since other side needs to consume these and might be on same lcore,
it might be good place to add rte_pause or sched_yield here?
next prev parent reply other threads:[~2023-08-10 15:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 5:38 jhascoet
2023-08-09 9:18 ` David Marchand
2023-08-10 6:00 ` jhascoet
2023-08-10 15:33 ` Stephen Hemminger [this message]
2023-08-10 15:40 ` [PUB] " Julien Hascoet
2023-08-10 16:09 ` jhascoet
2023-08-18 5:16 ` Hascoet Julien
2023-08-18 6:25 ` David Marchand
2023-08-22 6:34 ` jhascoet
2023-08-22 8:34 ` Olivier Matz
2023-08-24 6:51 ` Hascoet Julien
2023-08-30 16:16 ` Thomas Monjalon
2023-08-24 7:37 ` [PATCH] app: enhance error check if " jhascoet
2023-08-09 14:14 [PATCH] app: fix silent " jhascoet
2023-08-10 15:39 jhascoet
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=20230810083333.4c0394c6@hermes.local \
--to=stephen@networkplumber.org \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ju.hascoet@gmail.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).