diff mbox series

[v2,4/4] ethdev: add trace points for tm

Message ID 20220929102936.5490-5-adwivedi@marvell.com (mailing list archive)
State Superseded
Delegated to: Andrew Rybchenko
Headers show
Series add trace points in ethdev library | expand

Checks

Context Check Description
ci/Intel-compilation warning apply issues
ci/checkpatch success coding style OK

Commit Message

Ankur Dwivedi Sept. 29, 2022, 10:29 a.m. UTC
Adds trace points for rte_tm specific functions in ethdev lib.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 lib/ethdev/ethdev_trace_points.c |  90 ++++++++++
 lib/ethdev/rte_ethdev_trace.h    | 283 +++++++++++++++++++++++++++++++
 lib/ethdev/rte_tm.c              |  40 +++++
 lib/ethdev/version.map           |  30 ++++
 4 files changed, 443 insertions(+)
diff mbox series

Patch

diff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c
index 4fe1b10979..9527b413e5 100644
--- a/lib/ethdev/ethdev_trace_points.c
+++ b/lib/ethdev/ethdev_trace_points.c
@@ -638,3 +638,93 @@  RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_priority_get,
 
 RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_set,
 	lib.ethdev.mtr.color_in_protocol_set)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_capabilities_get,
+	lib.ethdev.tm.capabilities_get)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_get_number_of_leaf_nodes,
+	lib.ethdev.tm.get_number_of_leaf_nodes)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_hierarchy_commit,
+	lib.ethdev.tm.hierarchy_commit)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_level_capabilities_get,
+	lib.ethdev.tm.level_capabilities_get)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_mark_ip_dscp,
+	lib.ethdev.tm.mark_ip_dscp)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_mark_ip_ecn,
+	lib.ethdev.tm.mark_ip_ecn)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_mark_vlan_dei,
+	lib.ethdev.tm.mark_vlan_dei)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_add,
+	lib.ethdev.tm.node_add)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_capabilities_get,
+	lib.ethdev.tm.node_capabilities_get)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_cman_update,
+	lib.ethdev.tm.node_cman_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_delete,
+	lib.ethdev.tm.node_delete)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_parent_update,
+	lib.ethdev.tm.node_parent_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_resume,
+	lib.ethdev.tm.node_resume)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_shaper_update,
+	lib.ethdev.tm.node_shaper_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_shared_shaper_update,
+	lib.ethdev.tm.node_shared_shaper_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_shared_wred_context_update,
+	lib.ethdev.tm.node_shared_wred_context_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_stats_read,
+	lib.ethdev.tm.node_stats_read)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_stats_update,
+	lib.ethdev.tm.node_stats_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_suspend,
+	lib.ethdev.tm.node_suspend)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_type_get,
+	lib.ethdev.tm.node_type_get)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_wfq_weight_mode_update,
+	lib.ethdev.tm.node_wfq_weight_mode_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_node_wred_context_update,
+	lib.ethdev.tm.node_wred_context_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_shaper_profile_add,
+	lib.ethdev.tm.shaper_profile_add)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_shaper_profile_delete,
+	lib.ethdev.tm.shaper_profile_delete)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_shared_shaper_add_update,
+	lib.ethdev.tm.shared_shaper_add_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_shared_shaper_delete,
+	lib.ethdev.tm.shared_shaper_delete)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_shared_wred_context_add_update,
+	lib.ethdev.tm.shared_wred_context_add_update)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_shared_wred_context_delete,
+	lib.ethdev.tm.shared_wred_context_delete)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_wred_profile_add,
+	lib.ethdev.tm.wred_profile_add)
+
+RTE_TRACE_POINT_REGISTER(rte_tm_trace_wred_profile_delete,
+	lib.ethdev.tm.wred_profile_delete)
diff --git a/lib/ethdev/rte_ethdev_trace.h b/lib/ethdev/rte_ethdev_trace.h
index 15d541ac0b..306b471e58 100644
--- a/lib/ethdev/rte_ethdev_trace.h
+++ b/lib/ethdev/rte_ethdev_trace.h
@@ -19,6 +19,7 @@  extern "C" {
 
 #include "rte_ethdev.h"
 #include "rte_mtr.h"
+#include "rte_tm.h"
 
 RTE_TRACE_POINT(
 	rte_ethdev_trace_configure,
@@ -1867,6 +1868,288 @@  RTE_TRACE_POINT(
 	rte_trace_point_emit_u32(priority);
 )
 
+RTE_TRACE_POINT(
+	rte_tm_trace_capabilities_get,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id,
+		struct rte_tm_capabilities *cap),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_ptr(cap);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_get_number_of_leaf_nodes,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t n_leaf_nodes,
+		struct rte_tm_error *error),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(n_leaf_nodes);
+	rte_trace_point_emit_int(error->type);
+	rte_trace_point_emit_string(error->message);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_hierarchy_commit,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, int clear_on_fail),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_int(clear_on_fail);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_level_capabilities_get,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t level_id,
+		struct rte_tm_level_capabilities *cap),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(level_id);
+	rte_trace_point_emit_ptr(cap);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_mark_ip_dscp,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, int mark_green,
+		int mark_yellow, int mark_red),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_int(mark_green);
+	rte_trace_point_emit_int(mark_yellow);
+	rte_trace_point_emit_int(mark_red);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_mark_ip_ecn,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, int mark_green,
+		int mark_yellow, int mark_red),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_int(mark_green);
+	rte_trace_point_emit_int(mark_yellow);
+	rte_trace_point_emit_int(mark_red);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_mark_vlan_dei,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, int mark_green,
+		int mark_yellow, int mark_red),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_int(mark_green);
+	rte_trace_point_emit_int(mark_yellow);
+	rte_trace_point_emit_int(mark_red);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_add,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		uint32_t parent_node_id, uint32_t priority,
+		uint32_t weight, uint32_t level_id,
+		struct rte_tm_node_params *params),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_u32(parent_node_id);
+	rte_trace_point_emit_u32(priority);
+	rte_trace_point_emit_u32(weight);
+	rte_trace_point_emit_u32(level_id);
+	rte_trace_point_emit_ptr(params);
+	rte_trace_point_emit_u32(params->shaper_profile_id);
+	rte_trace_point_emit_u32(params->n_shared_shapers);
+	rte_trace_point_emit_u64(params->stats_mask);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_capabilities_get,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		struct rte_tm_node_capabilities *cap),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_ptr(cap);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_cman_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		enum rte_tm_cman_mode cman),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_int(cman);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_delete,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_parent_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		uint32_t parent_node_id, uint32_t priority,
+		uint32_t weight),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_u32(parent_node_id);
+	rte_trace_point_emit_u32(priority);
+	rte_trace_point_emit_u32(weight);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_resume,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_shaper_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		uint32_t shaper_profile_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_u32(shaper_profile_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_shared_shaper_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		uint32_t shared_shaper_id, int add),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_u32(shared_shaper_id);
+	rte_trace_point_emit_int(add);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_shared_wred_context_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		uint32_t shared_wred_context_id, int add),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_u32(shared_wred_context_id);
+	rte_trace_point_emit_int(add);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_stats_read,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		struct rte_tm_node_stats *stats,
+		uint64_t *stats_mask, int clear),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_ptr(stats);
+	rte_trace_point_emit_ptr(stats_mask);
+	rte_trace_point_emit_int(clear);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_stats_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		uint64_t stats_mask),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_u64(stats_mask);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_suspend,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_type_get,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		int *is_leaf),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_ptr(is_leaf);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_wfq_weight_mode_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		int *wfq_weight_mode, uint32_t n_sp_priorities),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_ptr(wfq_weight_mode);
+	rte_trace_point_emit_u32(n_sp_priorities);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_node_wred_context_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t node_id,
+		uint32_t wred_profile_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(node_id);
+	rte_trace_point_emit_u32(wred_profile_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_shaper_profile_add,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t shaper_profile_id,
+		struct rte_tm_shaper_params *profile),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(shaper_profile_id);
+	rte_trace_point_emit_ptr(profile);
+	rte_trace_point_emit_u64(profile->committed.rate);
+	rte_trace_point_emit_u64(profile->committed.size);
+	rte_trace_point_emit_u64(profile->peak.rate);
+	rte_trace_point_emit_u64(profile->peak.size);
+	rte_trace_point_emit_i32(profile->pkt_length_adjust);
+	rte_trace_point_emit_int(profile->packet_mode);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_shaper_profile_delete,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t shaper_profile_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(shaper_profile_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_shared_shaper_add_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t shared_shaper_id,
+		uint32_t shaper_profile_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(shared_shaper_id);
+	rte_trace_point_emit_u32(shaper_profile_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_shared_shaper_delete,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t shared_shaper_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(shared_shaper_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_shared_wred_context_add_update,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t shared_wred_context_id,
+		uint32_t wred_profile_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(shared_wred_context_id);
+	rte_trace_point_emit_u32(wred_profile_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_shared_wred_context_delete,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t shared_wred_context_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(shared_wred_context_id);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_wred_profile_add,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t wred_profile_id,
+		struct rte_tm_wred_params *profile),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(wred_profile_id);
+	rte_trace_point_emit_ptr(profile);
+	rte_trace_point_emit_int(profile->packet_mode);
+)
+
+RTE_TRACE_POINT(
+	rte_tm_trace_wred_profile_delete,
+	RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t wred_profile_id),
+	rte_trace_point_emit_u16(port_id);
+	rte_trace_point_emit_u32(wred_profile_id);
+)
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/ethdev/rte_tm.c b/lib/ethdev/rte_tm.c
index 9709454f35..b0b43eacc0 100644
--- a/lib/ethdev/rte_tm.c
+++ b/lib/ethdev/rte_tm.c
@@ -6,6 +6,7 @@ 
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_trace.h"
 #include "rte_tm_driver.h"
 #include "rte_tm.h"
 
@@ -79,6 +80,7 @@  rte_tm_get_number_of_leaf_nodes(uint16_t port_id,
 	}
 
 	*n_leaf_nodes = dev->data->nb_tx_queues;
+	rte_tm_trace_get_number_of_leaf_nodes(port_id, *n_leaf_nodes, error);
 	return 0;
 }
 
