[PUB] Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter
Julien Hascoet
jhascoet at kalrayinc.com
Thu Aug 10 17:40:23 CEST 2023
Yes, just did it.
Thanks !
________________________________
De : Stephen Hemminger <stephen at networkplumber.org>
Envoyé : jeudi 10 août 2023 17:33
À : jhascoet <ju.hascoet at gmail.com>
Cc : david.marchand at redhat.com <david.marchand at redhat.com>; dev at dpdk.org <dev at 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 at 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 part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230810/255f726f/attachment.htm>
More information about the dev
mailing list