From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E61BF4302B; Thu, 10 Aug 2023 17:33:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F98D410FD; Thu, 10 Aug 2023 17:33:39 +0200 (CEST) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id 6B69440691 for ; Thu, 10 Aug 2023 17:33:38 +0200 (CEST) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-26b10e52ec5so382193a91.3 for ; Thu, 10 Aug 2023 08:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1691681617; x=1692286417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=swBQjDnCho1srv4RReGIclml9aBQaSIvKq1q1Bx/oWY=; b=25hbOlfbalralilmB2nY4b8spu9oY5t0oQZcuPMbDX2+2HatIapsWn7P+Zf8TSew5V twKoOOzTSSaawKAqYLvwAVRGWPTLvgJ87zzDffQJoXrsusp1Qo8G3Av9L59YcFvP5ScM nEnb+N3h8lcUiiw0J6DpH8n1R1/0VQJPIVo3a75GSar4hwOhnk2LbcBcwXThHfLrXYU2 p4t3I30HtCl6R/6uAB1koA0nqt8tL4gBO8Pidm5qWJI8H4X2wJObhmAtHkDXYl9KX1zy JduNJyQ5l2ieikFf+vkUCXLWwMmRviG07jZ4IsnGuSSTPQq1O7pL4HXoytrYdnnGIW/u AIDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681617; x=1692286417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=swBQjDnCho1srv4RReGIclml9aBQaSIvKq1q1Bx/oWY=; b=Eg7s/7Or4dRPeGzoFg1dP00K435VN4xEVDwCk2cy4cTRO2NhPU/YSHSUmm+HH4W+rh jWLTHs72DvjMWpgLcF/hdIOy4QDfvtwWGAXtwqZych1rfjuo2NRAy5rNspaV6W7xV4nx Im+m2uyWnWRkzL+osxQLxVM/xPsP6amXNeEEmaxPlpMDQhvY5ecJHmjS0WHykzqyMxk7 dv1lnH3vB/hzef2XDAYeIZ7vGMUjQLenA+L+Vmcnxah3l9HZElZgQ0012tPq1hC6vf5c GSHhc78z7Vud0QefGYGD5Jf3aIDVmPcUJcfuG28FP8Ipuzj77Gn4KcpouHxWhCU0A/XP LM7g== X-Gm-Message-State: AOJu0Yyu9F+hGlPz5EgE0oDi9eDjxcsyRk722afRMJcfBO28rjYr0x+Z vASR9FQpWTqxKVXsUHlgU4HTBA== X-Google-Smtp-Source: AGHT+IFhRkm6gIQw2epCOXK82JZFcwyQTAES+bxMz0gIVfXxereenhhQYyS+54KGlNAzX5WVaMHBWg== X-Received: by 2002:a17:90b:378d:b0:268:34b1:a5a9 with SMTP id mz13-20020a17090b378d00b0026834b1a5a9mr2526595pjb.8.1691681617389; Thu, 10 Aug 2023 08:33:37 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id pj1-20020a17090b4f4100b002696bd123e4sm1630005pjb.46.2023.08.10.08.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:33:37 -0700 (PDT) Date: Thu, 10 Aug 2023 08:33:33 -0700 From: Stephen Hemminger To: jhascoet Cc: david.marchand@redhat.com, dev@dpdk.org Subject: Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter Message-ID: <20230810083333.4c0394c6@hermes.local> In-Reply-To: <20230810060030.3759835-1-jhascoet@kalray.eu> References: <20230809053843.3698537-1-jhascoet@kalray.eu> <20230810060030.3759835-1-jhascoet@kalray.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 10 Aug 2023 08:00:30 +0200 jhascoet 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?