@@ -90,6 +92,7 @@  rte_tm_node_type_get(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_type_get(port_id, node_id, is_leaf);
 	return RTE_TM_FUNC(port_id, node_type_get)(dev,
 		node_id, is_leaf, error);
 }
@@ -100,6 +103,7 @@  int rte_tm_capabilities_get(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_capabilities_get(port_id, cap);
 	return RTE_TM_FUNC(port_id, capabilities_get)(dev,
 		cap, error);
 }
@@ -111,6 +115,7 @@  int rte_tm_level_capabilities_get(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_level_capabilities_get(port_id, level_id, cap);
 	return RTE_TM_FUNC(port_id, level_capabilities_get)(dev,
 		level_id, cap, error);
 }
@@ -122,6 +127,7 @@  int rte_tm_node_capabilities_get(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_capabilities_get(port_id, node_id, cap);
 	return RTE_TM_FUNC(port_id, node_capabilities_get)(dev,
 		node_id, cap, error);
 }
@@ -133,6 +139,7 @@  int rte_tm_wred_profile_add(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_wred_profile_add(port_id, wred_profile_id, profile);
 	return RTE_TM_FUNC(port_id, wred_profile_add)(dev,
 		wred_profile_id, profile, error);
 }
@@ -143,6 +150,7 @@  int rte_tm_wred_profile_delete(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_wred_profile_delete(port_id, wred_profile_id);
 	return RTE_TM_FUNC(port_id, wred_profile_delete)(dev,
 		wred_profile_id, error);
 }
