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 455074326D; Thu, 2 Nov 2023 10:57:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1C9E40282; Thu, 2 Nov 2023 10:57:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5EFB040262 for ; Thu, 2 Nov 2023 10:57:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698919036; 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=/OB27NRQQjLMIadXNVeqAEQSOGpX/7eJNZ0p9qO92dw=; b=A6mmUT06DxJwVBfE+yGj5Mcl7iJElUMFzwnHHPrG2kH1NYesYXW9u7wVY0EwOc0IY43ANT YZokgmZ+Zzvs+Jk9iUNGq9eHfahmimXwgtXIHVObQzxk8af7PzuiXWEOcGhlDLimyD6S/X xtc2RLuQbr1OxZPOKjSwhvWsN3F3GGA= 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-318-MVsPI0pIM8aN7WYSrLgJlQ-1; Thu, 02 Nov 2023 05:57:15 -0400 X-MC-Unique: MVsPI0pIM8aN7WYSrLgJlQ-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2c50bebd8dfso7116681fa.3 for ; Thu, 02 Nov 2023 02:57:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698919034; x=1699523834; h=in-reply-to:references:to:from:cc:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=225YBfLkz7h3KsPKelxxxfaQSRbZMDpbPwnZ+DGtQ9Y=; b=oQHN7Pd0j8UBTRD42+YgbEOz2Fk5vL+jPxFhdi0b+ViljV5y64cIA6+hpdAb4FDuKJ hHTPg0zFSwUOTKfoYb1xMPtbfB/MhdK8uUbhKJKtmRlo3fQwimv6Y6G68BEbz0aP60I3 e44FKj+yX8aOvUXC3v/3CSyTsksy2DDeCSssJMFi7lDwQOgkJxNpdLLt2pkaZQll80xQ Pg2j27280haXL3o9Q7awJQZb+k64CNW8RjkRW5rYq/h1+i8wIwXXdXOwmhQYzVAfOMgt z6laWdipcxCnyevJPAi0htEsnyKBWpa4xw1Lkx92nkjni0xjjSF/nstlhU+yM/DpEr3E knDA== X-Gm-Message-State: AOJu0YzMYKzfu8MUJdVbenGTXn03fRh7Ux3IFrGGUS1SmENY4wVyz4SB QV983agyW0Bfw0Ton1l5l+rna2Xzz25YsqeotNMtZMHNq+/DmoQn+rxXU7I+t4SonLFw5TF9g8m 3Lcw= X-Received: by 2002:a05:6512:4024:b0:509:4ae3:4656 with SMTP id br36-20020a056512402400b005094ae34656mr1054757lfb.13.1698919034238; Thu, 02 Nov 2023 02:57:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMflrV4Y7n9Q4lSEcqhJ3K3ttp+CIVutkwyajnqZORCOK0LzgAP54mBxzELkjb2m7vjH6pbQ== X-Received: by 2002:a05:6512:4024:b0:509:4ae3:4656 with SMTP id br36-20020a056512402400b005094ae34656mr1054738lfb.13.1698919033887; Thu, 02 Nov 2023 02:57:13 -0700 (PDT) Received: from localhost (2a01cb000f8b9700598da2e1679e8383.ipv6.abo.wanadoo.fr. [2a01:cb00:f8b:9700:598d:a2e1:679e:8383]) by smtp.gmail.com with ESMTPSA id h13-20020a5d4fcd000000b003248a490e3asm1983757wrw.39.2023.11.02.02.57.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 02:57:13 -0700 (PDT) Mime-Version: 1.0 Date: Thu, 02 Nov 2023 10:57:12 +0100 Message-Id: Subject: Re: [PATCH] eal: stop iteration after lcore info is processed Cc: , , , From: "Robin Jarry" To: "Ruifeng Wang" , "Kevin Laatz" , =?utf-8?q?Morten_Br=C3=B8rup?= X-Mailer: aerc/0.16.0-55-g2e912b0445cd References: <20231101072053.1319697-1-ruifeng.wang@arm.com> In-Reply-To: <20231101072053.1319697-1-ruifeng.wang@arm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 Ruifeng Wang, Nov 01, 2023 at 08:20: > Telemetry iterates on lcore ID to collect info of a specific lcore. > Since only one lcore is processed at a time, the iteration can stop > when a matching lcore is found. > > Fixes: f2b852d909f9 ("eal: add lcore info in telemetry") > Cc: rjarry@redhat.com > Cc: stable@dpdk.org > > Signed-off-by: Ruifeng Wang > --- > lib/eal/common/eal_common_lcore.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_commo= n_lcore.c > index ceda714ca5..0d6812ec75 100644 > --- a/lib/eal/common/eal_common_lcore.c > +++ b/lib/eal/common/eal_common_lcore.c > @@ -546,7 +546,8 @@ lcore_telemetry_info_cb(unsigned int lcore_id, void *= arg) > =09=09rte_tel_data_add_dict_uint(info->d, "busy_cycles", usage.busy_cycl= es); > =09} > =20 > -=09return 0; > +=09/* Return non-zero positive value to stop iterating over lcore_id. */ > +=09return 1; > } Hi Ruifeng, Nice catch. Reviewed-by: Robin Jarry