<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Yes, just did it.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks !<br>
</div>
<div id="appendonsend"></div>
<div id="content_out_jhascoet_kalrayinc.com"></div><hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De :</b> Stephen Hemminger <stephen@networkplumber.org><br>
<b>Envoyé :</b> jeudi 10 août 2023 17:33<br>
<b>À :</b> jhascoet <ju.hascoet@gmail.com><br>
<b>Cc :</b> david.marchand@redhat.com <david.marchand@redhat.com>; dev@dpdk.org <dev@dpdk.org><br>
<b>Objet :</b> [PUB] Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Thu, 10 Aug 2023 08:00:30 +0200<br>
jhascoet <ju.hascoet@gmail.com> wrote:<br>
<br>
> diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c<br>
> index efac01806b..be114e3302 100644<br>
> --- a/app/test/test_mbuf.c<br>
> +++ b/app/test/test_mbuf.c<br>
> @@ -1033,12 +1033,17 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,<br>
>                tref += ref;<br>
>                if ((ref & 1) != 0) {<br>
>                        rte_pktmbuf_refcnt_update(m, ref);<br>
> -                     while (ref-- != 0)<br>
> -                             rte_ring_enqueue(refcnt_mbuf_ring, m);<br>
> +                     while (ref-- != 0) {<br>
> +                             /* retry in case of failure */<br>
> +                             while (rte_ring_enqueue(refcnt_mbuf_ring, m) != 0)<br>
> +                                     ;<br>
<br>
Since other side needs to consume these and might be on same lcore,<br>
it might be good place to add rte_pause or sched_yield here?<br>
<br>
<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>