@@ -154,6 +162,8 @@  int rte_tm_shared_wred_context_add_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_shared_wred_context_add_update(port_id, shared_wred_context_id,
+						    wred_profile_id);
 	return RTE_TM_FUNC(port_id, shared_wred_context_add_update)(dev,
 		shared_wred_context_id, wred_profile_id, error);
 }
@@ -164,6 +174,7 @@  int rte_tm_shared_wred_context_delete(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_shared_wred_context_delete(port_id, shared_wred_context_id);
 	return RTE_TM_FUNC(port_id, shared_wred_context_delete)(dev,
 		shared_wred_context_id, error);
 }
@@ -175,6 +186,7 @@  int rte_tm_shaper_profile_add(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_shaper_profile_add(port_id, shaper_profile_id, profile);
 	return RTE_TM_FUNC(port_id, shaper_profile_add)(dev,
 		shaper_profile_id, profile, error);
 }
@@ -185,6 +197,7 @@  int rte_tm_shaper_profile_delete(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_shaper_profile_delete(port_id, shaper_profile_id);
 	return RTE_TM_FUNC(port_id, shaper_profile_delete)(dev,
 		shaper_profile_id, error);
 }
@@ -196,6 +209,8 @@  int rte_tm_shared_shaper_add_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_shared_shaper_add_update(port_id, shared_shaper_id,
+					      shaper_profile_id);
 	return RTE_TM_FUNC(port_id, shared_shaper_add_update)(dev,
 		shared_shaper_id, shaper_profile_id, error);
 }
