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 C3C59A034C; Thu, 22 Dec 2022 07:38:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF7E342D1D; Thu, 22 Dec 2022 07:38:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 7607B42D19 for ; Thu, 22 Dec 2022 07:38:45 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BM1Uj1P018330; Wed, 21 Dec 2022 22:36:21 -0800 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=uResqtZaqRqKRgXG3VUrhYie9IqZhxI+QTFYk3Y+Y40=; b=adRmnuCz3mSQMM5fExwlFmpMVad1MA2fhDTFiXtDCyXvIq483BYW0aYMw1uFIIwJJMxT +zKP2VuxIRQqTZfvvhMaJ3bXYE3xhDhXX5sCJVuB0/GlRPBy/X/Y6ssYQgBS1u0DmXLv H4ld4E/Q9vQXa7blLEnpyChA2x2YUpq4Ogidzic61BL/rpH+PXX3U2hTS/Ky17tTEcws 00R9gagErZkzJnN2KqrwxZJNOyGTwDFaNhqEuMEfakzKyzK6EYCwl0PM/bzR9lOTMknb 93FU6ugomkwEuVZMRYZJ1gOu9/8nupy3enW4fyIAt9qa4P37WgafGuK44VAWdRhEP4W1 KA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3mm79c31w8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 21 Dec 2022 22:36:21 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 21 Dec 2022 22:36:19 -0800 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.42 via Frontend Transport; Wed, 21 Dec 2022 22:36:19 -0800 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 59F795B6948; Wed, 21 Dec 2022 22:35:57 -0800 (PST) From: Ankur Dwivedi To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Ankur Dwivedi Subject: [PATCH v4 6/6] ethdev: add trace points for tm Date: Thu, 22 Dec 2022 12:03:05 +0530 Message-ID: <20221222063306.3383695-7-adwivedi@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222063306.3383695-1-adwivedi@marvell.com> References: <20221006151844.23483-1-adwivedi@marvell.com> <20221222063306.3383695-1-adwivedi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: Q9qVMCkTbdoX_rYHI-fyfT-mVJAJk9eY X-Proofpoint-GUID: Q9qVMCkTbdoX_rYHI-fyfT-mVJAJk9eY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-22_02,2022-12-21_01,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 | 126 +++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 155 +++++++++++++++++++++++++++++++ lib/ethdev/rte_tm.c | 41 ++++++++ lib/ethdev/version.map | 30 ++++++ 5 files changed, 442 insertions(+) diff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c index 067e5fdab4..af66a139df 100644 --- a/lib/ethdev/ethdev_trace_points.c +++ b/lib/ethdev/ethdev_trace_points.c @@ -654,3 +654,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 53c3eb1225..c32b56c2a8 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, @@ -1366,6 +1367,131 @@ 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_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_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_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_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_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_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_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_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_ethdev_trace_fp.h b/lib/ethdev/rte_ethdev_trace_fp.h index 8c19940189..03f319ea47 100644 --- a/lib/ethdev/rte_ethdev_trace_fp.h +++ b/lib/ethdev/rte_ethdev_trace_fp.h @@ -19,6 +19,7 @@ extern "C" { #include "rte_ethdev.h" #include "rte_mtr.h" +#include "rte_tm.h" RTE_TRACE_POINT_FP( rte_eth_trace_call_rx_callbacks, @@ -837,6 +838,160 @@ RTE_TRACE_POINT_FP( rte_trace_point_emit_u64(stats_mask); ) +RTE_TRACE_POINT_FP( + rte_tm_trace_get_number_of_leaf_nodes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t n_leaf_nodes), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(n_leaf_nodes); +) + +RTE_TRACE_POINT_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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_FP( + 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); +) + #ifdef __cplusplus } #endif diff --git a/lib/ethdev/rte_tm.c b/lib/ethdev/rte_tm.c index 9709454f35..4578413adf 100644 --- a/lib/ethdev/rte_tm.c +++ b/lib/ethdev/rte_tm.c @@ -6,6 +6,8 @@ #include #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" +#include "rte_ethdev_trace_fp.h" #include "rte_tm_driver.h" #include "rte_tm.h" @@ -79,6 +81,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); return 0; } @@ -90,6 +93,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 +104,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 +116,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 +128,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 +140,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 +151,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 +163,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 +175,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 +187,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 +198,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 +210,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 +222,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 +238,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 +251,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 +262,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 +273,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 +284,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 +298,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 +311,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 +324,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 +337,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 +350,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 +363,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 +375,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 +388,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 +404,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 +418,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 +431,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 +444,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 c1a6e4d30a..112b2b1039 100644 --- a/lib/ethdev/version.map +++ b/lib/ethdev/version.map @@ -503,6 +503,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.25.1