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 6961643FB4; Mon, 6 May 2024 13:46:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 485D540A80; Mon, 6 May 2024 13:45:40 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2060.outbound.protection.outlook.com [40.107.96.60]) by mails.dpdk.org (Postfix) with ESMTP id 0430B402F0 for ; Mon, 6 May 2024 13:45:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFQbdnplRluTGl1cF2oNTGJsCqEaADb20tlcu7k25EswLEKu5e0ACkfvdpa95nCPr8gh9gIW/etNlPSlmnsO8FFwTz9MIvBSQNp0/6hNDWmNk0pnPH8XHQvcpZ1jzOFtBiBTs4w/nZz9GOl7zLqFgxY13yYXvG1zHHujQymr0ruZE823aEBEjj90c9H54+ykW6Tvm5mYfeSj8cup/vqpBVFBoo0pGHAmY2hw6RNS3zt2h0v3ykNisO18hv6leGPsjI1ljf+6FBI00FY5Z4DQ/pgovFy/NfZxZzwN2wMtiIK76FqvFLA0fwKduAaYeGjYaDWXHe4uHL3x2v7nKvDZjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=3qUeDZEQqbhLP35Somu7fiF+X6/EWzP96G8lk0L+/uU=; b=WEif7b88hEVSrMxbG3Uds1nTpxt9OraFL9/6BklftG3XlappaSf6wH0a1U8h+ZcLlwW9NFhQ1zJ9ckvxtK1sVdqGHPM40HRsHR5AsTleoMkTZ3DwIAJyX1fevZwN1eksb3+Ss+s3PQi2CBq+bed27qhS/34/5FWk9z/bZ+y2k2CHnizQor969iTIsqjvdpjkHEeN6lTU2cN3QIIMYZy7vGiJA0DoJvqnq/HCOEX8qjoNcH3p+yv7MyVrZyDwdl5an26MKaTk5nIWK4ZtMf+jEndHYk50u8fSwjqk0opSbeg2Gg44nZ3SqU9cX1rSG1nQLKyZIAZyMt0KSYiXZ6D/mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=monjalon.net 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=3qUeDZEQqbhLP35Somu7fiF+X6/EWzP96G8lk0L+/uU=; b=AmuhC4Sg2sXv7OabUdRG1NEtmuNlaOmQST5boJ6i5m6QsgQcY1ADKlF84VCLEbUKgsSO8/DkFfcR8i2zDzY6axDNxk067PorKRS4nZ8nrlArDNpT4INe7CaXFxUrdzbR/vO/G1BlJbHM1SE4SskeNt7BXErmXBI6Yb7RSqwrJ3fgKnXfruJRIyWkVrYcODlnGqSPeWm6Dl5JU/0BYz8iop0txCzuD8+nK4Lx71NEI5sHASOk+QcnAdgnH0VUwLZ7NoutSbp7EWUUWdwN20deRZlIYE+P3efAOFzz53bjvv7UekfnWPfaNxdQjRybRAH61LAqdQH//Lv+JQ3wpF4niA== Received: from BN9PR03CA0070.namprd03.prod.outlook.com (2603:10b6:408:fc::15) by MN2PR12MB4062.namprd12.prod.outlook.com (2603:10b6:208:1d0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Mon, 6 May 2024 11:45:36 +0000 Received: from BN3PEPF0000B374.namprd21.prod.outlook.com (2603:10b6:408:fc:cafe::8f) by BN9PR03CA0070.outlook.office365.com (2603:10b6:408:fc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42 via Frontend Transport; Mon, 6 May 2024 11:45:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BN3PEPF0000B374.mail.protection.outlook.com (10.167.243.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.0 via Frontend Transport; Mon, 6 May 2024 11:45:36 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 6 May 2024 04:45:19 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 6 May 2024 04:45:19 -0700 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Mon, 6 May 2024 04:45:16 -0700 From: Itamar Gozlan To: , , , , , , , Dariusz Sosnowski , Ori Kam , Matan Azrad CC: Subject: [v2 15/16] net/mlx5/hws: dump action ste arrays info Date: Mon, 6 May 2024 14:44:18 +0300 Message-ID: <20240506114419.966498-15-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240506114419.966498-1-igozlan@nvidia.com> References: <20240314114220.203241-1-igozlan@nvidia.com> <20240506114419.966498-1-igozlan@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B374:EE_|MN2PR12MB4062:EE_ X-MS-Office365-Filtering-Correlation-Id: ca1ed3f8-90fa-41de-34d1-08dc6dc20b65 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:13230031|1800799015|376005|36860700004|82310400017|921011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?asHVs8jclkZ0USksN6u4q2OsoelbEcDmbGFuryC2Br9I8auhS9fO1aa1QuMy?= =?us-ascii?Q?R05qYiAnJOdAapnJPaqClW+q3sZjB5sp2guqM4nJtW/r7FulvX42brPVYRwP?= =?us-ascii?Q?bakHxxaICb9DLyhFcvNZF7rIG62CkRKt0P/8Wr1otJqNi58koMnAiwn3IXlo?= =?us-ascii?Q?5UDyn8zdBXybkmhHw2BL4NreVYekEgeGy3CZSY0RVAIXeGI4tUjZRFq7sIVF?= =?us-ascii?Q?xmoHvdpAdY/fBDVYtiLRMkPHSuUjvoWPoEUv9Cp8dmMdkt9NSMuxVEmr2lj0?= =?us-ascii?Q?H1VOHOhV84GRE2TWX45JpFO7obFIy963NogefVt+TOcmIbBL4jHakd68o6ij?= =?us-ascii?Q?AF8pfk7b2AhPFyqlhjX5dkdiuiSBfASSQQrgJw6NF1D9tj/wXT9Cw7cGD4wr?= =?us-ascii?Q?p9YZKpOBBDveGUoQPvIReX9ZqWj2VNNUEv06hPEkjsxQYThSlvhKwg54kr21?= =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bJloLRmcotjr5ACxK?= =?us-ascii?Q?OFgdmCGX96ekRY+OWmzjpiDwKwDz?= X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(1800799015)(376005)(36860700004)(82310400017)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 11:45:36.0157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ca1ed3f8-90fa-41de-34d1-08dc6dc20b65 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B374.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4062 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 From: Hamdan Igbaria Dump action ste arrays info for resizing matchers. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_debug.c | 23 +++++++++++++++++++++++ drivers/net/mlx5/hws/mlx5dr_debug.h | 1 + drivers/net/mlx5/hws/mlx5dr_matcher.c | 1 + drivers/net/mlx5/hws/mlx5dr_matcher.h | 1 + 4 files changed, 26 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_debug.c b/drivers/net/mlx5/hws/mlx5dr_debug.c index 8f07c7fd66..5ad4ca2da5 100644 --- a/drivers/net/mlx5/hws/mlx5dr_debug.c +++ b/drivers/net/mlx5/hws/mlx5dr_debug.c @@ -206,6 +206,7 @@ static int mlx5dr_debug_dump_matcher(FILE *f, struct mlx5dr_matcher *matcher) bool is_shared = mlx5dr_context_shared_gvmi_used(matcher->tbl->ctx); bool is_root = matcher->tbl->level == MLX5DR_ROOT_LEVEL; enum mlx5dr_table_type tbl_type = matcher->tbl->type; + struct mlx5dr_matcher_resize_data *resize_data; struct mlx5dr_cmd_ft_query_attr ft_attr = {0}; struct mlx5dr_devx_obj *ste_0, *ste_1 = NULL; struct mlx5dr_pool_chunk *ste; @@ -288,6 +289,28 @@ static int mlx5dr_debug_dump_matcher(FILE *f, struct mlx5dr_matcher *matcher) if (ret) return ret; + LIST_FOREACH(resize_data, &matcher->resize_data, next) { + ste = &resize_data->ste; + ste_pool = resize_data->action_ste_pool; + if (ste_pool) { + ste_0 = mlx5dr_pool_chunk_get_base_devx_obj(ste_pool, ste); + if (tbl_type == MLX5DR_TABLE_TYPE_FDB) + ste_1 = mlx5dr_pool_chunk_get_base_devx_obj_mirror(ste_pool, ste); + } else { + ste_0 = NULL; + ste_1 = NULL; + } + ret = fprintf(f, "%d,0x%" PRIx64 ",%d,%d,%d,%d\n", + MLX5DR_DEBUG_RES_TYPE_MATCHER_RESIZABLE_ACTION_ARRAY, + (uint64_t)(uintptr_t)matcher, + resize_data->action_ste_rtc_0 ? resize_data->action_ste_rtc_0->id : 0, + ste_0 ? (int)ste_0->id : -1, + resize_data->action_ste_rtc_1 ? resize_data->action_ste_rtc_1->id : 0, + ste_1 ? (int)ste_1->id : -1); + if (ret < 0) + return ret; + } + return 0; out_err: diff --git a/drivers/net/mlx5/hws/mlx5dr_debug.h b/drivers/net/mlx5/hws/mlx5dr_debug.h index a89a6a0b1d..b69002b5cd 100644 --- a/drivers/net/mlx5/hws/mlx5dr_debug.h +++ b/drivers/net/mlx5/hws/mlx5dr_debug.h @@ -25,6 +25,7 @@ enum mlx5dr_debug_res_type { MLX5DR_DEBUG_RES_TYPE_MATCHER_TEMPLATE_HASH_DEFINER = 4205, MLX5DR_DEBUG_RES_TYPE_MATCHER_TEMPLATE_RANGE_DEFINER = 4206, MLX5DR_DEBUG_RES_TYPE_MATCHER_TEMPLATE_COMPARE_MATCH_DEFINER = 4207, + MLX5DR_DEBUG_RES_TYPE_MATCHER_RESIZABLE_ACTION_ARRAY = 4208, }; static inline uint64_t diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c index 78d525e578..8f1a202f81 100644 --- a/drivers/net/mlx5/hws/mlx5dr_matcher.c +++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c @@ -724,6 +724,7 @@ mlx5dr_matcher_resize_init(struct mlx5dr_matcher *src_matcher) return rte_errno; } + resize_data->ste = src_matcher->action_ste.ste; resize_data->stc = src_matcher->action_ste.stc; resize_data->action_ste_rtc_0 = src_matcher->action_ste.rtc_0; resize_data->action_ste_rtc_1 = src_matcher->action_ste.rtc_1; diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.h b/drivers/net/mlx5/hws/mlx5dr_matcher.h index 6dc3bf4d0d..caff403a38 100644 --- a/drivers/net/mlx5/hws/mlx5dr_matcher.h +++ b/drivers/net/mlx5/hws/mlx5dr_matcher.h @@ -62,6 +62,7 @@ struct mlx5dr_matcher_action_ste { }; struct mlx5dr_matcher_resize_data { + struct mlx5dr_pool_chunk ste; struct mlx5dr_pool_chunk stc; struct mlx5dr_devx_obj *action_ste_rtc_0; struct mlx5dr_devx_obj *action_ste_rtc_1; -- 2.39.3