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 010A945A2C; Wed, 25 Sep 2024 20:07:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A88BA40664; Wed, 25 Sep 2024 20:06:29 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2041.outbound.protection.outlook.com [40.107.220.41]) by mails.dpdk.org (Postfix) with ESMTP id F0B6B40653 for ; Wed, 25 Sep 2024 20:06:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XHRcuoY9Sn5a2ym97HH+gpiPnvThRee2cEJNK9qM+Q/2MwP62ac5tn7vt9p/V63OV1ecj079acmo7NTPrrYF57/vd8k71eFkc+a5tRYaHXsy1f+OPlgR7rcvWnhwfWiCYF2FGNu7PEPnysQhQVfJE2KW+jsemiw9VzOJWGylQW359aZcY0Fk1hsNZ8K7SttGzhiyO+vHMKRHmHPntyyivSi5BvwZjCxaORW+eEot6jxnxkKaE/vU00vhFMORqAVKmt6OUxiSxH0kuglkV5OoKOB7AAwdRYB0LIIJFz20wR+VrIQCifrM7UzEetx1IKAQSAla6Vb82ZEyTz0nopofag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/6OiznI4p4/XPvsYVEHqLOmQZxF9f3B4pIHtKMbMCX8=; b=NdfNUTax+AOsrMdJsmjJutI2G3aonXK1AUkWvJtKhXf1q3oDI/rSJvlpbyoA5cDJhCCJ+r8qOUeNU+fsHFcvULZkrSBF+T3CDgmoaaWbrDSCES+xN2TFREes6k/ztKJhrjLcYqgwPNp6TPLzQyZ6/DSfHQ3Wzg6bRDPuPRA6dFmKaFHIuQxo6DjNdrXl/1fbqtqdmxRyg/L0RBjW04cV+5FNTVOJv6WWLAeBwXbqBmALj7rFEe4biM0FTH1TjxuRix3zTcA+yt9uc2n9jSCx1Ui6Y/XZm+/XvgS3rQQGIsr3SQ4tWtJmgWnSEoF1Lq91tbOfhza/VbEDyY2opCkKDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/6OiznI4p4/XPvsYVEHqLOmQZxF9f3B4pIHtKMbMCX8=; b=NZ05T8EMdty7N/aB69ICw5GVMPY6kKq2ktTkuXq2CJGDDuY64HcS0JKG3pL/v5LlB3s7IxNor6pUbytLbCzkt7jr/OUcPa3ArRKrh187XLswtjXSGMNtI4lft6KvBHrsr8MZZly8/lOV8jR2zYc5bin4mc9LjS1UjSy8WoZeJBPrr6MjR+A9EZpdP29TDGCoFXjHetKVajSjoHfShj93uQiM5jfVGui3qSnXCFV2dxmyntt0T/8pvOs1DkT4JzXHyD6Eoui8qhV9CssSvEWZQ9pGuVfbEfj2PwZ+7gyGwScwyUz9d4QeiJ9wq06Q/97tIgIpmkDVhxh/QhJT53wwnw== Received: from BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) by SN7PR12MB7249.namprd12.prod.outlook.com (2603:10b6:806:2a9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.28; Wed, 25 Sep 2024 18:06:23 +0000 Received: from CO1PEPF000075EE.namprd03.prod.outlook.com (2603:10b6:a03:117:cafe::8a) by BYAPR08CA0051.outlook.office365.com (2603:10b6:a03:117::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.28 via Frontend Transport; Wed, 25 Sep 2024 18:06:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000075EE.mail.protection.outlook.com (10.167.249.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:23 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 25 Sep 2024 11:06:07 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 25 Sep 2024 11:06:05 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 7/7] ethdev: add trace points to flow insertion by index Date: Wed, 25 Sep 2024 21:05:32 +0300 Message-ID: <20240925180532.3958656-8-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075EE:EE_|SN7PR12MB7249:EE_ X-MS-Office365-Filtering-Correlation-Id: a2c705cd-94c8-43a0-b8e0-08dcdd8cc3e3 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?1p4Yc2mFSBQ0mB6Mzl9MPKah+CJTgchq8qTNn1iqJCFVvGoNuDnqwYkWZ66x?= =?us-ascii?Q?j/6RTGcGQwOEbg9KUZf/wn9k2oRbRl0Igkgzrl7FQlNZtRdSM/RwrGrLap58?= =?us-ascii?Q?j+dZpHjEV6GMpAJQx0WbBjhXfrsYGutOwo2oCIYiN2kxidvsa5dx8tDB9h2T?= =?us-ascii?Q?XRacUfTL6dh6xaCblcKCnT1CdcNkWokVjtQiwvk4unmJZqsWqaPZqrWXQYF4?= =?us-ascii?Q?9L6k7yI5br/t2UunIsgK4yEC5Y5WXLkFEJ/yI+v46q559U7Maru2xMZn3elk?= =?us-ascii?Q?ehJQWZJEluxrswDHs4/gciS6FaUg2R86P11prlogcdX0K3uCLbKF19JRYSm8?= =?us-ascii?Q?ZSTBkGNVdNq5/FI7Qqc5NZMcz/g0xXDW3WxYcdbZMSeh+gj/fUq7csIgEQSX?= =?us-ascii?Q?n0cZdFi125kNyUVsvGD8PJXwoh0sv2gWojhRlF+Oo19nmu7zGJn6pB/ChnAv?= =?us-ascii?Q?aUiGxy1jDDIIH354sXeI6nzY176g5PReieeioWV9Xu1zbkhymY/ui8MJ+uWF?= =?us-ascii?Q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5bUCuZRICbxy53jfVrPqN10oxUnNo?= =?us-ascii?Q?zGRgs7Xh1UsHm0TKCDH9kMv0MuaHbc29?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:23.0627 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2c705cd-94c8-43a0-b8e0-08dcdd8cc3e3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000075EE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7249 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_flow rule insertion by index functions: rte_flow_async_create_by_index and rte_flow_async_create_by_index_with_pattern. Signed-off-by: Alexander Kozyrev --- lib/ethdev/ethdev_trace.h | 44 ++++++++++++++++++++++++++++++++ lib/ethdev/ethdev_trace_points.c | 6 +++++ lib/ethdev/rte_flow.c | 18 +++++++++++-- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/lib/ethdev/ethdev_trace.h b/lib/ethdev/ethdev_trace.h index 3bec87bfdb..910bedbebd 100644 --- a/lib/ethdev/ethdev_trace.h +++ b/lib/ethdev/ethdev_trace.h @@ -2343,6 +2343,50 @@ RTE_TRACE_POINT_FP( rte_trace_point_emit_ptr(flow); ) +RTE_TRACE_POINT_FP( + rte_flow_trace_async_create_by_index, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t queue_id, + const struct rte_flow_op_attr *op_attr, + const struct rte_flow_template_table *template_table, + uint32_t rule_index, + const struct rte_flow_action *actions, + uint8_t actions_template_index, + const void *user_data, const struct rte_flow *flow), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(queue_id); + rte_trace_point_emit_ptr(op_attr); + rte_trace_point_emit_ptr(template_table); + rte_trace_point_emit_u32(rule_index); + rte_trace_point_emit_ptr(actions); + rte_trace_point_emit_u8(actions_template_index); + rte_trace_point_emit_ptr(user_data); + rte_trace_point_emit_ptr(flow); +) + +RTE_TRACE_POINT_FP( + rte_flow_trace_async_create_by_index_with_pattern, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t queue_id, + const struct rte_flow_op_attr *op_attr, + const struct rte_flow_template_table *template_table, + uint32_t rule_index, + const struct rte_flow_item *pattern, + uint8_t pattern_template_index, + const struct rte_flow_action *actions, + uint8_t actions_template_index, + const void *user_data, const struct rte_flow *flow), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(queue_id); + rte_trace_point_emit_ptr(op_attr); + rte_trace_point_emit_ptr(template_table); + rte_trace_point_emit_u32(rule_index); + rte_trace_point_emit_ptr(pattern); + rte_trace_point_emit_u8(pattern_template_index); + rte_trace_point_emit_ptr(actions); + rte_trace_point_emit_u8(actions_template_index); + rte_trace_point_emit_ptr(user_data); + rte_trace_point_emit_ptr(flow); +) + RTE_TRACE_POINT_FP( rte_flow_trace_async_destroy, RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t queue_id, diff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c index 6ecbee289b..902e4f7533 100644 --- a/lib/ethdev/ethdev_trace_points.c +++ b/lib/ethdev/ethdev_trace_points.c @@ -589,6 +589,12 @@ RTE_TRACE_POINT_REGISTER(rte_flow_trace_template_table_destroy, RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_create, lib.ethdev.flow.async_create) +RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_create_by_index, + lib.ethdev.flow.async_create_by_index) + +RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_create_by_index_with_pattern, + lib.ethdev.flow.async_create_by_index_with_pattern) + RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_destroy, lib.ethdev.flow.async_destroy) diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index a56391b156..4a7735b5ab 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -2090,6 +2090,7 @@ rte_flow_async_create_by_index(uint16_t port_id, struct rte_flow_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + struct rte_flow *flow; #ifdef RTE_FLOW_DEBUG if (!rte_eth_dev_is_valid_port(port_id)) { @@ -2104,10 +2105,15 @@ rte_flow_async_create_by_index(uint16_t port_id, } #endif - return dev->flow_fp_ops->async_create_by_index(dev, queue_id, + flow = dev->flow_fp_ops->async_create_by_index(dev, queue_id, op_attr, template_table, rule_index, actions, actions_template_index, user_data, error); + + rte_flow_trace_async_create_by_index(port_id, queue_id, op_attr, template_table, rule_index, + actions, actions_template_index, user_data, flow); + + return flow; } struct rte_flow * @@ -2124,6 +2130,7 @@ rte_flow_async_create_by_index_with_pattern(uint16_t port_id, struct rte_flow_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + struct rte_flow *flow; #ifdef RTE_FLOW_DEBUG if (!rte_eth_dev_is_valid_port(port_id)) { @@ -2139,11 +2146,18 @@ rte_flow_async_create_by_index_with_pattern(uint16_t port_id, } #endif - return dev->flow_fp_ops->async_create_by_index_with_pattern(dev, queue_id, op_attr, + flow = dev->flow_fp_ops->async_create_by_index_with_pattern(dev, queue_id, op_attr, template_table, rule_index, pattern, pattern_template_index, actions, actions_template_index, user_data, error); + + rte_flow_trace_async_create_by_index_with_pattern(port_id, queue_id, op_attr, + template_table, rule_index, pattern, + pattern_template_index, actions, + actions_template_index, user_data, flow); + + return flow; } int -- 2.18.2