From patchwork Tue Dec 13 10:15:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 120820 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DDEC7A0540; Tue, 13 Dec 2022 11:15:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC7CA40684; Tue, 13 Dec 2022 11:15:16 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 6C97F40146 for ; Tue, 13 Dec 2022 11:15:15 +0100 (CET) Received: from kwepemm600004.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NWZ926rH6zJqWp; Tue, 13 Dec 2022 18:14:14 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) 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; Tue, 13 Dec 2022 18:15:08 +0800 From: Huisong Li To: CC: , , , , , , Subject: [PATCH V4 0/9] telemetry: fix data truncation and conversion error and add hex integer API Date: Tue, 13 Dec 2022 18:15:03 +0800 Message-ID: <20221213101512.39919-1-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20221208080540.62913-1-lihuisong@huawei.com> References: <20221208080540.62913-1-lihuisong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 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. This patch series uses 'u64' functions to do this. In addition, this patch series introduces two APIs to store unsigned integer values as hexadecimal encoded strings in telemetry library. --- -v4: - remove 'u32' value type. - add padding zero for hexadecimal value -v3: fix a misspelling mistake in commit log. -v2: - fix ABI break warning. - introduce two APIs to store u32 and u64 values as hexadecimal encoded strings. Huisong Li (9): telemetry: move to header to controllable range 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 between value and array type telemetry: support adding integer value as hexadecimal test: add test cases for adding hex integer value API ethdev: display capability values in hexadecimal format app/test/test_telemetry_data.c | 158 +++++++++++++++++++++++++++++ lib/cryptodev/rte_cryptodev.c | 2 +- lib/eal/common/eal_common_memory.c | 10 +- lib/ethdev/rte_ethdev.c | 19 ++-- lib/mempool/rte_mempool.c | 24 ++--- lib/telemetry/rte_telemetry.h | 55 +++++++++- lib/telemetry/telemetry_data.c | 86 ++++++++++++++-- lib/telemetry/version.map | 9 ++ 8 files changed, 327 insertions(+), 36 deletions(-)