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 98CDB4302B; Thu, 10 Aug 2023 17:40:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73BB24324E; Thu, 10 Aug 2023 17:40:27 +0200 (CEST) Received: from smtpout30.security-mail.net (smtpout30.security-mail.net [85.31.212.35]) by mails.dpdk.org (Postfix) with ESMTP id 0D84E40691 for ; Thu, 10 Aug 2023 17:40:26 +0200 (CEST) Received: from localhost (fx305.security-mail.net [127.0.0.1]) by fx305.security-mail.net (Postfix) with ESMTP id DFB1B30EC8A for ; Thu, 10 Aug 2023 17:40:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalrayinc.com; s=sec-sig-email; t=1691682025; bh=rTYtMkHT13EbE0tRnYFDKlCTNor0WoD4+zVBnPZYU/c=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=C933jEttAE7WsZjv+tDCTaJoGVozmfbXPH0aIC5gMn6+NoEqGlNd160h/M4N8VqmH nHaN09K9atak/Pvb/uhUq9vJ+R/0R3Ta8jYseXyOnHmt/+Y5EZTf9A3Ra6jTyXVUZk mVNLgzeHuphnkhZj3bi9XV/5kQ+Wtri5JCVk/2CY= Received: from fx305 (fx305.security-mail.net [127.0.0.1]) by fx305.security-mail.net (Postfix) with ESMTP id A2ED530EC01; Thu, 10 Aug 2023 17:40:25 +0200 (CEST) Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-pr2fra01lp0104.outbound.protection.outlook.com [104.47.24.104]) by fx305.security-mail.net (Postfix) with ESMTPS id D2EA430EAF9; Thu, 10 Aug 2023 17:40:24 +0200 (CEST) Received: from MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:5::17) by MR1P264MB1523.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 15:40:23 +0000 Received: from MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM ([fe80::77f5:4fc5:a7f9:f855]) by MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM ([fe80::77f5:4fc5:a7f9:f855%7]) with mapi id 15.20.6652.029; Thu, 10 Aug 2023 15:40:23 +0000 X-Virus-Scanned: E-securemail Secumail-id: ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XY6BO3JXzR4PemgEhfnT0mnT5FitxCw4uHnHe0U9coDKmI5zrgGLGgF67wObsxS0egv8QwPM0w7fKSOl2KvvrMp6NKLyOEzj16kVJ4+NxHM0vuMKj6cuOMBc4QpP/fosPU+4rbKK0sGiDv/2tlFgFN0PM2fKv1LS5IO9HK6Tg1OGC/cIQA+Fmkd4oKugWGHeJN7GNSHtk5b9QhzKPTmvmxw9wRtdgZ1bNHR1IS1js+JC/yNrYsqtBhREHOiaWI8AKbV0nuwY8ur9yMzL24PICQqHqdes1UENh2yA+wFIG4rdTyEQxXzI4zEKL4xM7JfIN4mxg/y0rmfwNWV8fG/RPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eP4iNH+khva991qtnMfWuYTkQqsi94mo1sX5YufMe8I=; b=VhOEPLANNS+aGRFrYtYLw5dRzq8URoBfNEhihu0WLXGUXg4mCHj9haj4KRO2g63LDG0OJyz8CfihmLj/Zhm4ZbPiEybH7o3wBJba/PEwnUgXY3/OvT55DzGVssAANBm9bBGc0RW38+ST5y6iEd0mOm121utrkbMDuYyYRIsbR1db5+/MFNVrB2WBrhS1Gt/B6nsQ4gIpnqixmX74hoU+hhCEzFz1vErHYxztK5wHp3aWxOfkrf3KEkZvGaK25wfH7ce2ZwuhWJJQWeGq0SJ2AVwRp6snxbPn7AFeutCif1qgqkhjkqblwMwdpa+vnsjuzJpaBznCl6ckLtfmO4tT0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kalrayinc.com; dmarc=pass action=none header.from=kalrayinc.com; dkim=pass header.d=kalrayinc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalrayinc.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eP4iNH+khva991qtnMfWuYTkQqsi94mo1sX5YufMe8I=; b=MMvDx5yDSVCryyyN/e5iTKNlNZVKVg3J7xMhfcRUiVGrtUYqHfi9A72VV+/whKD3sRoeKUEY3mVXCscz32UyfidPozgl/0TovjHKtn3CvB4A9xuH46Ylv2fLb1PiNqqfZToU50TBoFUCUBWI27gWsK14CUZP11hVWUpsM7RLrtxYjCk6SRmeY80otcobJG6Xake7AWyWFSPCB13zVKnbfdPAlTMNvuM/ZxNBeFCRHM0tl8+5E+/CB5hTQ24fiucyatQIlLqDsrTvQ1aTI9keGS1TA1Mmdmcoaxwb0Uzk5HSNV9cPQW0+7ZtPuwq6YCMt08kO+pkP9STR+GgqZmCWGg== From: Julien Hascoet To: Stephen Hemminger , jhascoet CC: david.marchand@redhat.com, dev@dpdk.org Subject: RE: [PUB] Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter Thread-Topic: [PUB] Re: [PATCH] app: fix silent enqueue fail in test_mbuf test_refcnt_iter Thread-Index: AQHZyoPZ9s15XWc8nkKFTEhBOZoTsq/jCucAgACgHICAAAHT5Q== Date: Thu, 10 Aug 2023 15:40:23 +0000 Message-ID: References: <20230809053843.3698537-1-jhascoet@kalray.eu> <20230810060030.3759835-1-jhascoet@kalray.eu> <20230810083333.4c0394c6@hermes.local> In-Reply-To: <20230810083333.4c0394c6@hermes.local> Accept-Language: fr-FR, en-GB, en-US Content-Language: fr-fr X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kalrayinc.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MR1P264MB1729:EE_|MR1P264MB1523:EE_ x-ms-office365-filtering-correlation-id: dcd5aa8d-6865-41b4-f34e-08db99b81cba x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: goXxIVPw6tdpWtklsarwfos3rrp5m1KNtQuYe0V1PIw1y9zwwu6ciHJ8fzL1iUlBC71ZST8BRwTQpMhWz2NtLt8UYXe/eJTi9+9Rj+kGoiWOq7HJPPw2Qe2vfYw7FpnEmY45YE+bWQJA0Uukmrzuk5nWnjEZ1aJw7cvlHR3IhEZEmeXOh413HzI8uC7EVCHDRAkY9UGhoTT2TWoyU7HE9zIuz2RgbQYP6bo0qTT1RW+rfiYfJ7HRviITUxCl2WIxtjzKrB/9QxYoR9ggEgPg/stnEAfq7Gn5j/s8OZVeIj1wAxJj3i1iQuEyC3z5OISluCPEPCBEb/VZNXyDNvEOEX0lTCZFk0cCSZwK2WS2lXB+t0ddI4JcpTKZcDsAT/9DMveAqxC4aD/D2t5omL8FSHHE+VzTjP+b7Hg+tozJ8od96r7BNj/B6o+n7eurxpWQeq6USD+/nMuyi5oCtfWUVFnI/+S/g/FmJUepWBW3kp/JxNo9skdFltxVKt04FWEA8eI5B6rDMz8SXnrFc1DsGDk20B54ohd3laWcs+plsafF1uqgKuaDvGcJbJeMp3GFPvofTTWUSGsh5JiV0NPrcEnhN/Je4+WcAIjvyzGgsmK0npgX23tvm4thAGZP7120 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(376002)(346002)(39860400002)(366004)(451199021)(186006)(1800799006)(86362001)(91956017)(33656002)(6506007)(478600001)(71200400001)(110136005)(64756008)(66946007)(76116006)(54906003)(26005)(66476007)(66446008)(66556008)(7696005)(4326008)(9686003)(2906002)(41300700001)(316002)(8676002)(52536014)(5660300002)(38100700002)(8936002)(122000001)(38070700005)(83380400001)(66574015)(55016003)(19627405001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: j1xUn/VWWGB75EcpsPg7sRUaHtEtr3HsZox8oP7SEt9BoFvaz6fxPoJxr8nFJWuaYnupXkTp9vuiNmYzSFqEEXXom6GWW7VrSNX2DDmFrKF3RuWt9ZT5lVWdlyuIEuqTkcLJWZuAszT7OYBHM3noeq1mi8HJu+D5Ys2rBIiz2jV8uOVFdeGou2PBrhUgBmDdPSxVRaryaL8q4/LB0ymwWGcPUdLrtdlDzSvLoWt5M2rZkU2lk90Xc4EkhDOQ//yRnDP8mvWTsaFPuRNQJGFXPLr+ptoZIdJAv65PGnKLt0prQ3gA0oG9Hk+gHySajUJ9w0gHCguDIg7Hm0qt9IEKIyjW7W+1eitbEs0xVDrhjU/DsrbvLopTPX7k6u8o6RTgz0PGTVGk/+Cbl0sGDXRbDWsrx3I8qSjJ0w6dAOZQTqyanVuRErdqHRWgQGzbS9upmQYPEmE85s/R1xNtoFcEDcfzDXlFcnXgwsZ5zGm2a2t4HxxzCcpd8GhD0v38fHdYlAzlpHZVWHs24VKbYbjPlQNrj2EhrRvVWeY+e8S5l6H5SECo6dM0Qc/fkIZcOt22BWADvwDRXf5aslB0dCppZKX6Pnc2JZtFT8/WJY9I+ig4AbXoCAUpRe2/6rnkP6KB0Ur0QSScCo7QgWNkcTqbFZc9ljR7WP7M9fBRkoqXL1GHNASQAwJjKuBTsCHsTUzlQxvn998PUSjo9dnwOg98qn0NKDmMGmGn4F83fESu5LGqr1EsCbPMaj1a7igFlyRU1BlAT1JO28lbMXW6Okwlk+qADw7mI0P7L/4AQPKThR7ChrABmMazjNNajCDpxiptm3L3LJApKb0YoZEyNuWo15TivtsgJ9lAVRLPzM9YdafV4HP12rBTIvSPxqv3VlfAjTfuz2/wtCdLD7lW+5ZKZipZjFmKN42i/owqBJOJXKb61s5MI1AOvE+MxaEBGEYS PnFohywtKN3tbxUlobrEeLhso//jKNcvI3T6xZ4R1Z3ogeu5sqJXHjCkK+CFPplpm4KW1048UetkySms53T43r0VfL8p/9zRAUqU4/XbIan6VHo4jKcrWitjCSXSZ/Khhay46SVh54vQGn2DBE70nowDBP4JvWZS1neY9DJTiflW/XdeV0mljI2+YAoHT3jFT6gvwE2rRSQYLrSDejrfuZI3br/XH1K0Wnjuw7/LsthiTRwKFvaKZrW0uAk3ODwMekdSmYeFMPSR1FXI8TueJljHwh6KTl6QBMIuFiF4ngxZoEcS+fv5pbO15uZgepHgBXIbLxSwFKSWeqXcEM1y/enFJxP+fD4C115I7EBBDNEkI1BapDX1b8nPrnrvE2XceVOpuK7ZcbpAaG1KvyOZZ02cV1L/4VY+6YaoMLyrCX3kDiz9ztgXJe6vRH0ngchaNJk0npHNFJAAgerD72nHJpXF6HugzRkaKYFFHWjhvB2X/RqWse2caYdwKCAVsjals+/jS3wK1khgHNAKJ1By0ZVBVjJnzSasrIV5RbO3aHigitwZmYnnEDgnxALF0lSTlXYsD8E65WiMFX+nBynUrjGSoVoYgym5uIBB4Sc+m/cLTg/7ZwldFl329gLtvtew Content-Type: multipart/alternative; boundary=secu_3956af938969bd10eef8f8ff88b64a90_part1 MIME-Version: 1.0 X-OriginatorOrg: kalrayinc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MR1P264MB1729.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: dcd5aa8d-6865-41b4-f34e-08db99b81cba X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2023 15:40:23.7617 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8931925d-7620-4a64-b7fe-20afd86363d3 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4wpu4OLQa/J0j+ovZUgbceePYFG436FNe9c0QzuzOIwnXv1mLEZO8pgMAFwVa7eZr3FNJYnIcDwsinsGXZloWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MR1P264MB1523 X-ALTERMIMEV2_out: done Content-Transfer-Encoding: 8bit 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 This message is in MIME format. --secu_3956af938969bd10eef8f8ff88b64a90_part1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Yes, just did it. Thanks ! ________________________________ De : Stephen Hemminger Envoyé : jeudi 10 août 2023 17:33 À : jhascoet Cc : david.marchand@redhat.com ; 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 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? --secu_3956af938969bd10eef8f8ff88b64a90_part1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
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?




--secu_3956af938969bd10eef8f8ff88b64a90_part1--