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 CEBA142FF6; Mon, 7 Aug 2023 09:27:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 971A1410D3; Mon, 7 Aug 2023 09:27:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D475740A8B for ; Mon, 7 Aug 2023 09:27:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691393225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zrkoDRbAWGaGbpYj+XT1tvY7jbV3tLpPEGIQiGiQiGU=; b=b32pNegRyXq74TpZm/8U7XL49dDhlzW9ebpYMrRM+LCpRa+U6k5nke0h/gBHA+SS8r8WBC ZXiW9EjKHL3HWBQDd4SyenkohDXmvUiNHGh6uQZ6B2CSB9jp+jOzDJBKlUIYFKWGL/YGp2 ZCnIuwxGKkSSK0/yBNwv1y2dJF4X0Mk= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-3i8LGsm6Mjmt73CFnMTmhA-1; Mon, 07 Aug 2023 03:27:04 -0400 X-MC-Unique: 3i8LGsm6Mjmt73CFnMTmhA-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2ba37b5519fso7586831fa.2 for ; Mon, 07 Aug 2023 00:27:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691393222; x=1691998022; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zrkoDRbAWGaGbpYj+XT1tvY7jbV3tLpPEGIQiGiQiGU=; b=b24mhB4MuvLaBBi3R5pYz3gT33UMEQxjtMUzk0Y8vyJNfQKAJ4cihaZYIF8BGctt8S YvNefOdd1/vKUFEqvogV1XiS2PosPLryGaO7HBZ7Qvse+oiYNPbYWkEVPFMKAxQ4hi9V 1dnyYmEH6+7razSwYttb6ThdIR1b4OrnSdoDDaLND6pK3VEsvVgg/81MIG5EXx2tEKbh OVmg9+zA9lc9GGCbUAFBXH0MRrRwiZRas9gyRYxThB38Cvs3XDzLnMQ77WKHRwMFy0e8 Y6tUAO74C5RKQgJuUOA+L85iSBZeE9d4V9dGaAMe05RS8LtI3DEYj4KVKelU6PuuLVLQ THSQ== X-Gm-Message-State: AOJu0Yxn+spKOrdfUK6PJ1v/rRM0/3igf0fs8+2/YXh+nJgBkrTV/V4U HWZ/rngRsWIbekgFYkxBLaZdv1XD/TxpPmiyHO+zhp5K0VieC4BCNPsV+yIiJBaXaZBe5O5JENg tfJKyvpxZnOzK34NEb3I= X-Received: by 2002:a19:8c18:0:b0:4fd:d078:2e3f with SMTP id o24-20020a198c18000000b004fdd0782e3fmr5087351lfd.42.1691393222659; Mon, 07 Aug 2023 00:27:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGp3YYvfZEd5oXLF1JmqB3u2A9jnk61Gmm6a8kIoUV2uLX05hVHLm3y9zbJgTaaICl6EEEgyvGGB2cgS+e3bT4= X-Received: by 2002:a19:8c18:0:b0:4fd:d078:2e3f with SMTP id o24-20020a198c18000000b004fdd0782e3fmr5087341lfd.42.1691393222293; Mon, 07 Aug 2023 00:27:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Mon, 7 Aug 2023 09:26:51 +0200 Message-ID: Subject: Re: [TEST] dpdk/app/test/test_mbuf.c test_refcnt_mbuf instability + fix proposal To: Julien Hascoet , Olivier Matz Cc: dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello Julien, On Mon, Aug 7, 2023 at 8:19=E2=80=AFAM Julien Hascoet wrote: > from my understanding after debugging, in test_refcnt_iter the return val= ue of rte_ring_enqueue is not checked; leading to lack of expected mbufs at= the end checks. > > Here is some fix proposal that seems to work after running endurance test= s for several days: > > diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c > index b4f436b5e2..8a5d26e4f6 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 +=3D ref; > if ((ref & 1) !=3D 0) { > rte_pktmbuf_refcnt_update(m, ref); > - while (ref-- !=3D 0) > - rte_ring_enqueue(refcnt_mbuf_ring, m); > + while (ref-- !=3D 0) { > + /* retry in case of failure */ > + while (rte_ring_enqueue(refcnt_mbuf_ring,= m) !=3D 0) > + ; > + } > } else { > while (ref-- !=3D 0) { > rte_pktmbuf_refcnt_update(m, 1); > - rte_ring_enqueue(refcnt_mbuf_ring, m); > + /* retry in case of failure */ > + while (rte_ring_enqueue(refcnt_mbuf_ring,= m) !=3D 0) > + ; > } > } > rte_pktmbuf_free(m); > > Can you confirm ? This analysis looks correct (though failing to enqueue in this unit test seems strange to me). Could you send a fix with a Fixes: line in the commitlog, and copying the maintainer? Thanks. --=20 David Marchand