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 82B9645BF3 for ; Sun, 27 Oct 2024 14:08:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 461C0402AE; Sun, 27 Oct 2024 14:08:06 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2042.outbound.protection.outlook.com [40.107.243.42]) by mails.dpdk.org (Postfix) with ESMTP id 7480540151; Sun, 27 Oct 2024 14:08:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VIUwaj4wyPJDJ2HSGnsxIhURbyZY/qd2KhIV0t81M8lnB89g1CxDEKi+RxgvMrVAwXZh164i6eXNcKH4ZV5tD6eoQwZoTJgNsvzukOPYIJiN6Z9tpdvDmeONUGc5jjrliaEKuxsjM6NZ0q2YhsxPKfAmE0HYKhhNr8ua48831nXi+BYtyw5JPc62Rcdfc77DtxbUs6pUFL0kUsXwm7B28qJ3jq65oFMeneL5PmCsyE4SXTRZ/8zwSP8JC5S4gCXFiJGCMENWt9MKLsayu2E+bt+bVLCVUX69O8pz1C8xgnbwWpVGIkec+AUP44Zh20eh8UtT6FkXXCDVL3vvgJR6YA== 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=bqP965X7X+Z367Y9nscLxWTqwqnmC78hIVFeqjZGas8=; b=Xum/Xc0DoZIXHEDLvR0MwfXWvCcnNbq4+vxlIuIqqWy/7EplEXgMnJvxV6wB4C+YHoBBi6bjqSSmKCxMIXbl3fpaC+zC1haHi/4QcZjp/ZV79/KS+HBsmjbLbl8pGW8Gndr1575zq7WeTwAgEsp9xnVrFWGL1j7JasBI/n3we+iQWfwhKMJnhpTckIfDxpeHXMTCVWzAEnBE4rO4zboJY4CwazS6n9D334u5QELjtURaWjIQ6YLP9jaZlb18vNa6OYnzYTziVEvyHtGeOiNzluSmVv0ujxOqNpq6ZvMUAKWhHLunNpGk6gOm3fG3BxVZ9hiGB4hSn4SzNhxZ1wqitg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=bqP965X7X+Z367Y9nscLxWTqwqnmC78hIVFeqjZGas8=; b=HLRvnpq2e3025fnUQxihiF5iJoTjJvHabbdYkaGTrZwv4b/q66xdlnG9FCKHfDXOF9XVSbMrNmj8AcnunJ/3V4n027Mhdbkq1ag1yDHQ37uK2Kou9Pbavcl/HqNM9e+5qJAQUN+hp+gz2bHcYB2DxWMeJkLH7cJNT6UGacEeu/luIMe5GPNOklGIMg4jHBgurKUDYcRT3WRjADogXEagTDXoRkMrhbXN/SO3jwHZTdyzVDaKPVLA+kHTYdPZhBUkq77fRF687xn1hWM5etoLzRPSPqJIfIPsWgjk9F/e6mKz4Dwm2OFjgfi32JwINAqpblEjKauDaGiUMTzXbh56ew== Received: from BY5PR04CA0003.namprd04.prod.outlook.com (2603:10b6:a03:1d0::13) by SJ2PR12MB7992.namprd12.prod.outlook.com (2603:10b6:a03:4c3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Sun, 27 Oct 2024 13:08:00 +0000 Received: from CO1PEPF000075F2.namprd03.prod.outlook.com (2603:10b6:a03:1d0:cafe::76) by BY5PR04CA0003.outlook.office365.com (2603:10b6:a03:1d0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.21 via Frontend Transport; Sun, 27 Oct 2024 13:08:00 +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 CO1PEPF000075F2.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.14 via Frontend Transport; Sun, 27 Oct 2024 13:08:00 +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; Sun, 27 Oct 2024 06:07:43 -0700 Received: from nvidia.com (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; Sun, 27 Oct 2024 06:07:39 -0700 From: Gregory Etelson To: CC: , =?UTF-8?q?=C2=A0?= , , , Dariusz Sosnowski , Viacheslav Ovsiienko , "Bing Zhao" , Ori Kam , Suanming Mou , Matan Azrad , Alex Vesker Subject: [PATCH] net/mlx5/hws: fix range definer error recovery Date: Sun, 27 Oct 2024 15:07:23 +0200 Message-ID: <20241027130724.118001-1-getelson@nvidia.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: CO1PEPF000075F2:EE_|SJ2PR12MB7992:EE_ X-MS-Office365-Filtering-Correlation-Id: 48f620e4-e06c-4374-8ab3-08dcf6886229 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?BIXw1KFDQRPDMIBH18gCe6VcK4wel8BhnpTD1tKpbl/AMUxhBaLCvGAi43Md?= =?us-ascii?Q?rGKketifFQLsyFWBFkuKVhaYgmK+Uqsx/0UxACDpMwPiDXT5qqbS5xTpf27I?= =?us-ascii?Q?32IYG9i4fuFD6raEvgWrFJjoAbRTWatdVj0e804OQipfdpcmIM14V21fU9ZS?= =?us-ascii?Q?NngIVJHjEfeisI64AcGF1zmQMFAzXSTmPULq38chs8/I7Aohiba2pE7y3t4Z?= =?us-ascii?Q?hSywgXF9NcjvtdcPsgDAwFNGSFSM+ADqJe4OzzULdUwD5md8ktohg1sTnyP4?= =?us-ascii?Q?FgNI6uLcnAPzs1wBv2JsT0+uvMvL87vkOHoVLX61ahCbKJbmXLqib4mU9y96?= =?us-ascii?Q?jLFXrsDaLMZPzqx5lIjkaQSO2dyaTQQoa0B/JPS5Q0I2NFTelr/YZ4ZgndSk?= =?us-ascii?Q?a2nBr0K1CL9okVN1p8VSYquEPufDkSO/EvZw537g3JPT+XaR3s5FZ3cCrD/K?= =?us-ascii?Q?BKLuLbVdpjwKbcK6oQFU0LWAjI9pmhqbna6uk5VdEWVBcxl78lP7gIDZ/ObF?= =?us-ascii?Q?dg2dvt2fvb05FFqfnXagd6rC4z8jOGAyPe5gN9Q4y7AKc7oLQyUOzM/HdhIk?= =?us-ascii?Q?tHwy90qo6aa5JtPEwjhlcVBpx5sI4XIbtyteZZBVpnbksozU4rLooiKvqrYi?= =?us-ascii?Q?3JAdLvCJQGo6UYOcKs/zHe1dnXWbQ8LBmfzsYqlUlHH8sX0vdRNfBldsf1+l?= =?us-ascii?Q?eOiG1OTBMzoc+j9tvm/Tf0bEcfk3as08mU7I4nOcRuBrog4ju458Ub3yOv7n?= =?us-ascii?Q?Kmd7727kPMLtcqvpmJUkGs1XUppXTOegldx7FnOWIqlazTuiFV6vzpTnLwBK?= =?us-ascii?Q?DpjdRsw62wlJyaetYaG7HlEsrPSVenFgu7jGM5o8sFYbyR1K91MxKSY0mV3T?= =?us-ascii?Q?vTtYhpa4LNPUXNhpvQ7eG5laO7Nc5wQCjj0hetuaMqfbrbYitjTJvK5L7ndM?= =?us-ascii?Q?PrlGBPDq3yzzQF1ui9ZKi8pfEtkxsVaQyQMLCkFVLBy97+mhz6FBNLz095vM?= =?us-ascii?Q?Mm84N0zPJYYGWfWpn9p/TQLpxWBrAnzmDMnVwipa4N1hSc0LCGsW8StJvtuo?= =?us-ascii?Q?72KeGkX70+cntyamCbocaJSP8itHDTXpmXW4o2B02PNnFTwfF8Cw+9kzBof9?= =?us-ascii?Q?77sayHrQttqmp45xnGVy4cHlnFq3DwUVypL5R9i45nsKQ5COC+nLQ7J40PO8?= =?us-ascii?Q?+8fdW2PejwRQAN6sX9uI/+U6qsvBmAXE8tm5UP/FIQzI4fPjeqBBZFxoadWo?= =?us-ascii?Q?9gBIGjMKIJSBudxKoryzXqVPklurXia5tBf2hsdOWw5m4IH9Ilqsn2HywRFn?= =?us-ascii?Q?GVQLlmDM/YcEWVQocOxgqAEFR7tQ8mULzm5lHacEfuCcYADagD1d08piPIpK?= =?us-ascii?Q?ylOQW9fdKi3fnaIfVbi6f16qKlngDOjQ/NJjiYXSSFc14UHWGA=3D=3D?= 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)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2024 13:08:00.1236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 48f620e4-e06c-4374-8ab3-08dcf6886229 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: CO1PEPF000075F2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7992 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org PMD did not assign rte_errno value after it discovered an error in matcher range parameters. As a result, the calling function was not notified about the fault. The patch assigns EINVAL to rte_errno if matcher range definition was invalid. Fixes: 9732ffe13bd6 ("net/mlx5/hws: add range definer creation") Cc: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/hws/mlx5dr_definer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c index a9fa5d06ed..fd0a9b15d8 100644 --- a/drivers/net/mlx5/hws/mlx5dr_definer.c +++ b/drivers/net/mlx5/hws/mlx5dr_definer.c @@ -4056,6 +4056,7 @@ mlx5dr_definer_matcher_range_init(struct mlx5dr_context *ctx, if (i && ((is_range && !has_range) || (!is_range && has_range))) { DR_LOG(ERR, "Using range and non range templates is not allowed"); + rte_errno = EINVAL; goto free_definers; } -- 2.43.0