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 CDD7641DF5 for ; Mon, 6 Mar 2023 10:16:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C536A40E50; Mon, 6 Mar 2023 10:16:06 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) by mails.dpdk.org (Postfix) with ESMTP id 153ED40A8A for ; Mon, 6 Mar 2023 10:16:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZPuNDXP4cmTLLqdC2YTcZXPYMhH9l4yqG3ecTmB/1CYYQ1itF/CmSuCk/AZBwjiW4dp+DFwqXf+x9iOs4FSjnqs/kDaKGtSNu/1u6x7jElfGynESLqiIdg5AV3gOblbm5kRr79oZvp4LZ10BGwWEL0gQMuqkTlAh4dumdBm7bJjut3YaoqDo5tEqShTAeNkHQsYuNErKPqwcpDyilfTluWCusjIQBGgJWdejPZoxz5Jf9iKPcYpABzQNR2t6THuGGGhZ6WfB+75SCfRCaWPiE1Hr8O2rnv6MKLq9BndjrgEzFTltMbWjH/BGonezBF0x0h+asuMYS23j+W4OtLJ0ug== 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=TTecWCyzazYyMhZ3y4sE4FJwftSZdCfXcVHoGjEgiY8fnSkenHRZHQlV8TtN5drDT1xUWRmLvqzowKoKe5jzrzIazXWGYwa8eAwfAdGpbL6ULciyWUm2P8g0NcbWQtGubDG8WSrugePzzBV3z2CqipuDca+Z+kegQwwfJ9XJHAZTCYuOMMxShEykoee0hs24+V+9TQL36rOUdEQ06VM1Ehy6w2NOBrDKXgCxd5ks7zSkMhEcCXTPutNFD0yQBTgM8GQerCjY/1U4vF6ACyIpCHGVGDaLX4hNN6YeEUjyNdX2NCo1CCTFdQQcBe0sk0oJbEe8G0cFUTEK8s3Epsxj5w== 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=j/FNRBA0RIbgcUlgPMlZVN+0JMheNtdr+MyyIHhGCG6yInYGr82H4r3jsGKENRYKYISLvetsmOrDNpFmMl5LQRbCWZUvhk5uk+7zvid4E7tCWJR7n58p67XqEXMI2jK+JSaQyFk3UgKLS+GJIT6mgEgNybPZXKItgmlMMGqDU/vRmN9phmNSzRiGGjrUCF79Rs53hI0U7tiv42YrK/NOirBDCvHjUVlZgYeXdlX1ORsLyp6AxCJbXlfGhmEujBe8s7pfCeVO68lhPj0IbQhifWlZ0zmj88nJgen8MNr1BinSXs60LYHsbyPawrQr2WND9wESY1DY1BAH+fznFKvXzw== Received: from DS7PR03CA0108.namprd03.prod.outlook.com (2603:10b6:5:3b7::23) by BY5PR12MB4193.namprd12.prod.outlook.com (2603:10b6:a03:20c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28; Mon, 6 Mar 2023 09:15:52 +0000 Received: from DM6NAM11FT005.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b7:cafe::b7) by DS7PR03CA0108.outlook.office365.com (2603:10b6:5:3b7::23) 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 09:15:52 +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 DM6NAM11FT005.mail.protection.outlook.com (10.13.172.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.15 via Frontend Transport; Mon, 6 Mar 2023 09:15:51 +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 01:15:39 -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 01:15:37 -0800 From: Rongwei Liu To: , , , , Suanming Mou CC: , Subject: [PATCH 22.11] net/mlx5: fix testpmd crash by action template Date: Mon, 6 Mar 2023 11:15:26 +0200 Message-ID: <20230306091526.2210924-1-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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: DM6NAM11FT005:EE_|BY5PR12MB4193:EE_ X-MS-Office365-Filtering-Correlation-Id: c349fba1-f109-4235-14b0-08db1e236216 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: 7n+wdT9IHsIzGFOvEBe/WfKxJGgOa0/ideIUmPk+IpGsorxAHkEO8BIvrNNYnmEH2jC1Bm+yNkaNHz/yVIbkY68IIfyfsHATa4t8KtOFVYjNBMwOYEkK32oZni7OSa2zMgqqmloabi4lIFuc7J55tzjmFiteMU78muHzUTTV7MFWTehlI0H09lmaHMROeW8pIxIDQVzq1TkcQvJqHMzBxenuJF1a5zOuiN/FGZlbUXaz5/cdyOpcoA7563U0kTYSkmkRfIIZvBDzFDMzwf5lZnAJ1sby05IiIBrhhGcEkWo1wi8ofL4VHLMc7iSpro3Wqsuw1eDqxYhXnFFn/eLh/E8JKo63Ix4e36UeaF34nYvkJ/pMsTbfB3bURNSa4XyrloP9AXIpEoogkBLOvIMEqhM+bbQGZOT7g8uOX7BQudXA1RSdiWgsw45xq+vcTLG2KPYSvC3v+CrN2hLK7pc4XcAIB61qqnVJl7qd0wRtQNtXSdRQYtAPBPP9j4qaoZpECuw3qE9XU+GWtQ1anyCSCjrtNGIfJi8qABb6SyABZW5Cow+DLzLNu+Ayd7mEjm8f6hiKFOT7rxkwSEbihu8MJO6Px8ZTQnWlq6uSm7Uzta+8JFhLXsty6mKPYI7N/dUXIDIClI7pnZvANTRcbQ/vjJB5uPXersvE6yllgEkS4/s= 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)(39850400004)(396003)(136003)(346002)(451199018)(36840700001)(46966006)(36860700001)(356005)(7636003)(86362001)(82740400003)(36756003)(2906002)(4744005)(5660300002)(4326008)(70586007)(70206006)(8676002)(40480700001)(8936002)(41300700001)(82310400005)(2616005)(336012)(186003)(16526019)(6286002)(83380400001)(47076005)(426003)(110136005)(54906003)(6636002)(478600001)(55016003)(316002)(1076003)(26005)(107886003)(6666004)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2023 09:15:51.9953 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c349fba1-f109-4235-14b0-08db1e236216 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: DM6NAM11FT005.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4193 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