numam-dpdk/lib/librte_telemetry
Bruce Richardson 5b637a8481 eal: fix querying DPDK version at runtime
For using a DPDK application, such as OVS, which is dynamically linked, the
DPDK version in use should always report the actual version, not the
version used at build time. This incorrect behaviour can be seen by
building OVS against one version of DPDK and running it against a later
one. Using "ovs-vsctl list Open_vSwitch" to query basic info, the
dpdk_version returned will be the build version not the currently running
one - which can be verified using the DPDK telemetry library client.

  $ sudo ovs-vsctl list Open_vSwitch | grep dpdk_version
  dpdk_version        : "DPDK 20.11.0-rc4"

  $ echo quit | sudo dpdk-telemetry.py
  Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
  {"version": "DPDK 21.02.0-rc2", "pid": 405659, "max_output_len": 16384}
  -->

To fix this, we need to convert the rte_version() function, and any other
necessary parts of the rte_version.h, to be actual functions in EAL, not
just inlines/macros. The only complication in doing so is that telemetry
library cannot call rte_version() directly, and instead needs the version
string passed in on init.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-03-15 23:22:14 +01:00
..
meson.build eal: add telemetry as dependency 2020-05-11 00:37:16 +02:00
rte_telemetry_legacy.h telemetry: introduce backward compatibility 2020-05-11 00:37:15 +02:00
rte_telemetry.h eal: fix querying DPDK version at runtime 2021-03-15 23:22:14 +01:00
telemetry_data.c telemetry: support array values in data object 2020-10-06 22:55:00 +02:00
telemetry_data.h telemetry: support array values in data object 2020-10-06 22:55:00 +02:00
telemetry_json.h telemetry: support array values in data object 2020-10-06 22:55:00 +02:00
telemetry_legacy.c telemetry: build stubs on Windows 2020-09-11 01:55:35 +02:00
telemetry.c eal: fix querying DPDK version at runtime 2021-03-15 23:22:14 +01:00
version.map telemetry: mark init function as internal-only 2021-02-09 13:36:45 +01:00