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 4F32641C25;
	Mon,  6 Feb 2023 21:29:29 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 3DD22410D1;
	Mon,  6 Feb 2023 21:29:29 +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 447C040A7D
 for <dev@dpdk.org>; Mon,  6 Feb 2023 21:29:27 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1675715366;
 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=/Oy8dAIfAlue5+TiFXcKQk5YEezrCdGJsq7Rnl3AWbU=;
 b=Da+Ys4aOCMBd/BgWb8lGFc8EHgTSYeSL+ulvNVrL7koODtJWXg9OdbZ+hzDpzFpPqap8e1
 kVlOsCzMf4lh3LtqskfKwt8XeN49nBXGwp0paZGwEdJmDJJFQIveoB9lTUHcqqno48FXHs
 IA53neBTuh3MwdF7VGIKZIvIOGzWULw=
Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com
 [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id
 us-mta-70-FmGJq1k1MbimvtqKIBCZwA-1; Mon, 06 Feb 2023 15:29:24 -0500
X-MC-Unique: FmGJq1k1MbimvtqKIBCZwA-1
Received: by mail-wm1-f71.google.com with SMTP id
 o31-20020a05600c511f00b003dc53da325dso9493096wms.8
 for <dev@dpdk.org>; Mon, 06 Feb 2023 12:29:24 -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=/Oy8dAIfAlue5+TiFXcKQk5YEezrCdGJsq7Rnl3AWbU=;
 b=PzoW3Q0vyRHMYivpHetjd0MsXXahWjsVhRrbiC1KWGzQ+YnpO6lLQV0YQ8WckKYwOT
 OUIJ9pA4GMUfoa33WN20T44ETQWao20LcfbALrTrJ8bingj8Wy1wqJrTg0Ds6KiJI3GG
 8wADAM0BCFviwA69yA4YqjnDo+2gW+NNRPl28VMjPZrEVoIfjHB43YnquBWol36C4ttF
 9+hyQBfrC+uiOOHjbMmHY6JaLtEn6jxqcy6LuZ7qSyGc8zwdfAudmDFXi40p+/XJ03aE
 aajklqneSWOzwpDgsYz/0HlsKx3dzULKU3s7bGp3lgLatJIAUYUK7g9EEI9mXHox1dd0
 nfqg==
X-Gm-Message-State: AO0yUKUqfGOWoLXV/003Sj7KxeeycMu3vrkuKCtUgj2wR098SBKn9WSc
 4mzmyDcfa8i52r2wCfEciCGGHlM339bB/TaaOyY5UKWfrQUnGzuYQPuCdQscTx8+9P4qwEzG8zr
 t6/A=
X-Received: by 2002:a5d:440d:0:b0:2c3:6686:c7d5 with SMTP id
 z13-20020a5d440d000000b002c36686c7d5mr181988wrq.18.1675715362474; 
 Mon, 06 Feb 2023 12:29:22 -0800 (PST)
X-Google-Smtp-Source: AK7set/vmwg88GMHKrSaSIxcMwPb1f0PmxuztO/fbv7tHjbRvQMmXcZKQXmssCsEQu4uE5cef6sYPg==
X-Received: by 2002:a5d:440d:0:b0:2c3:6686:c7d5 with SMTP id
 z13-20020a5d440d000000b002c36686c7d5mr181980wrq.18.1675715362297; 
 Mon, 06 Feb 2023 12:29:22 -0800 (PST)
Received: from localhost (2a01cb000f483e00b4815b62aee6aa5b.ipv6.abo.wanadoo.fr.
 [2a01:cb00:f48:3e00:b481:5b62:aee6:aa5b])
 by smtp.gmail.com with ESMTPSA id
 x18-20020adfffd2000000b002c3f1223059sm580620wrs.36.2023.02.06.12.29.21
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 06 Feb 2023 12:29:21 -0800 (PST)
Mime-Version: 1.0
Date: Mon, 06 Feb 2023 21:29:21 +0100
Message-Id: <CQBRIPN0R0JI.2V2ZZX8KYCHPF@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.14.0-64-gf10d00f8407e
References: <20221123102612.1688865-1-rjarry@redhat.com>
 <20221216102109.64142-1-rjarry@redhat.com>
 <20221216102109.64142-3-rjarry@redhat.com>
 <cd1817e5ae624f9bad74977e043eb792@huawei.com>
 <CPJBP3CCOHKM.XCASXIKQNXNZ@ringo>
 <e5a9556bfbf44e9793022bb7cf1e8b15@huawei.com>
 <CPVGVSVM7VPW.4IZSW3GL5H0N@ringo>
 <b7b31d1fde804fbb9e663416d94a15b6@huawei.com>
In-Reply-To: <b7b31d1fde804fbb9e663416d94a15b6@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, Feb 06, 2023 at 21:07:
> Problem is not in resetting cb function itself.
>
> Usually with CB user needs some sort of data structure (to accumulate
> stats, track states, etc.). If we allow to reset the CB, then it
> arises the question when/how should we allow user to free associated
> data?
>
> And, as I undersand, we don't have a clear way to do it.

If the application decides to reset the callback function, they are in
a good position to determine what resources they need to free. I don't
see why EAL should get involved here but I may be missing a point.