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 A74BEA0540; Tue, 13 Dec 2022 19:27:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8638A40687; Tue, 13 Dec 2022 19:27:52 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 959D14021D for ; Tue, 13 Dec 2022 19:27:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670956071; x=1702492071; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=M8+Hf2+z7SIeEvneusrHjjbg2f0r/FpSAhUCc+OwnAc=; b=HCry0KGiKHDgf/O1UvP5EqD14omzBTc0tHthBZnSGl88Yowhl3Brf4yG 8k2qIHExAkwMv7WURud/afO5si6NYfI/0/R+7Jh/aQjNsMtc4tLCTw7/h qiE7rW3KvRXkVDglmfdWyP3cIMw08hHFt76SYZ9Kds46p4XOZWm0rzuoa vRtT4DC71oeE9Kp2j5TqKpxqXlaLtsJeelXjodabEqImxGXHfIdQQ7efQ fls8FQPnjcas2dN2dn+mMN1Z8qp/UdGERGUljTMqR8JA5HoVjcW9oDIPF D89sjZVs1vhfIdIetquXyyUs5z2XdN9vEIEkVVrCRptSVfKU8Bl6gEhof Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10560"; a="382506938" X-IronPort-AV: E=Sophos;i="5.96,242,1665471600"; d="scan'208";a="382506938" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2022 10:27:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10560"; a="626445141" X-IronPort-AV: E=Sophos;i="5.96,242,1665471600"; d="scan'208";a="626445141" Received: from silpixa00401459.ir.intel.com (HELO silpixa00401459.ger.corp.intel.com) ([10.237.223.55]) by orsmga006.jf.intel.com with ESMTP; 13 Dec 2022 10:27:38 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [RFC PATCH 0/7] Standardize telemetry int types Date: Tue, 13 Dec 2022 18:27:23 +0000 Message-Id: <20221213182730.97065-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Rather than having 64-bit unsigned types and 32-bit signed types supported by the telemetry lib, we should support 64-bit values for both types. On the naming side, since both are 64-bit, we should no longer call the unsigned value u64 - "uint" is better. This patchset implements these changes as far as is possible while still keeping API and ABI compatibility. * Internal structures and functions are updated to use 64-bit ints * Internal functions are renamed from u64 to uint * Public enum values are renamed from u64 to uint, and a macro is added to ensure that older code still compiles * The public add_*_int functions are changed to take a 64-bit value rather than a 32-bit one. Since this would be an ABI break, we use function versioning to ensure older code still calls into a wrapper function which takes a 32-bit value. Finally, the patchset also contains a couple of other small cleanups to the telemetry code that were seen in passing when making these changes. Bruce Richardson (7): telemetry: rename unsigned 64-bit enum value to uint telemetry: add uint type as alias for u64 telemetry: remove RTE prefix from internal enum values telemetry: make array initialization more robust telemetry: update json functions to use int/uint in names telemetry: make internal int representation 64-bits telemetry: change public API to use 64-bit signed values app/test/test_telemetry_data.c | 10 +-- app/test/test_telemetry_json.c | 9 +- drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 4 +- drivers/net/cnxk/cnxk_ethdev_telemetry.c | 2 +- lib/cryptodev/rte_cryptodev.c | 2 +- lib/ethdev/rte_ethdev.c | 2 +- lib/ethdev/sff_telemetry.c | 2 +- lib/ipsec/ipsec_telemetry.c | 2 +- lib/security/rte_security.c | 4 +- lib/telemetry/meson.build | 1 + lib/telemetry/rte_telemetry.h | 46 +++++++++- lib/telemetry/telemetry.c | 56 ++++++------ lib/telemetry/telemetry_data.c | 95 ++++++++++++++------ lib/telemetry/telemetry_data.h | 24 +++-- lib/telemetry/telemetry_json.h | 16 ++-- lib/telemetry/version.map | 14 +++ 16 files changed, 192 insertions(+), 97 deletions(-) -- 2.34.1