DPDK patches and discussions
 help / color / mirror / Atom feed
From: Julien Hascoet <jhascoet@kalrayinc.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	jhascoet <ju.hascoet@gmail.com>
Cc: david.marchand@redhat.com, dev@dpdk.org
Subject: RE: [PUB]  Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter
Date: Thu, 10 Aug 2023 15:40:23 +0000	[thread overview]
Message-ID: <MR1P264MB172920AD3A72EFC6C514641AD013A@MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20230810083333.4c0394c6@hermes.local>

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

Yes, just did it.
Thanks !
________________________________
De : Stephen Hemminger <stephen@networkplumber.org>
Envoyé : jeudi 10 août 2023 17:33
À : jhascoet <ju.hascoet@gmail.com>
Cc : david.marchand@redhat.com <david.marchand@redhat.com>; dev@dpdk.org <dev@dpdk.org>
Objet : [PUB] Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter

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?







[-- Attachment #2: Type: text/html, Size: 3428 bytes --]

  reply	other threads:[~2023-08-10 15:40 UTC|newest]

Thread overview: 13+ 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
2023-08-10 15:40     ` Julien Hascoet [this message]
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

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=MR1P264MB172920AD3A72EFC6C514641AD013A@MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM \
    --to=jhascoet@kalrayinc.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ju.hascoet@gmail.com \
    --cc=stephen@networkplumber.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).