@@ -206,6 +221,7 @@  int rte_tm_shared_shaper_delete(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_shared_shaper_delete(port_id, shared_shaper_id);
 	return RTE_TM_FUNC(port_id, shared_shaper_delete)(dev,
 		shared_shaper_id, error);
 }
@@ -221,6 +237,8 @@  int rte_tm_node_add(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_add(port_id, node_id, parent_node_id, priority,
+			      weight, level_id, params);
 	return RTE_TM_FUNC(port_id, node_add)(dev,
 		node_id, parent_node_id, priority, weight, level_id,
 		params, error);
@@ -232,6 +250,7 @@  int rte_tm_node_delete(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_delete(port_id, node_id);
 	return RTE_TM_FUNC(port_id, node_delete)(dev,
 		node_id, error);
 }
@@ -242,6 +261,7 @@  int rte_tm_node_suspend(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_suspend(port_id, node_id);
 	return RTE_TM_FUNC(port_id, node_suspend)(dev,
 		node_id, error);
 }
@@ -252,6 +272,7 @@  int rte_tm_node_resume(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_resume(port_id, node_id);
 	return RTE_TM_FUNC(port_id, node_resume)(dev,
 		node_id, error);
 }
@@ -262,6 +283,7 @@  int rte_tm_hierarchy_commit(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_hierarchy_commit(port_id, clear_on_fail);
 	return RTE_TM_FUNC(port_id, hierarchy_commit)(dev,
 		clear_on_fail, error);
 }
@@ -275,6 +297,8 @@  int rte_tm_node_parent_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_parent_update(port_id, node_id, parent_node_id,
+					priority, weight);
 	return RTE_TM_FUNC(port_id, node_parent_update)(dev,
 		node_id, parent_node_id, priority, weight, error);
 }
@@ -286,6 +310,7 @@  int rte_tm_node_shaper_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_shaper_update(port_id, node_id, shaper_profile_id);
 	return RTE_TM_FUNC(port_id, node_shaper_update)(dev,
 		node_id, shaper_profile_id, error);
 }
@@ -298,6 +323,8 @@  int rte_tm_node_shared_shaper_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_shared_shaper_update(port_id, node_id, shared_shaper_id,
+					       add);
 	return RTE_TM_FUNC(port_id, node_shared_shaper_update)(dev,
 		node_id, shared_shaper_id, add, error);
 }
@@ -309,6 +336,7 @@  int rte_tm_node_stats_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_stats_update(port_id, node_id, stats_mask);
 	return RTE_TM_FUNC(port_id, node_stats_update)(dev,
 		node_id, stats_mask, error);
 }
@@ -321,6 +349,8 @@  int rte_tm_node_wfq_weight_mode_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_wfq_weight_mode_update(port_id, node_id, wfq_weight_mode,
+						 n_sp_priorities);
 	return RTE_TM_FUNC(port_id, node_wfq_weight_mode_update)(dev,
 		node_id, wfq_weight_mode, n_sp_priorities, error);
 }
