From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 50889A00C2;
	Wed,  4 Jan 2023 11:10:50 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id ECF1640A82;
	Wed,  4 Jan 2023 11:10:49 +0100 (CET)
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 7161B40697
 for <dev@dpdk.org>; Wed,  4 Jan 2023 11:10:48 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1672827048;
 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=b+YN1pjrivgrScCNHxMzt2ccziC4qNRWuV+gH0L68ao=;
 b=ZxWe0Jg3XtDUBrCq71RtReCiPD8qa9gPyQHyluW26S0PXt4/0ZWUvY+IGB05ZcYDEdHjJA
 +CF+saF7bMSJqvkOt3Tz7HCd9Bq9sSuBE075UqfydKokJ9u0wA0LlvWOhKLjbXd1kyk07T
 6i9BPe3oCHWrNUYUR9obpiMIBpJ+tqg=
Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com
 [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id
 us-mta-593-a7njsBQ4NpKRpcsgCKAV_A-1; Wed, 04 Jan 2023 05:10:46 -0500
X-MC-Unique: a7njsBQ4NpKRpcsgCKAV_A-1
Received: by mail-wm1-f69.google.com with SMTP id
 q21-20020a7bce95000000b003d236c91639so7281705wmj.8
 for <dev@dpdk.org>; Wed, 04 Jan 2023 02:10:46 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=in-reply-to:references:to:from:subject:cc:message-id:date
 :content-transfer-encoding:mime-version:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=W9t2uYGZdlId1QvVWLuLvFWx7Flwa/AMMigTNsr0k0A=;
 b=Xzv7V3Ce+3x5hkHLBqwd+MIg2Jjz1TJMiW1ERLdkYCqigt1hfWe69qd5O1ia7oT1PT
 3QN+DM0tU9giKOlJPAbFirnV2zGpAUDZq29e57cKPAoE22OniU6iOYrlOkpDg66EyKKm
 emWLJhsZPTbdfpRkfexCiWo0dpWueKkOpHGJzAlx5GT4HyPRN8MNwWyCkcE541IEIlm/
 4kepSPrn0Cn+UCGwb230zftK70O1sZr7dY2sT5ltW2fk2riL7WjIdmvgvNqXS9H0/2F/
 I6/Boi+NDhU5I5J4RQu2MCClKzzzh4Av3qbc3YYqQ5pOTiuE+pAnDFvAVk7oH2BFBAiE
 wNSA==
X-Gm-Message-State: AFqh2kosppUVLXpqoTaWH+y4GPmMtY2OBFK8zljP1UNhsa1HZBhdEWgf
 zDTGz7aCkW92T+KNmVanAFh9n9pr53Fc9dI9sFCUw/dN3CY6+jO3zHQTEotyo965bVYxMhQ5p3a
 U3+U=
X-Received: by 2002:a05:600c:44c9:b0:3d1:f6b3:2ce3 with SMTP id
 f9-20020a05600c44c900b003d1f6b32ce3mr40525965wmo.35.1672827045851; 
 Wed, 04 Jan 2023 02:10:45 -0800 (PST)
X-Google-Smtp-Source: AMrXdXs5/vmaHd95/P5w/a8AS4pfwhRLWAc95KzewWXeRTqtgMBCJi2jsWWwQ81Lt+ybDIrOX1xOGg==
X-Received: by 2002:a05:600c:44c9:b0:3d1:f6b3:2ce3 with SMTP id
 f9-20020a05600c44c900b003d1f6b32ce3mr40525951wmo.35.1672827045681; 
 Wed, 04 Jan 2023 02:10:45 -0800 (PST)
Received: from localhost (2a01cb000f483e0055ae3800781b5cbc.ipv6.abo.wanadoo.fr.
 [2a01:cb00:f48:3e00:55ae:3800:781b:5cbc])
 by smtp.gmail.com with ESMTPSA id
 w23-20020a1cf617000000b003d9b89a39b2sm9000375wmc.10.2023.01.04.02.10.45
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 04 Jan 2023 02:10:45 -0800 (PST)
Mime-Version: 1.0
Date: Wed, 04 Jan 2023 11:10:44 +0100
Message-Id: <CPJBP3CCOHKM.XCASXIKQNXNZ@ringo>
Cc: "Tyler Retzlaff" <roretzla@linux.microsoft.com>, "Kevin Laatz"
 <kevin.laatz@intel.com>, =?utf-8?q?Morten_Br=C3=B8rup?=
 <mb@smartsharesystems.com>
Subject: Re: [PATCH v5 2/4] eal: allow applications to report their cpu usage
From: "Robin Jarry" <rjarry@redhat.com>
To: "Konstantin Ananyev" <konstantin.ananyev@huawei.com>, "dev@dpdk.org"
 <dev@dpdk.org>
X-Mailer: aerc/0.13.0-167-g0f28e7e1ad84
References: <20221123102612.1688865-1-rjarry@redhat.com>
 <20221216102109.64142-1-rjarry@redhat.com>
 <20221216102109.64142-3-rjarry@redhat.com>
 <cd1817e5ae624f9bad74977e043eb792@huawei.com>
In-Reply-To: <cd1817e5ae624f9bad74977e043eb792@huawei.com>
X-Mimecast-Spam-Score: 1
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Konstantin Ananyev, Dec 22, 2022 at 13:41:
> > +static rte_lcore_usage_cb lcore_usage_cb;
> > +
> > +void
> > +rte_lcore_register_usage_cb(rte_lcore_usage_cb cb)
> > +{
> > +=09lcore_usage_cb =3D cb;
> > +}
> > +
>
> LGTM in general.
> One question: I assume this function is supposed to be called just
> once at app init stage, so we probably don't need to worry about
> possible sync issues, right? If so, then probably worth to mention it
> in the function formal comments below.

Yes, this is correct. I'll add a mention in the function docstring to
explain that this should be called once at init. Also I'll add a comment
in the function body to indicate that there is no risk of sync issues.