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 E6638A0093; Sun, 11 Dec 2022 10:02:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8963340A81; Sun, 11 Dec 2022 10:02:57 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id C88B94068E for ; Sun, 11 Dec 2022 10:02:55 +0100 (CET) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NVJfT67SpzmW5s; Sun, 11 Dec 2022 17:01:53 +0800 (CST) Received: from [10.82.157.155] (10.82.157.155) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sun, 11 Dec 2022 17:02:43 +0800 Message-ID: Date: Sun, 11 Dec 2022 17:02:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH V2 00/11] telemetry: add u32 value type and hex integer string API Content-Language: en-US To: Huisong Li , CC: , , , , References: <20221208080540.62913-1-lihuisong@huawei.com> <20221209110450.62456-1-lihuisong@huawei.com> From: fengchengwen In-Reply-To: <20221209110450.62456-1-lihuisong@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.82.157.155] X-ClientProxiedBy: dggpeml500008.china.huawei.com (7.185.36.147) To dggpeml500024.china.huawei.com (7.185.36.10) 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 LGTM Series-acked-by: Chengwen Feng On 2022/12/9 19:04, Huisong Li wrote: > 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. > > Huisong Li (11): > telemetry: move to header to controllable range > telemetry: add u32 value type > test: add test cases for adding u32 value API > ethdev: fix possible data truncation and conversion error > mempool: fix possible data truncation and conversion error > cryptodev: fix possible data conversion error > mem: possible data truncation and conversion error > telemetry: refactor mapping betwween value and array type > telemetry: support adding integer value as hexadecimal > test: add test cases for adding hex integer values API > ethdev: display capability values in hexadecimal format > > app/test/test_telemetry_data.c | 249 ++++++++++++++++++++++++++++- > app/test/test_telemetry_json.c | 23 ++- > lib/cryptodev/rte_cryptodev.c | 2 +- > lib/eal/common/eal_common_memory.c | 14 +- > lib/ethdev/rte_ethdev.c | 13 +- > lib/mempool/rte_mempool.c | 24 +-- > lib/telemetry/rte_telemetry.h | 112 ++++++++++++- > lib/telemetry/telemetry.c | 25 ++- > lib/telemetry/telemetry_data.c | 122 ++++++++++++-- > lib/telemetry/telemetry_data.h | 2 + > lib/telemetry/telemetry_json.h | 29 ++++ > lib/telemetry/version.map | 14 ++ > 12 files changed, 581 insertions(+), 48 deletions(-) >