@@ -332,6 +362,7 @@  int rte_tm_node_cman_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_cman_update(port_id, node_id, cman);
 	return RTE_TM_FUNC(port_id, node_cman_update)(dev,
 		node_id, cman, error);
 }
@@ -343,6 +374,7 @@  int rte_tm_node_wred_context_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_wred_context_update(port_id, node_id, wred_profile_id);
 	return RTE_TM_FUNC(port_id, node_wred_context_update)(dev,
 		node_id, wred_profile_id, error);
 }
@@ -355,6 +387,9 @@  int rte_tm_node_shared_wred_context_update(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_shared_wred_context_update(port_id, node_id,
+						     shared_wred_context_id,
+						     add);
 	return RTE_TM_FUNC(port_id, node_shared_wred_context_update)(dev,
 		node_id, shared_wred_context_id, add, error);
 }
@@ -368,6 +403,8 @@  int rte_tm_node_stats_read(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_node_stats_read(port_id, node_id, stats, stats_mask,
+				     clear);
 	return RTE_TM_FUNC(port_id, node_stats_read)(dev,
 		node_id, stats, stats_mask, clear, error);
 }
@@ -380,6 +417,7 @@  int rte_tm_mark_vlan_dei(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_mark_vlan_dei(port_id, mark_green, mark_yellow, mark_red);
 	return RTE_TM_FUNC(port_id, mark_vlan_dei)(dev,
 		mark_green, mark_yellow, mark_red, error);
 }
@@ -392,6 +430,7 @@  int rte_tm_mark_ip_ecn(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_mark_ip_ecn(port_id, mark_green, mark_yellow, mark_red);
 	return RTE_TM_FUNC(port_id, mark_ip_ecn)(dev,
 		mark_green, mark_yellow, mark_red, error);
 }
@@ -404,6 +443,7 @@  int rte_tm_mark_ip_dscp(uint16_t port_id,
 	struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	rte_tm_trace_mark_ip_dscp(port_id, mark_green, mark_yellow, mark_red);
 	return RTE_TM_FUNC(port_id, mark_ip_dscp)(dev,
 		mark_green, mark_yellow, mark_red, error);
 }
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index 767dbfebc5..b991b05d1e 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -490,6 +490,36 @@  EXPERIMENTAL {
 	__rte_mtr_trace_meter_vlan_table_update;
 	__rte_mtr_trace_stats_read;
 	__rte_mtr_trace_stats_update;
+	__rte_tm_trace_capabilities_get;
+	__rte_tm_trace_get_number_of_leaf_nodes;
+	__rte_tm_trace_hierarchy_commit;
+	__rte_tm_trace_level_capabilities_get;
+	__rte_tm_trace_mark_ip_dscp;
+	__rte_tm_trace_mark_ip_ecn;
+	__rte_tm_trace_mark_vlan_dei;
+	__rte_tm_trace_node_add;
+	__rte_tm_trace_node_capabilities_get;
+	__rte_tm_trace_node_cman_update;
+	__rte_tm_trace_node_delete;
+	__rte_tm_trace_node_parent_update;
+	__rte_tm_trace_node_resume;
+	__rte_tm_trace_node_shaper_update;
+	__rte_tm_trace_node_shared_shaper_update;
+	__rte_tm_trace_node_shared_wred_context_update;
+	__rte_tm_trace_node_stats_read;
+	__rte_tm_trace_node_stats_update;
+	__rte_tm_trace_node_suspend;
+	__rte_tm_trace_node_type_get;
+	__rte_tm_trace_node_wfq_weight_mode_update;
+	__rte_tm_trace_node_wred_context_update;
+	__rte_tm_trace_shaper_profile_add;
+	__rte_tm_trace_shaper_profile_delete;
+	__rte_tm_trace_shared_shaper_add_update;
+	__rte_tm_trace_shared_shaper_delete;
+	__rte_tm_trace_shared_wred_context_add_update;
+	__rte_tm_trace_shared_wred_context_delete;
+	__rte_tm_trace_wred_profile_add;
+	__rte_tm_trace_wred_profile_delete;
 };
 
 INTERNAL {