1 Star 0 Fork 76

chenjiji09/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0362-telemetry-mark-u64-functions-as-deprecated.patch 4.10 KB
一键复制 编辑 原始数据 按行查看 历史
From e2015dc88edc684c588b23c6b263aab7879b3d28 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 12 Jan 2023 17:41:13 +0000
Subject: telemetry: mark u64 functions as deprecated
[ upstream commit b2fafe2d3f4229abd05eb9e517565c0cc5da443e ]
Add a deprecation notice for the renaming of the telemetry data u64/uint
functions, and point users to the newer versions of them when building.
To do this, we also need to mark the renamed versions as stable, rather
than experimental.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 5 +++++
lib/telemetry/rte_telemetry.h | 9 +++++----
lib/telemetry/version.map | 4 ++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 5581822..67dadda 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -14,6 +14,11 @@ Deprecation Notices
* kvargs: The function ``rte_kvargs_process`` will get a new parameter
for returning key match count. It will ease handling of no-match case.
+* telemetry: The functions ``rte_tel_data_add_array_u64`` and ``rte_tel_data_add_dict_u64``,
+ used by telemetry callbacks for adding unsigned integer values to be returned to the user,
+ are renamed to ``rte_tel_data_add_array_uint`` and ``rte_tel_data_add_dict_uint`` respectively.
+ As such, the old function names are deprecated and will be removed in a future release.
+
* eal: The function ``rte_eal_remote_launch`` will return new error codes
after read or write error on the pipe, instead of calling ``rte_panic``.
diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index 73886fe..f364ac7 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -11,6 +11,7 @@ extern "C" {
#include <stdint.h>
#include <rte_compat.h>
+#include <rte_common.h>
/** Maximum length for string used in object. */
#define RTE_TEL_MAX_STRING_LEN 128
@@ -132,7 +133,6 @@ rte_tel_data_add_array_int(struct rte_tel_data *d, int x);
* @return
* 0 on success, negative errno on error
*/
-__rte_experimental
int
rte_tel_data_add_array_uint(struct rte_tel_data *d, uint64_t x);
@@ -149,7 +149,8 @@ rte_tel_data_add_array_uint(struct rte_tel_data *d, uint64_t x);
* 0 on success, negative errno on error
*/
int
-rte_tel_data_add_array_u64(struct rte_tel_data *d, uint64_t x);
+rte_tel_data_add_array_u64(struct rte_tel_data *d, uint64_t x)
+ __rte_deprecated_msg("use 'rte_tel_data_add_array_uint' instead");
/**
* Add a container to an array. A container is an existing telemetry data
@@ -244,7 +245,6 @@ rte_tel_data_add_dict_int(struct rte_tel_data *d, const char *name, int val);
* @return
* 0 on success, negative errno on error, E2BIG on string truncation of name.
*/
-__rte_experimental
int
rte_tel_data_add_dict_uint(struct rte_tel_data *d,
const char *name, uint64_t val);
@@ -265,7 +265,8 @@ rte_tel_data_add_dict_uint(struct rte_tel_data *d,
*/
int
rte_tel_data_add_dict_u64(struct rte_tel_data *d,
- const char *name, uint64_t val);
+ const char *name, uint64_t val)
+ __rte_deprecated_msg("use 'rte_tel_data_add_dict_uint' instead");
/**
* Add a container to a dictionary. A container is an existing telemetry data
diff --git a/lib/telemetry/version.map b/lib/telemetry/version.map
index 3c228d9..86ba714 100644
--- a/lib/telemetry/version.map
+++ b/lib/telemetry/version.map
@@ -5,10 +5,12 @@ DPDK_22 {
rte_tel_data_add_array_int;
rte_tel_data_add_array_string;
rte_tel_data_add_array_u64;
+ rte_tel_data_add_array_uint;
rte_tel_data_add_dict_container;
rte_tel_data_add_dict_int;
rte_tel_data_add_dict_string;
rte_tel_data_add_dict_u64;
+ rte_tel_data_add_dict_uint;
rte_tel_data_alloc;
rte_tel_data_free;
rte_tel_data_start_array;
@@ -23,9 +25,7 @@ EXPERIMENTAL {
global:
# added in 23.03
- rte_tel_data_add_array_uint;
rte_tel_data_add_array_uint_hex;
- rte_tel_data_add_dict_uint;
rte_tel_data_add_dict_uint_hex;
local: *;
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenjiji09/dpdk.git
git@gitee.com:chenjiji09/dpdk.git
chenjiji09
dpdk
dpdk
master

搜索帮助