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 415E641C2A; Tue, 7 Feb 2023 07:36:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32DD740ED9; Tue, 7 Feb 2023 07:36:00 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 4A3FF40E6E for ; Tue, 7 Feb 2023 07:35:59 +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 317561ET019068; Mon, 6 Feb 2023 22:33:25 -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-type : content-transfer-encoding; s=pfpt0220; bh=p3FN2dTmF6pZWSKM0RSmvLjxKtphw3OcwJCkTB5iDP8=; b=dTB69GneAuLfyyIfiLkcuPqNBP8CTeSZ82x7vlG4Rj3vs868Cfm6AQSYGi6x/zrwLWA2 fPEALFcb91Puj+zu5MiooL0qySR2luCQ+k9Pndm5xlgbiKdtWIScfdHjH9CRfNX5h3PV mEiQNOZ4DpnbHnwNNA7G4vuLyAJtIaI2AZUIMvzpW1w1cYoO05cvVcka1H2pB1gOs2r1 OMAE5T+ZtNMeM986pBbi4vUqNDISq6uegIMx6cKIbMehf8JTQqA3n8fH6PERc0Q36xT/ 7FukBZKe5pAD0JWhZHJtpJ0XOmQzzorYfXRNd/A8CUx8Xbg57prAS6hK0ESu9kCEessc DA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nhqrth9d2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 22:33:25 -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; Mon, 6 Feb 2023 22:33:22 -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; Mon, 6 Feb 2023 22:33:22 -0800 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id C41503F7043; Mon, 6 Feb 2023 22:33:00 -0800 (PST) From: Ankur Dwivedi To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Ankur Dwivedi Subject: [PATCH v9 0/6] add trace points in ethdev library Date: Tue, 7 Feb 2023 12:02:48 +0530 Message-ID: <20230207063254.401538-1-adwivedi@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230206115810.308574-1-adwivedi@marvell.com> References: <20230206115810.308574-1-adwivedi@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: db4fPNG-DrjfiEfH7diXvAyMRyFffA2T X-Proofpoint-ORIG-GUID: db4fPNG-DrjfiEfH7diXvAyMRyFffA2T 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-06_07,2023-02-06_03,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 This series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files. v9: - Added __rte_eal_trace_generic_blob in lib/eal/version.map file. v8: - Resolved review comments on ethdev patch. - The file rte_ethdev_trace.h and rte_ethdev_trace_fp_burst.h(added in this patch series) is removed. The file ethdev_trace.h is added as an internal header. It contains internal slow path and fastpath tracepoints. The rte_ethdev_trace_fp.h contains public fastpath tracepoints. - In patch (2/6) removed extra call to rte_eth_trace_find_next with RTE_MAX_ETHPORTS. - In patch (2/6), added parent argument in rte_eth_trace_find_next_of(). - In patches (2/6 and 4/6), provided appropriate data type to bit fields in following tracepoints: rte_eth_trace_rx_hairpin_queue_setup, rte_eth_trace_tx_hairpin_queue_setup, rte_eth_trace_link_get_nowait, rte_eth_trace_link_to_str, rte_eth_trace_link_get, rte_flow_trace_pattern_template_create, rte_flow_trace_actions_template_create and rte_flow_trace_action_handle_create. - Tracepoints moved from fastpath to slowpath in ethdev, mtr and tm. - Moved few flow related tracepoints to fastpath as suggested in review comments. - Added const to the pointer parameters in tracepoints. - The following tracepoints are moved to the end of the function to capture return values: rte_eth_trace_link_speed_to_str, rte_flow_trace_conv, rte_mtr_trace_meter_policy_validate, rte_mtr_trace_meter_policy_add, rte_mtr_trace_meter_policy_delete, rte_eth_find_next_sibling and rte_eth_trace_speed_bitflag. - Removed tracepoints from version.map file. - Formatting changes. v7: - Resolves build failure. - Changes in rte_trace_point_emit_blob() function in rte_trace_point.h and rte_trace_point_register.h. v6: - Resolves compilation error with 32 bit build. - Resolves a bug found in v5 in the trace autotest application where the traces where not getting generated after the first blob test case. The trace size needs to be known at trace point register, so a dynamic length array cannot be implemented with current implementation. So changing the metadata of blob to make the array as 64 bytes. The length will denote the blob length(passed by the application). The trailing unused fields will be set to zero if length is less than 64. For example, the following is the ctf metadata created to display a mac addr array in rte_eth_trace_macaddr_get(): struct { ... uint8_t len; uint8_t mac_addr_addr_bytes[64]; }; - Minor changes in the subject of patches (2/6) and (3/6). v5: - The rte_trace_point_emit_char_array function is renamed to rte_trace_point_emit_blob. With this function an array of any length upto 65535 bytes can be captured. For example, the following is the ctf metadata created to display a mac addr array in rte_eth_trace_macaddr_get(): struct { ... uint16_t len; uint8_t mac_addr_addr_bytes[len]; }; - Added additional test cases for rte_eal_trace_generic_blob test case. - Capturing of return value of a function is added to tracepoint for flow, mtr and tm patches. - In ehdev patch (1/6), removed extra line. Also added rx_pkts and tx_pkts pointer in trace point. v4: - Adds tracepoint function to emit char array. Also adds the test case. - Resolved review comments on "ethdev: add trace point" patch. This patch is divided into 2 patches to minimize per patch size. - From the earlier version (v3), few tracepoints in ethdev, flow, mtr, tm are made as fast path tracepoints. For the tracepoint which i was unsure, i have made it as fastpath. All the fast path tracepoints can be found in rte_ethdev_trace_fp.h and rte_ethdev_trace_fp_burst.h. All the slow path tracepoints can be found in rte_ethdev_trace.h. - Capturing of return value is added to tracepoint in ethdev. For flow, mtr and tm these changes are still yet to bde done. Will do it in the next versions. - Moved the trace functions from INTERNAL to EXPERIMENTAL in version.map. v3: - Moved the trace functions from EXPERIMENTAL to INTERNAL in version.map. - Moved trace functions call to the end, in ethdev and flow trace. - Added code to print the input value of features in rte_eth_trace_rx_metadata_negotiate(). - Added code to capture return value in flow trace. Ankur Dwivedi (6): eal: trace: add trace point emit for blob ethdev: add trace points for ethdev (part one) ethdev: add trace points for ethdev (part two) ethdev: add trace points for flow ethdev: add trace points for mtr ethdev: add trace points for tm app/test/test_trace.c | 11 + doc/guides/prog_guide/trace_lib.rst | 12 + lib/eal/common/eal_common_trace_points.c | 2 + lib/eal/include/rte_eal_trace.h | 6 + lib/eal/include/rte_trace_point.h | 31 + lib/eal/include/rte_trace_point_register.h | 9 + lib/eal/version.map | 1 + lib/ethdev/ethdev_private.c | 7 + lib/ethdev/ethdev_trace.h | 2592 ++++++++++++++++++++ lib/ethdev/ethdev_trace_points.c | 717 +++++- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.c | 872 ++++++- lib/ethdev/rte_ethdev_cman.c | 29 +- lib/ethdev/rte_ethdev_trace.h | 95 - lib/ethdev/rte_ethdev_trace_fp.h | 36 + lib/ethdev/rte_flow.c | 356 ++- lib/ethdev/rte_mtr.c | 156 +- lib/ethdev/rte_tm.c | 225 +- 18 files changed, 4794 insertions(+), 365 deletions(-) create mode 100644 lib/ethdev/ethdev_trace.h delete mode 100644 lib/ethdev/rte_ethdev_trace.h -- 2.25.1