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 9F4F1A0540; Mon, 12 Dec 2022 07:23:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 867C04021D; Mon, 12 Dec 2022 07:23:34 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 8C25440151 for ; Mon, 12 Dec 2022 07:23:32 +0100 (CET) Received: from kwepemm600004.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NVs0K4Cx9zqT3R; Mon, 12 Dec 2022 14:19:13 +0800 (CST) Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 12 Dec 2022 14:23:28 +0800 Message-ID: Date: Mon, 12 Dec 2022 14:23:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH V2 00/11] telemetry: add u32 value type and hex integer string API To: =?UTF-8?Q?Morten_Br=c3=b8rup?= , CC: , , , , References: <20221208080540.62913-1-lihuisong@huawei.com> <20221209110450.62456-1-lihuisong@huawei.com> <98CBD80474FA8B44BF855DF32C47DC35D8757D@smartserver.smartshare.dk> From: "lihuisong (C)" In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8757D@smartserver.smartshare.dk> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected 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 在 2022/12/10 2:24, Morten Brørup 写道: >> From: Huisong Li [mailto:lihuisong@huawei.com] >> Sent: Friday, 9 December 2022 12.05 >> >> 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. >> >> 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. >> >> This patchset uses the new 'u32' API to resolve the problem of data >> conversion error, and use the 'u64' API to add 'u64' data. >> >> In addition, this patchset introduces two APIs to store u32 and u64 >> values as hexadecimal encoded strings in telemetry library. >> >> --- >> -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. I think this name can represent the type of value stored in dict or array.😁 > > 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? Yes, you are right. I'll try fix it in another patch. > > > Series-acked-by: Morten Brørup > > > .