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 E324EA00C5; Fri, 9 Dec 2022 19:24:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88823410FB; Fri, 9 Dec 2022 19:24:27 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 5FBC540A8B for ; Fri, 9 Dec 2022 19:24:26 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [PATCH V2 00/11] telemetry: add u32 value type and hex integer string API MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Fri, 9 Dec 2022 19:24:22 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8757D@smartserver.smartshare.dk> In-Reply-To: <20221209110450.62456-1-lihuisong@huawei.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH V2 00/11] telemetry: add u32 value type and hex integer string API Thread-Index: AdkLvg/JHakQBdIgQzenYt6tN3KESAAPCrkQ References: <20221208080540.62913-1-lihuisong@huawei.com> <20221209110450.62456-1-lihuisong@huawei.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Huisong Li" , Cc: , , , , 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 > From: Huisong Li [mailto:lihuisong@huawei.com] > Sent: Friday, 9 December 2022 12.05 >=20 > Some lib telemetry interfaces add the 'u32' and 'u64' data by the > rte_tel_data_add_dict/array_int API. This may cause data conversion > error or data truncation. >=20 > The 'u32' data can not be assigned to signed 32-bit integer. However, > assigning to u64 is very wasteful, after all, the buffer capacity of > each transfer is limited. So it is necessary for 'u32' data to add > usigned 32-bit integer type and a series of 'u32' operation APIs. >=20 > This patchset uses the new 'u32' API to resolve the problem of data > conversion error, and use the 'u64' API to add 'u64' data. >=20 > In addition, this patchset introduces two APIs to store u32 and u64 > values as hexadecimal encoded strings in telemetry library. >=20 > --- > -v2: > - fix ABI break warning. > - introduce two APIs to store u32 and u64 values as hexadecimal > encoded strings. Looks good. Personally, I would prefer rte_tel_data_add_{dict|array}_u32_hex() over = _hex_u32_str(), and similar for u64; but it is a matter of taste, so = feel free to change or keep your own suggested names. In the eal_common_memory.c patch, in rte_tel_data_add_dict_u32(d, "Head = id", heap_id);, consider fixing the old typo too, it should be = "Heap_id", not "Head id". On the other hand, it will change the JSON = output, so perhaps it will be considered an API breakage? Series-acked-by: Morten Br=F8rup