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 BB527A00C5;
	Mon, 19 Dec 2022 11:37:28 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 5D1C440146;
	Mon, 19 Dec 2022 11:37:28 +0100 (CET)
Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com
 [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 1B41F400D4
 for <dev@dpdk.org>; Mon, 19 Dec 2022 11:37:27 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 00377320090B;
 Mon, 19 Dec 2022 05:37:22 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Mon, 19 Dec 2022 05:37:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm2; t=1671446242; x=
 1671532642; bh=sl2564qWJFSMMjbyDNWgHZ5GeF7/OglMDm33h/ZCVj4=; b=T
 tyoPuRGzM7AcvKrk+8V1i2p04BpVZxpEuhBTvlKoUqcMJcE/u77DNceLSN/DjNIm
 qzc8QFAQxEg2IxtmYvlJCBEP3+vzTFQI9ORg96Z258GuIK8jkJLOAXLyhfCAxS7N
 w7BSN0cH2v2szSvFkz74wZKewmzSM6+1T2RXw8PCv6EVZq5OVL8oIN2NiXM2Hyk8
 ZbHESjuRr42xiGpJdvVaAvQ9eomDtnGW+GB2pntNu8Qmyz3I/WucATgJjK8NW7Nf
 NDxEFVlGcFaLG4xVw/4dRYaeq4M25kare6Fwm3aGnnfMDEVNwUWEDlM4pMpYEUlX
 yrASYO0++5vgp8YlRBadA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1671446242; x=
 1671532642; bh=sl2564qWJFSMMjbyDNWgHZ5GeF7/OglMDm33h/ZCVj4=; b=Z
 JjKroOJrDB8mQz3Yc0i7qWXOH9PVVY/i/wpXOBeZhPidy0hRTTDY69cgcbVSekbP
 rK6mTT9XoX8vS4m7WwoTbECHW6de7v0DxfLot3OAvKf06LW2kzBj/PZHa+2Bnavc
 JKIV2AsFtu3RM5V0jZZs1GP2jFfKWKDJCNslLkJC27f9nO5052ylXCjiczfp+j1c
 v4KnhPIhbLtgteeZMcHGYlHgRHHbca2XSmYfsKm8XaWJRoY680QJHEwt9+st4nJC
 GA0SjFRay+18GsN2GD9XwzNwWUhiwONFW0c9pIUFEkJ0twZSD8kkkb/WJw0tTy92
 QY9GAXxcDPYlHwzi/tmNw==
X-ME-Sender: <xms:4j6gY-MNdozgaI8hFSJkDukyl01rSOUdxzE6ELQge5n6bswJIXP0WA>
 <xme:4j6gY8_3982AaIH_KKDXrE2dLpMbEztitWk-zKrLw0KipLcgo-aFJjoWNAirBXSpD
 oZvpHf5vyzYdcGWaA>
X-ME-Received: <xmr:4j6gY1TVbGflv6OpvSTnj1EiYkaB3b5ODqMimW_WLqfRmrLuAKvXZiny1wN2QzoGRUiMCI5pP5OrIxq6fsOAcTWRDQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefgdduiecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnhepfefhjeeluedvvedtuddtuedtvefhieejtefhffeujefhteduudev
 tdektdeikeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh
 homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:4j6gY-u4U5enFGHryRp6QKOEk-IMa6saTQIlTx8HRWP_3jCl0e1HRg>
 <xmx:4j6gY2eisCVUIhcwN8PYdaE4b70oULnIbjZIGhFHxMq0-xWeq57X1A>
 <xmx:4j6gYy1M-EfPIHXnpczz5nELY2xZT_nYaH1pu0hAooj4UC_REeYm9Q>
 <xmx:4j6gY24qe1kAhM5m4qz436VVvSwyJLBZvOLBVIPYC2S0rS2Pkv3xyQ>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 19 Dec 2022 05:37:21 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>, dev@dpdk.org,
 Morten =?ISO-8859-1?Q?Br=F8rup?= <mb@smartsharesystems.com>,
 david.marchand@redhat.com
Subject: Re: [RFC PATCH 2/7] telemetry: add uint type as alias for u64
Date: Mon, 19 Dec 2022 11:37:19 +0100
Message-ID: <1914029.PYKUYFuaPT@thomas>
In-Reply-To: <Y5sn6YG7LRBN6yVA@bricha3-MOBL.ger.corp.intel.com>
References: <20221213182730.97065-1-bruce.richardson@intel.com>
 <2122310.KiezcSG77Q@thomas>
 <Y5sn6YG7LRBN6yVA@bricha3-MOBL.ger.corp.intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
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

15/12/2022 14:58, Bruce Richardson:
> On Thu, Dec 15, 2022 at 02:36:51PM +0100, Thomas Monjalon wrote:
> > 15/12/2022 10:44, Bruce Richardson:
> > > On Wed, Dec 14, 2022 at 09:38:45AM -0800, Tyler Retzlaff wrote:
> > > > On Tue, Dec 13, 2022 at 06:27:25PM +0000, Bruce Richardson wrote:
> > > > > For future standardization on the "uint" name for unsigned values=
 rather
> > > > > than the existing "u64" one, we can for now:
> > > > > * rename all internal values to use uint rather than u64
> > > > > * add new function names to alias the existing u64 ones
> > > > >=20
> > > > > Suggested-by: Morten Br=F8rup <mb@smartsharesystems.com>
> > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > >=20
> > > > when adding __rte_experimental api i have been asked to add the
> > > > following boilerplate documentation block. i'm not pushing it, just
> > > > recalling it is what i get asked for, so in case it's something we =
do?
> > > > see lib/eal/include/rte_thread.h as an example
> > > >=20
> > > >=20
> > > > ```
> > > >  * @warning
> > > >  * @b EXPERIMENTAL: this API may change without prior notice.
> > > > ```
> > > >
> > >=20
> > > Ok, thanks for the notice.
> > >=20
> > > Actually, related to this, since we are adding these functions as ali=
ases
> > > for existing stable functions, I would like to see these being added =
not as
> > > experimental. The reason for that, is that while they are experimenta=
l, we
> > > cannot feasibly mark the old function names as deprecated. :-(
> > >=20
> > > Adding Thomas and David on CC for their thoughts.
> >=20
> > Is it related to telemetry?
> >=20
> > In general, yes we cannot deprecate something if there is no stable rep=
lacement.
> > The recommended step is to introduce a new experimental API
> > and deprecate the old one when the new API is stable.
> >=20
> Yes, understood.
> What we are really trying to do here is to rename an API, by process of
> adding the new API and then marking the old one as deprecated. The small
> issue is that adding the new one it is by default experimental, meaning we
> need to wait for deprecating old one. Ideally, as soon as the new API is
> added, we would like to point people to use that, but can't really do so
> while it is experimental.
>=20
> ---
>=20
> By way of explicit detail, Morten pointed out the inconsistency in the
> telemetry APIs and types:
>=20
> * we have add_*_int, which takes a 32-bit signed value
> * we have add_*_u64 which takes 64-bit unsigned (as name suggests).
>=20
> The ideal end-state is to always use 64-bit values (since there is no spa=
ce
> saving from 32-bit as a union is used), and just name everything as "int"
> or "uint" for signed/unsigned. The two big steps here are:
>=20
> * expanding type of the "int" functions to take 64-bit parameters - this =
is
>   ABI change but not API one, since existing code will happily promote
>   values on compile. Therefore, we just use ABI versioning to have a 32-b=
it
>   version for older linked binaries.
> * the rename of the rte_tel_data_add_array_u64 and
>   rte_tel_data_add_dict_u64 to *_uint variants. Though keeping
>   compatibility is easier, as we can just add new functions, the overall
>   process is slower since the new functions technically should be added as
>   experimental - hence the email. For the case of function renaming, do we
>   still need to have the "renamed" versions as experimental initially?

If a function is simply renamed, I think there is no need for the experimen=
tal step.
Would we keep an alias with the old name for some time?