mbox

[RFC,0/7] Standardize telemetry int types

Message ID 20221213182730.97065-1-bruce.richardson@intel.com (mailing list archive)
Headers

Message

Bruce Richardson Dec. 13, 2022, 6:27 p.m. UTC
  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