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. And this patchset use the new 'u32' API to resolve the problem of data conversion error, and use the 'u64' API to add 'u64' data. Also, this patchset optimize the display of some capability related variables in ethdev by using hexadecimal data. Huisong Li (8): telemetry: move to header to controllable range telemetry: add u32 telemetry data type API test: add test cases for u32 telemetry data 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 ethdev: telemetry convert capability related variable to hex app/test/test_telemetry_data.c | 86 +++++++++++++++++++++++++++++- 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 | 26 +++++---- lib/mempool/rte_mempool.c | 24 ++++----- lib/telemetry/rte_telemetry.h | 40 ++++++++++++-- lib/telemetry/telemetry.c | 25 ++++++++- lib/telemetry/telemetry_data.c | 52 ++++++++++++++---- lib/telemetry/telemetry_data.h | 2 + lib/telemetry/telemetry_json.h | 29 ++++++++++ lib/telemetry/version.map | 9 ++++ 12 files changed, 285 insertions(+), 47 deletions(-) -- 2.33.0