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 AF9EE45952; Tue, 10 Sep 2024 09:59:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A871427A7; Tue, 10 Sep 2024 09:59:40 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2088.outbound.protection.outlook.com [40.107.212.88]) by mails.dpdk.org (Postfix) with ESMTP id 593DA4021F for ; Tue, 10 Sep 2024 09:59:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HyV9m1137aTusX6jUEWAghRrmV0qmUVTDoEIYwWkGe/zNKES/JsJ4/RuEtMRfeUn0fg3hCBLpB0AukYSgzjqbWIn85UujLBIMf8v3HneIwsxPEvC8BajyBlaVyWfPBnGlkCmcZ0XBH+L7fBoPt8Sc8jQmiJqkFICmr9oOAkUYsOd/f5ayvHqO00QVDHjvny4Wgz1CV1G52E3UCXVyjTnhF+QZ4bYzlp6dg8lBpnZ6ixWB21ljcUaVLPQankmKi3nmMi+02Qt0Y/1LQB6mtm8wPU5FPvBZf+/9XEp2uHwZsb0L3/FV/pZaTGvevLwJD/Xs35bMNa7X+iw9bw14OpoJg== 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=+Ds6GB8U3oA2nxPR6j332HuRHAHgh9+OUuxzXVGroHU=; b=TdCGrchClkku6yM/9nfAmYKrRulsiAMJnjKylQQAPeXogtbUenq2M1fD5xItSkIQR8SSFFjU6awE//l1WLw8BiGkQcymEE1OixyTHxI/X+dlkRmX4T084tAWjXU5Ejuya1zW0ODhPeF+0qbsOc/5OeGFtsiE4mq0bleMKzocsIEyCq0ArAumZWqP9hje72v+O2ohcOwul6BYx/YK4Sh8H9GE59WbsUm3wFoNbjosHA3BcFF1SPU2jp09LhPDxMbRCBf76oeQy3ireLqLn1r3ZJAdoVVAHjwJ/YVJ20Tv/xAGpnxlrOF3ZuCMwZ9rbV0YN6Vj0j35/tdcrCvsFRHPcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=+Ds6GB8U3oA2nxPR6j332HuRHAHgh9+OUuxzXVGroHU=; b=MSDlisc1h2+VJ7EKySgh6VPIZfrWdV2vvxfCgS4iyzBjLcKo2QrJjvKvh323pEkEq0fWowV8SSe41rwWhAwF80tr1epJBDxrQN7WxnV1fajmUpzbRxec1NzVxCjFhMbHqMQegLa9690HPd9RJzWq3lVmgRzY3HoWfybWHrDfuBOpu59knDf6XQA+xt8aM/Q4HbkgmLPJS8cxaZ+GCLhpIx+Bimptwbcnh2paboKMXjY+2jYD2eQW9fu9i6iLT21FSCHOZFwvnJOeQHzd3UgYI9k8VVF403XrH3xkEnkAnHWjDFQwinTn9+CfVMYHKl9JLK5+LJ7+mRW+NRsgFQZGCQ== Received: from BL1PR13CA0368.namprd13.prod.outlook.com (2603:10b6:208:2c0::13) by SA1PR12MB6797.namprd12.prod.outlook.com (2603:10b6:806:259::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.20; Tue, 10 Sep 2024 07:59:35 +0000 Received: from BL02EPF0001A0FD.namprd03.prod.outlook.com (2603:10b6:208:2c0:cafe::96) by BL1PR13CA0368.outlook.office365.com (2603:10b6:208:2c0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24 via Frontend Transport; Tue, 10 Sep 2024 07:59:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A0FD.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Tue, 10 Sep 2024 07:59:35 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 10 Sep 2024 00:59:21 -0700 Received: from nvidia.com (10.126.231.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; Tue, 10 Sep 2024 00:59:18 -0700 From: Gavin Li To: , , , , Dariusz Sosnowski , Bing Zhao , Suanming Mou CC: , , "Minggang Li (Gavin)" , Alex Vesker Subject: [PATCH V1 2/3] net/mlx5/hws: add log for failing to create rule in HWS Date: Tue, 10 Sep 2024 10:58:52 +0300 Message-ID: <20240910075853.292823-3-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240910075853.292823-1-gavinl@nvidia.com> References: <20240906102151.171965-4-gavinl@nvidia.com> <20240910075853.292823-1-gavinl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0FD:EE_|SA1PR12MB6797:EE_ X-MS-Office365-Filtering-Correlation-Id: cb20a5fe-a40c-4122-f8de-08dcd16e8304 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|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?RP1xCj9d7nHGE1kIXGndp34FYfnyTl3+oivqWYROpTYzU4Tlh6cazJ2Vhn4w?= =?us-ascii?Q?PXUO5i5utAIB133P0zmPiqjdOUQpTnHjSIHT0wJGMOZAON+AzFochqQc9AMV?= =?us-ascii?Q?YytCTJhBCh6B9KR3t0vAC6Sf+xLKFrhhTFlRwmk4nGCKug5+Q3bys4e2eOgP?= =?us-ascii?Q?P2mW4jJSJzRBuknYmOiff59wp3NaK3D4iyNJcX/NpbEu+gq5wtkRUAFT6mOF?= =?us-ascii?Q?/bAwghxRF7nIirjYRglLwxOkYXQ659Xfb4RdoSEVGs8qqeHkg3gdIHWRnoRM?= =?us-ascii?Q?H5966dJoON8Fc4v41xMid/XAdUgXUwFG3n2j0r08Us6h8U/CZG6aQt0M85LP?= =?us-ascii?Q?J1/LXHZfIcEBJC0HyQEYYU0qX0L1OER8jV6F2jJfFQ76J+bcSd96Lmbbjzb+?= =?us-ascii?Q?+2dmbO7Y8kKVEz0VNH4wZnzr7Dp5aLJ0KxziZsEI1lor1tMVBCSfJanyELkt?= =?us-ascii?Q?dIBFMVNJWaKBi3AO5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?Iu195QUp+vdYgy1kSZ+aSiY3O15kxdaPT/p+x4VM9jbMZ4vWXGOZe8C1xWVH?= =?us-ascii?Q?b2JVkQytkCFIHSXGVqgewXh9eY9doDcE?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2024 07:59:35.2485 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cb20a5fe-a40c-4122-f8de-08dcd16e8304 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A0FD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6797 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: "Minggang Li (Gavin)" Signed-off-by: Gavin Li Acked-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_rule.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c index 1edb7eac74..5d66d81ea5 100644 --- a/drivers/net/mlx5/hws/mlx5dr_rule.c +++ b/drivers/net/mlx5/hws/mlx5dr_rule.c @@ -638,6 +638,7 @@ static int mlx5dr_rule_destroy_hws(struct mlx5dr_rule *rule, /* Rule is not completed yet */ if (rule->status == MLX5DR_RULE_STATUS_CREATING) { + DR_LOG(NOTICE, "Cannot destroy, rule creation still in progress"); rte_errno = EBUSY; return rte_errno; } @@ -806,12 +807,14 @@ static int mlx5dr_rule_enqueue_precheck(struct mlx5dr_rule *rule, struct mlx5dr_context *ctx = rule->matcher->tbl->ctx; if (unlikely(!attr->user_data)) { + DR_LOG(DEBUG, "User data must be provided for rule operations"); rte_errno = EINVAL; return rte_errno; } /* Check if there is room in queue */ if (unlikely(mlx5dr_send_engine_full(&ctx->send_queue[attr->queue_id]))) { + DR_LOG(NOTICE, "No room in queue[%d]", attr->queue_id); rte_errno = EBUSY; return rte_errno; } @@ -823,6 +826,7 @@ static int mlx5dr_rule_enqueue_precheck_move(struct mlx5dr_rule *rule, struct mlx5dr_rule_attr *attr) { if (unlikely(rule->status != MLX5DR_RULE_STATUS_CREATED)) { + DR_LOG(DEBUG, "Cannot move, rule status is invalid"); rte_errno = EINVAL; return rte_errno; } @@ -835,6 +839,7 @@ static int mlx5dr_rule_enqueue_precheck_create(struct mlx5dr_rule *rule, { if (unlikely(mlx5dr_matcher_is_in_resize(rule->matcher))) { /* Matcher in resize - new rules are not allowed */ + DR_LOG(NOTICE, "Resizing in progress, cannot create rule"); rte_errno = EAGAIN; return rte_errno; } @@ -1068,6 +1073,7 @@ int mlx5dr_rule_hash_calculate(struct mlx5dr_matcher *matcher, mlx5dr_table_is_root(matcher->tbl) || matcher->tbl->ctx->caps->access_index_mode == MLX5DR_MATCHER_INSERT_BY_HASH || matcher->tbl->ctx->caps->flow_table_hash_type != MLX5_FLOW_TABLE_HASH_TYPE_CRC32) { + DR_LOG(DEBUG, "Matcher is not supported"); rte_errno = ENOTSUP; return -rte_errno; } -- 2.34.1