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 2E51C42D94; Fri, 30 Jun 2023 12:27:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD9B5406B6; Fri, 30 Jun 2023 12:27:20 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2061.outbound.protection.outlook.com [40.107.94.61]) by mails.dpdk.org (Postfix) with ESMTP id E9ED1406B5; Fri, 30 Jun 2023 12:27:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BLs1p6aa3Jyl8QKeUf8FofEZCfsFjm9a1PcqLuH59+J/UB5s6NRZIIVFy/QL2iqTY/l+YyhjZHgp/1ht/ZzoWHjnqVbwqUpfJrnU+bzQgvw65Z8H5zxzt/qU5teDiWRghsWpZJSMSCHUyBU4LSKm4NeQjKyIB2G38oLLSjn6PNAJAiUn/Cg86ufRQIeiXrwUq/u/3e6Mi26f4mgS3Zfi/7OCIXEDb+ntUGg+Oje5SOqwY30XYwgXYOfCvUa5F+KHS3o5htczR32WcDscLoSiXXpNg5VhYrOg6PGw09drz2I56xFlkoq/a7js9DAPif3rKJVFeZVSiKJqqtMVIxux/Q== 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=YxS8tb6tmLu978XcMuMKtcNihE0+UIfbHbARNgeXdAI=; b=XmPMVIiqxgg4nCoWBaPje8V4d967EV41p+8AVGFzkn1a32lIfk7RnyKetmQVQCDcEX7AJldD6SFJx5KQS4ic0m6ya2gYId1pQ+KWnmOgUSAqYXap71DvSmaQj4CUIM2G/8SaysViC4jOOvu9C4cGLyED0TheYIzEC8Wyn3WZBTQcwDKXPEczWKJuBx5lE3RbjqNdolgL4iLEgSiIJVnvQN5q+6kjGGW5k71p9vNY/MOs3VUvuTy3RgFCE10BCPwe4Ns/VczZi9WeTsBn+418zjevAglEFoQjig8iwqtmdaXotnChd5lrxfdzsK1LqkToOLMytDRJiwEH309Bdg1Ntw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 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=YxS8tb6tmLu978XcMuMKtcNihE0+UIfbHbARNgeXdAI=; b=MghZbPzzl9O4VTruUaYY5GDZNG7HaMdaZReW39i2tDWHhlRIUU+Hm1BrBkyxznUFh+Iuoi/GvepDIviZG8yg6BUJNgCq7C0U5AicG09Qgp5b5067QntKqZd0NZHnQVCOWo4NkM0KhOj9giMni2ApdVeO96QNZuDqxtY6usdUezuPSNTUvivwBa4WGtC3V4yBheiJBn45kKi3kSTDOjOzDlPT7cGrh0qSyK6o0yrGAxmxbT54KXf9efYfqyAzonCbC1eakJfhBqUOkAwCzg+PwoI8SKbrQ54vQpvo7wjglo8MJcYBT+cTziMPBr4zHUPtMJJrz7JMZkLw+KNyabq2PA== Received: from BY5PR17CA0018.namprd17.prod.outlook.com (2603:10b6:a03:1b8::31) by IA1PR12MB6067.namprd12.prod.outlook.com (2603:10b6:208:3ed::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 10:27:17 +0000 Received: from DM6NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:a03:1b8:cafe::8c) by BY5PR17CA0018.outlook.office365.com (2603:10b6:a03:1b8::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 10:27:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT055.mail.protection.outlook.com (10.13.173.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.43 via Frontend Transport; Fri, 30 Jun 2023 10:27:15 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Fri, 30 Jun 2023 03:27:06 -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.986.37; Fri, 30 Jun 2023 03:27:03 -0700 From: Bing Zhao To: , , , , CC: , , Subject: [PATCH v2] net/mlx5: fix the error set for age pool initialization Date: Fri, 30 Jun 2023 13:26:49 +0300 Message-ID: <20230630102649.434349-1-bingz@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230630063820.432593-1-bingz@nvidia.com> References: <20230630063820.432593-1-bingz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: DM6NAM11FT055:EE_|IA1PR12MB6067:EE_ X-MS-Office365-Filtering-Correlation-Id: c61b348a-c4b9-4f94-008f-08db79549369 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZLeyOOSx5VeO3L2Xt/GTWiASKP/H/3deHVB+sa3ZCv3NQmeWBJIbMScxRO2Obky6YYpjhBlN6owQ3JUdI7TyR9z0kmb7QwwCOsLaamebfGJI8pEYqY25ngnabgZ05NMa2qLzR/23pPD4quva+qWgfCLp5e2nH4YQnfm9Q/3peQCICT5AxxTBCpPpJXPExObMClxaxisDv6oS9smCuZI0S85nZRDvDKbIg/maJZBV/LH5ruPphBCUdvwZsaulQl1mQxXhP6olt1Smrdr3rtahHQHU6t0BXPLAp+Gd/q41WZ9R5y22xcd1C6XYQAHGmm42bFcsBBrqvNPMLZTyOpr65cuwu7jpQut00tSUUaa9/W1/rG8OHG8lDowvjo6BgzUvg40EXeMr0JQKETxsZhH1lxfhreYOPLpeu51jYsVbhDT49dTwY1aXa3ei695q4bWvBpBvJLOuQmGOveZz7uXXZ4dnaS7YRPpSdIPAXjMHdYar4t0/AxPuIqW4WrITItawE6FlKHjibEi8Gnbbx/T9neB1fFCugbhQ/Bm5OQyf4LopoRhMJN7wVmnKkhl4/YfMwJAZdsul5uhi7pnSJjzo69Kc+7z0TKQXRyB0G81QMubw2MmZM2/pL6LRwTYOFp5labw1zORPiNoVsWZO0Sx8JeCFjstBWoff61X57ZujXK0eDgb2607ZL0mGV/HRd2fJKw4+Dn8ftApflSxwJiNX5Smhww2M4kE7aHCbaSnKlAynsFrmNayl58cAU26QHXnH X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(396003)(136003)(376002)(451199021)(40470700004)(46966006)(36840700001)(55016003)(336012)(426003)(47076005)(40460700003)(83380400001)(2616005)(2906002)(7636003)(356005)(82740400003)(36860700001)(40480700001)(36756003)(8936002)(8676002)(82310400005)(110136005)(5660300002)(86362001)(450100002)(54906003)(41300700001)(6636002)(4326008)(70206006)(70586007)(6666004)(316002)(7696005)(478600001)(6286002)(16526019)(186003)(1076003)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 10:27:15.8996 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c61b348a-c4b9-4f94-008f-08db79549369 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6067 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 The rte_flow_error needs to be set when the age pool initialization has a failure. Or else the application will crash due to the access of the invalid "message" field. Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS") Cc: michaelba@nvidia.com Cc: stable@dpdk.org Signed-off-by: Bing Zhao Acked-by: Ori Kam --- v2: add CC stable --- drivers/net/mlx5/mlx5_flow_hw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 4163fe23e6..20941b4fc7 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -7913,8 +7913,11 @@ flow_hw_configure(struct rte_eth_dev *dev, goto err; } ret = mlx5_hws_age_pool_init(dev, port_attr, nb_queue); - if (ret < 0) + if (ret < 0) { + rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, "Failed to init age pool."); goto err; + } } ret = flow_hw_create_vlan(dev); if (ret) -- 2.34.1