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 5E97A41DE6 for ; Mon, 6 Mar 2023 12:04:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33EA940E50; Mon, 6 Mar 2023 12:04:48 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2046.outbound.protection.outlook.com [40.107.212.46]) by mails.dpdk.org (Postfix) with ESMTP id AAE3940A8A for ; Mon, 6 Mar 2023 12:04:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K4ZYv+hYcOwRQCudeKsXZXr4ElGZ+5gw7Zf2PcJ/LyqIOHuAcHWeHUcqXiGWxoapFeUDLuZvswuR7cpUSRoKrvjS2XB2ydlUrXFcQrKXN6+r+cft+t96fNBjNAKUW502LxiTN9FkahDZ9jyVgR/+hQzxrzNiRch/WAWqaazlOCcqYu6HolenLVBiL8BOKHAVTVSTVPEkf41VhJUMTJ0xfzhjUBBYtyXp3empTzyt4s5MTy5PIewiWRWeDUBdsNITsIBcN8ewrMWengJxw/TBnM+hMKCu6onbl8MWmw9Z0erCDnm4FOSIR/mUB+pw+zDbCymC2TPtebeBoSOA7pQLwQ== 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=XZNJn2+4D2uFwoQtfnqFLDBoF6SgeDXiBJ4sMUXksgU=; b=XTkTMaoNLowXCvbPF6lgIfxiFNvHpsdvDKt8O86+nYZ8I6nQwxkrWU/hjT4AwIf98EsqN7QAvTmEdxZuvzDVhg/o4bIuMMZ/8BaMnz+fGTBtuYS+itIfR+Au+qcUd6TVpG1WtIHgA9F6bmh4OmsEQdKIqt/F7/0otqlR30cH148mlVtIJmhMlp/PvRrG3zAjHeIr8It+XblzTcE6BuwLk289zK37ryV8xsgD33OWFx8m3xa7/N7Uv1tBZyJVmtOIUFe+0wjo81Wg+hwaJuUOve2mI9bfp6+aa2a3U+uRzIPb84Lq3eJhHcp0EWj42qMOSRVSHhRpntv+f0YpYg2i2g== 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 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=XZNJn2+4D2uFwoQtfnqFLDBoF6SgeDXiBJ4sMUXksgU=; b=ZlJj1ogdC/znGJE2QEBWtjFaJhwj1nfwYq34fT11DnsTSvXUuQSMioNdjxIAdmBDJqEkpWMsFlnw8XuDza3CA5hlz8CLXJuie1H8M1bwgrNk4L/B3N97OEIUAMHyvZH2nPUjShp49rCDoCHqhe1rK6C8EosFphwiQSt32UHHDuCjeBaBbpkSpv/FesKyGZBdVCOlpLy18bq6F30D23AaFXcETBEbVHR2zQESdR/d0S3+4qVHtZbGunbyJ7Ml19diTRzbge8f1nLRo5wHinu8NYn9xT5O49YwV487tj26G00+iowgwZ3aKiCU4OXURYLWmcWZmwc/buYhnINGnvXS4Q== Received: from CY5PR19CA0083.namprd19.prod.outlook.com (2603:10b6:930:69::21) by SJ0PR12MB6832.namprd12.prod.outlook.com (2603:10b6:a03:47e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.27; Mon, 6 Mar 2023 11:04:44 +0000 Received: from CY4PEPF0000C97F.namprd02.prod.outlook.com (2603:10b6:930:69:cafe::3a) by CY5PR19CA0083.outlook.office365.com (2603:10b6:930:69::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28 via Frontend Transport; Mon, 6 Mar 2023 11:04:44 +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 CY4PEPF0000C97F.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.13 via Frontend Transport; Mon, 6 Mar 2023 11:04:44 +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.986.5; Mon, 6 Mar 2023 03:04:33 -0800 Received: from nvidia.com (10.126.230.37) 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.986.37; Mon, 6 Mar 2023 03:04:31 -0800 From: Rongwei Liu To: , , , , Suanming Mou CC: , Subject: [PATCH 22.11] net/mlx5: fix crash on action template failure Date: Mon, 6 Mar 2023 13:04:19 +0200 Message-ID: <20230306110419.2262250-1-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <32273080.6xKfjbll68@thomas> References: <32273080.6xKfjbll68@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C97F:EE_|SJ0PR12MB6832:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ed012e3-586c-4b9b-46f3-08db1e329789 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; X-Microsoft-Antispam-Message-Info: T0knFyoU53aeBLsN4q0qQ45OBEHcB+g2w5c+r7fhI+I2ULS+kBLrBPl2ABsvAgVrrtKjVJGOrR2bxUvLa+Dbztkbinz1SvQjLs1z7vxg1vHwVyOP0WaLhtt52eqJBFvUBvAKF7opXAHDKtwUurvNi/ygC/SP5wPT2mYWFb+SANPlRCA0pH16Bbbvv/EN0pMEb8Y4VsevOdA1XxQS13Z7DjiMBc7mrC4Uy5oiPWq7ijHYJyrf4Ad+z16awMBXCTlJRx/Xa5kXpK0KdquGjRtRuFxL27+qHbVOUgzQTRgVATUDfBCtHaBFfaZ9RH6t0BxOdsuMvG5DDNVORrOqv+ZJtXaZudhYJh8AbMTKuO2x8cnXMga/8r53xo3A2Bx9r/KCwurcR+byGrEXrsU5zhchY4UDU/Ah8O6r2dl91CKROevve4zEluZGwh77xKi1aZj3W1G8VLDZ0jNjZpT9WG9GrBF5O5aaAaZ3fApEBjGYf/XsR+owL+6ij67w7LWin6G2Pyje8l9hEZQknkp/Ecqj0sQSpGWGQEoRZGmOggfusF75SSTZxj6+3whE+zWPX7oUANlODsloTwxi04ocJ96eSNpDAk15BUm7QHfJ1LR5bD7hA3xafumFLj2Q9BXO19FbYjPrOcMCsmN80F0KGIL1Yp1VlPxCkin7Ul1dZ1vYm+AR4ZqhxGFjNpoxxRtOp0RBpWikpCf9QwYRF//VVFrRww== 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:(13230025)(4636009)(376002)(39860400002)(396003)(136003)(346002)(451199018)(40470700004)(46966006)(36840700001)(1076003)(47076005)(107886003)(6666004)(36860700001)(36756003)(426003)(40460700003)(82310400005)(356005)(55016003)(83380400001)(86362001)(40480700001)(82740400003)(186003)(336012)(16526019)(6286002)(7636003)(2616005)(26005)(41300700001)(70586007)(70206006)(8676002)(4326008)(2906002)(8936002)(4744005)(5660300002)(478600001)(7696005)(316002)(110136005)(54906003)(6636002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2023 11:04:44.1055 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ed012e3-586c-4b9b-46f3-08db1e329789 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: CY4PEPF0000C97F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6832 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 When action template creation fails the testpmd expects error details. The driver did not set the error structure and testpmd failed with a segmentation fault. Fixes: 836b5c9b5e0e ("net/mlx5: add action template management") Cc: stable@dpdk.org Signed-off-by: Rongwei Liu Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_hw.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index b4a80f977f..9e5f263ccf 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -4946,6 +4950,9 @@ flow_hw_actions_template_create(struct rte_eth_dev *dev, mlx5dr_action_template_destroy(at->tmpl); mlx5_free(at); } + rte_flow_error_set(error, rte_errno, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, + "Failed to create action template"); return NULL; } -- 2.27.0