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 D7056A00C4; Thu, 4 Aug 2022 15:49:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C315542BDB; Thu, 4 Aug 2022 15:49:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5306142BD9 for ; Thu, 4 Aug 2022 15:49:27 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 274COOAU020987; Thu, 4 Aug 2022 06:47:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=YvoFjKlzJI+FxnIFSBVVd//2FtWemtdld29ZyGCzC8c=; b=M17bOC59o6RqLDw6MuAgGvvENUv5y01EY6WSLQLn7iKejPwSVHTHkBJzcggjEI3HgePz 0XaTRMe1dPB52if3vksweI/heXkLm4UG6MmOY/qkXaRY1y2PhC/c89vNHAUthsmO7wj8 sczaDxB6TTCJxHhsl+36FTLnUwy0OYwAf3OUsfYx6jm1xKl2mnwHW5zJlev2aGAW4iaG /k5QzoIfjIxVw9eJ9xMUTTbCFEteFNYsRoCE8/8VYuYklK4oUG1OujX+ZYqEZIO5e3zu le03Mak+4QN3R4+GTceF87Vf/ZKYKok7nPpbcvujEpd3rl8jXSa7RME8Ec0YCtnym61Q 3Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3hqgf1xr5y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 04 Aug 2022 06:47:11 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Aug 2022 06:47:09 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 4 Aug 2022 06:47:09 -0700 Received: from hyd1349.t110.caveonetworks.com.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 520DB5B6941; Thu, 4 Aug 2022 06:46:48 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Ankur Dwivedi Subject: [PATCH 4/6] ethdev: add trace points for tm Date: Thu, 4 Aug 2022 19:14:28 +0530 Message-ID: <20220804134430.6192-5-adwivedi@marvell.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20220804134430.6192-1-adwivedi@marvell.com> References: <20220804134430.6192-1-adwivedi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: XgBe4K05mJRU4N-2c7TtBXcPLMsnOJYK X-Proofpoint-ORIG-GUID: XgBe4K05mJRU4N-2c7TtBXcPLMsnOJYK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-04_03,2022-08-04_02,2022-06-22_01 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 Adds trace points for rte_tm specific functions in ethdev lib. Signed-off-by: Ankur Dwivedi --- 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 --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c index 673a0be13b..341901d031 100644 --- a/lib/ethdev/ethdev_trace_points.c +++ b/lib/ethdev/ethdev_trace_points.c @@ -641,3 +641,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 c07b5b3fb6..aa34a6a5e9 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, @@ -1851,6 +1852,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 #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 2e282bb457..ee4012789f 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 { -- 2.28.0