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 2C1EB41C40; Wed, 8 Feb 2023 14:33:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14CEB40EE1; Wed, 8 Feb 2023 14:33:37 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3898040141 for ; Wed, 8 Feb 2023 14:33:35 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31899nhS002582; Wed, 8 Feb 2023 05:31:05 -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=PXq63eF/UlKjraAN/tKqIUMIH1Uyti44QbcGMx5at50=; b=XDnR8rdJDqyMLBoYGXuksRBwwhDbptjwVq25rIyhsOhf4nv8ewyc1sNUEu6O5ZlyB2fz YX2SZ+5tcZ3l18CcfxzixNlpz5+Fn3DQLYK7WBeCTFpAlCTlD15Vp6zS5og/G31OHJew ha+cJJ3ocyRCVo3uhYrkkIh6bE6fNav0ukZtjuhcEopm9P2CDLz73Q2pgUjjfyA4NO6W unC0F+zOSsuS/Dwpxx2KdTsLS1wHXm1Du/pAjWTho9ia5bCMH/GMsT0Xii2OtJ1+QdgY AosJq9rMdEDjUYnpFaPc4aOIKi3ibDJ36Jo1QtM0GlFirXJPIJvJhAkH/edB5986MLt6 xw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nm65ktksh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 08 Feb 2023 05:31:05 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 8 Feb 2023 05:31:03 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Wed, 8 Feb 2023 05:31:02 -0800 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 0C9683F709D; Wed, 8 Feb 2023 05:30:40 -0800 (PST) From: Ankur Dwivedi To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Ankur Dwivedi Subject: [PATCH v10 5/6] ethdev: add trace points for mtr Date: Wed, 8 Feb 2023 18:58:23 +0530 Message-ID: <20230208132824.775985-6-adwivedi@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230208132824.775985-1-adwivedi@marvell.com> References: <20230207063254.401538-1-adwivedi@marvell.com> <20230208132824.775985-1-adwivedi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: AVmt0YB8xAF4E1uWnFoGVumPvzpxfz6y X-Proofpoint-ORIG-GUID: AVmt0YB8xAF4E1uWnFoGVumPvzpxfz6y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-08_05,2023-02-08_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_mtr specific functions in ethdev lib. Signed-off-by: Ankur Dwivedi Acked-by: Sunil Kumar Kori --- lib/ethdev/ethdev_trace.h | 206 +++++++++++++++++++++++++++++++ lib/ethdev/ethdev_trace_points.c | 63 ++++++++++ lib/ethdev/rte_mtr.c | 150 ++++++++++++++++++---- 3 files changed, 398 insertions(+), 21 deletions(-) diff --git a/lib/ethdev/ethdev_trace.h b/lib/ethdev/ethdev_trace.h index be231b408b..973e2ac6d4 100644 --- a/lib/ethdev/ethdev_trace.h +++ b/lib/ethdev/ethdev_trace.h @@ -19,6 +19,7 @@ extern "C" { #include #include "rte_ethdev.h" +#include "rte_mtr.h" RTE_TRACE_POINT( rte_ethdev_trace_configure, @@ -1655,6 +1656,181 @@ RTE_TRACE_POINT( rte_trace_point_emit_int(ret); ) +RTE_TRACE_POINT( + rte_mtr_trace_capabilities_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_mtr_capabilities *cap, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(cap); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_profile_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + uint32_t meter_profile_id, + const struct rte_mtr_meter_profile *profile, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(meter_profile_id); + rte_trace_point_emit_ptr(profile); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_profile_delete, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + uint32_t meter_profile_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(meter_profile_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_profile_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + uint32_t meter_profile_id, const void *ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(meter_profile_id); + rte_trace_point_emit_ptr(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_policy_validate, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_mtr_meter_policy_params *policy, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_ptr(policy); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_policy_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t policy_id, + const struct rte_mtr_meter_policy_params *policy, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(policy_id); + rte_trace_point_emit_ptr(policy); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_policy_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t policy_id, + const void *ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(policy_id); + rte_trace_point_emit_ptr(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_profile_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + uint32_t meter_profile_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_u32(meter_profile_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_policy_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + uint32_t meter_policy_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_u32(meter_policy_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_dscp_table_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + enum rte_color *dscp_table, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_ptr(dscp_table); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_meter_vlan_table_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + const enum rte_color *vlan_table, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_ptr(vlan_table); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_color_in_protocol_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + enum rte_mtr_color_in_protocol proto, uint32_t priority, + int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_int(proto); + rte_trace_point_emit_u32(priority); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_color_in_protocol_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_color_in_protocol_priority_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + enum rte_mtr_color_in_protocol proto, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_int(proto); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_stats_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + uint64_t stats_mask, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_u64(stats_mask); + rte_trace_point_emit_int(ret); +) + +RTE_TRACE_POINT( + rte_mtr_trace_stats_read, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + const struct rte_mtr_stats *stats, uint64_t stats_mask, + int clear, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_ptr(stats); + rte_trace_point_emit_u64(stats_mask); + rte_trace_point_emit_int(clear); + rte_trace_point_emit_int(ret); +) + /* Fast path trace points */ /* Called in loop in examples/qos_sched and examples/distributor */ @@ -2006,6 +2182,36 @@ RTE_TRACE_POINT_FP( rte_trace_point_emit_int(ret); ) +/* Called in loop in app/test-flow-perf */ +RTE_TRACE_POINT_FP( + rte_mtr_trace_create, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, + const struct rte_mtr_params *params, int shared, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_ptr(params); + rte_trace_point_emit_int(shared); + rte_trace_point_emit_int(ret); +) + +/* Called in loop in app/test-flow-perf */ +RTE_TRACE_POINT_FP( + rte_mtr_trace_destroy, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t mtr_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(mtr_id); + rte_trace_point_emit_int(ret); +) + +/* Called in loop in app/test-flow-perf */ +RTE_TRACE_POINT_FP( + rte_mtr_trace_meter_policy_delete, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t policy_id, int ret), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(policy_id); + rte_trace_point_emit_int(ret); +) + #ifdef __cplusplus } #endif diff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c index b8cbb285de..c34c06941c 100644 --- a/lib/ethdev/ethdev_trace_points.c +++ b/lib/ethdev/ethdev_trace_points.c @@ -591,3 +591,66 @@ RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_action_handle_update, RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_action_handle_query, lib.ethdev.flow.async.action.handle.query) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_capabilities_get, + lib.ethdev.mtr.capabilities_get) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_create, + lib.ethdev.mtr.create) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_destroy, + lib.ethdev.mtr.destroy) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_disable, + lib.ethdev.mtr.meter_disable) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_dscp_table_update, + lib.ethdev.mtr.meter_dscp_table_update) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_enable, + lib.ethdev.mtr.meter_enable) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_profile_add, + lib.ethdev.mtr.meter_profile_add) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_profile_delete, + lib.ethdev.mtr.meter_profile_delete) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_profile_get, + lib.ethdev.mtr.meter_profile_get) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_profile_update, + lib.ethdev.mtr.meter_profile_update) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_stats_read, + lib.ethdev.mtr.stats_read) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_stats_update, + lib.ethdev.mtr.stats_update) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_policy_add, + lib.ethdev.mtr.meter_policy_add) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_policy_delete, + lib.ethdev.mtr.meter_policy_delete) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_policy_get, + lib.ethdev.mtr.meter_policy_get) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_policy_update, + lib.ethdev.mtr.meter_policy_update) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_policy_validate, + lib.ethdev.mtr.meter_policy_validate) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_meter_vlan_table_update, + lib.ethdev.mtr.meter_vlan_table_update) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_get, + lib.ethdev.mtr.color_in_protocol_get) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_priority_get, + lib.ethdev.mtr.color_in_protocol_priority_get) + +RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_set, + lib.ethdev.mtr.color_in_protocol_set) diff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c index 3954839531..4e94af9d9f 100644 --- a/lib/ethdev/rte_mtr.c +++ b/lib/ethdev/rte_mtr.c @@ -5,6 +5,7 @@ #include #include +#include "ethdev_trace.h" #include "rte_ethdev.h" #include "rte_mtr_driver.h" #include "rte_mtr.h" @@ -82,8 +83,13 @@ rte_mtr_capabilities_get(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, capabilities_get)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, capabilities_get)(dev, cap, error); + + rte_mtr_trace_capabilities_get(port_id, cap, ret); + + return ret; } /* MTR meter profile add */ @@ -94,8 +100,14 @@ rte_mtr_meter_profile_add(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_profile_add)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_profile_add)(dev, meter_profile_id, profile, error); + + rte_mtr_trace_meter_profile_add(port_id, meter_profile_id, profile, + ret); + + return ret; } /** MTR meter profile delete */ @@ -105,8 +117,13 @@ rte_mtr_meter_profile_delete(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_profile_delete)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_profile_delete)(dev, meter_profile_id, error); + + rte_mtr_trace_meter_profile_delete(port_id, meter_profile_id, ret); + + return ret; } /** MTR meter profile get */ @@ -116,8 +133,13 @@ rte_mtr_meter_profile_get(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_HNDL_FUNC(port_id, meter_profile_get)(dev, + struct rte_flow_meter_profile *ret; + ret = RTE_MTR_HNDL_FUNC(port_id, meter_profile_get)(dev, meter_profile_id, error); + + rte_mtr_trace_meter_profile_get(port_id, meter_profile_id, ret); + + return ret; } /* MTR meter policy validate */ @@ -127,8 +149,13 @@ rte_mtr_meter_policy_validate(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_policy_validate)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_policy_validate)(dev, policy, error); + + rte_mtr_trace_meter_policy_validate(port_id, policy, ret); + + return ret; } /* MTR meter policy add */ @@ -139,8 +166,13 @@ rte_mtr_meter_policy_add(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_policy_add)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_policy_add)(dev, policy_id, policy, error); + + rte_mtr_trace_meter_policy_add(port_id, policy_id, policy, ret); + + return ret; } /** MTR meter policy delete */ @@ -150,8 +182,13 @@ rte_mtr_meter_policy_delete(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_policy_delete)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_policy_delete)(dev, policy_id, error); + + rte_mtr_trace_meter_policy_delete(port_id, policy_id, ret); + + return ret; } /** MTR meter policy get */ @@ -161,8 +198,13 @@ rte_mtr_meter_policy_get(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_HNDL_FUNC(port_id, meter_policy_get)(dev, + struct rte_flow_meter_policy *ret; + ret = RTE_MTR_HNDL_FUNC(port_id, meter_policy_get)(dev, policy_id, error); + + rte_mtr_trace_meter_policy_get(port_id, policy_id, ret); + + return ret; } /** MTR object create */ @@ -174,8 +216,13 @@ rte_mtr_create(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, create)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, create)(dev, mtr_id, params, shared, error); + + rte_mtr_trace_create(port_id, mtr_id, params, shared, ret); + + return ret; } /** MTR object destroy */ @@ -185,8 +232,13 @@ rte_mtr_destroy(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, destroy)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, destroy)(dev, mtr_id, error); + + rte_mtr_trace_destroy(port_id, mtr_id, ret); + + return ret; } /** MTR object meter enable */ @@ -196,8 +248,13 @@ rte_mtr_meter_enable(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_enable)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_enable)(dev, mtr_id, error); + + rte_mtr_trace_meter_enable(port_id, mtr_id, ret); + + return ret; } /** MTR object meter disable */ @@ -207,8 +264,13 @@ rte_mtr_meter_disable(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_disable)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_disable)(dev, mtr_id, error); + + rte_mtr_trace_meter_disable(port_id, mtr_id, ret); + + return ret; } /** MTR object meter profile update */ @@ -219,8 +281,13 @@ rte_mtr_meter_profile_update(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_profile_update)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_profile_update)(dev, mtr_id, meter_profile_id, error); + + rte_mtr_trace_meter_profile_update(port_id, mtr_id, meter_profile_id, ret); + + return ret; } /** MTR object meter policy update */ @@ -231,8 +298,13 @@ rte_mtr_meter_policy_update(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_policy_update)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_policy_update)(dev, mtr_id, meter_policy_id, error); + + rte_mtr_trace_meter_policy_update(port_id, mtr_id, meter_policy_id, ret); + + return ret; } /** MTR object meter DSCP table update */ @@ -243,8 +315,13 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_dscp_table_update)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_dscp_table_update)(dev, mtr_id, proto, dscp_table, error); + + rte_mtr_trace_meter_dscp_table_update(port_id, mtr_id, dscp_table, ret); + + return ret; } /** MTR object meter VLAN table update */ @@ -255,8 +332,13 @@ rte_mtr_meter_vlan_table_update(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, meter_vlan_table_update)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, meter_vlan_table_update)(dev, mtr_id, proto, vlan_table, error); + + rte_mtr_trace_meter_vlan_table_update(port_id, mtr_id, vlan_table, ret); + + return ret; } /** Set the input color protocol on MTR object */ @@ -268,8 +350,13 @@ rte_mtr_color_in_protocol_set(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, in_proto_set)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, in_proto_set)(dev, mtr_id, proto, priority, error); + + rte_mtr_trace_color_in_protocol_set(port_id, mtr_id, proto, priority, ret); + + return ret; } /** Get input color protocols of MTR object */ @@ -280,8 +367,13 @@ rte_mtr_color_in_protocol_get(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, in_proto_get)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, in_proto_get)(dev, mtr_id, proto_mask, error); + + rte_mtr_trace_color_in_protocol_get(port_id, mtr_id, ret); + + return ret; } /** Get input color protocol priority of MTR object */ @@ -293,8 +385,13 @@ rte_mtr_color_in_protocol_priority_get(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, in_proto_prio_get)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, in_proto_prio_get)(dev, mtr_id, proto, priority, error); + + rte_mtr_trace_color_in_protocol_priority_get(port_id, mtr_id, proto, ret); + + return ret; } /** MTR object enabled stats update */ @@ -305,8 +402,13 @@ rte_mtr_stats_update(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, stats_update)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, stats_update)(dev, mtr_id, stats_mask, error); + + rte_mtr_trace_stats_update(port_id, mtr_id, stats_mask, ret); + + return ret; } /** MTR object stats read */ @@ -319,6 +421,12 @@ rte_mtr_stats_read(uint16_t port_id, struct rte_mtr_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - return RTE_MTR_FUNC(port_id, stats_read)(dev, + int ret; + ret = RTE_MTR_FUNC(port_id, stats_read)(dev, mtr_id, stats, stats_mask, clear, error); + + rte_mtr_trace_stats_read(port_id, mtr_id, stats, *stats_mask, clear, + ret); + + return ret; } -- 2.25.1