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 DD7C142D73; Fri, 30 Jun 2023 08:38:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBCF6406B5; Fri, 30 Jun 2023 08:38:49 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2064.outbound.protection.outlook.com [40.107.102.64]) by mails.dpdk.org (Postfix) with ESMTP id AD2504021F for ; Fri, 30 Jun 2023 08:38:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fxEd4XuRCHuzlP+h4g1XMEMagfeDCJNGhGVKvTV2A2Xpz4topB175Jd7h8c7EbSah6Mo72tQRZB2Ao4jor7bE6cnIe0LM5LwD7FLijLfr25lJaBSz3/H+gVGff0XFue42gZXtdU2fky35pAIroMQwR3CNjZ8wn3wvBPNPX51seGz+W8c0Ie2uvy0VQNLdau424gxkoRDMqZ60rUE0wfZcEWeyrt4tsqj9gm6fprXE9uQLkXnUI/L5n+6yd1dAO2NjvjpWqQaKW/HPqrAceEyA2rNUFkwdzeoH0wv4DvgyODIsY1ar6li+wrpwX2OQhJfqrXWZiKTZwRgnxSe7HAE9A== 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=0essLS/eb9YKqz/61teiVHT+bzJpS5vhYSx+ycF+eg4=; b=LMM7PHd9Cf8UYboi1j8VoQKK2h7xDNYt5Ro/HTE8asASbHR/JcMHa5lXsX8r+A+8g9guT7lUg9Vbyt+2VLT/HBg5Kj4LsIMU353iiRZzoz8zQcmWfUInPNq2X5z5UovxdJRISwpNjvIKuyOrgMFJSNzusrUJwkSICh7GXRw64hCgCjD8hmF84yBTMJDAKw8RKoQbWm2iIQ6bYt3z3HBLzPkrcfqG/yEFoVVawbJQbMap1+CNNsTavlelU7aJn81J8EYaDxgqRI0TYiKKFQ9lS+ifDUfokSUllE8xLkH4raQ/BFh8+J2EloqprwL8q0iVDuZs7oZBKIxAI6L/E70l0Q== 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=0essLS/eb9YKqz/61teiVHT+bzJpS5vhYSx+ycF+eg4=; b=HO+4DTIPWvdbFWXWLtXqsNTywPOagMfUiTdJlsfHX7GufVVpHYV7aMEMuyhUxdWZgO40ccjLto3ouA5wpJlNepucwTeDS030QsbtYgjnJic76oR/Ts9j8G+Wl+yAFAwdQU1kMI5Aow+3F5zN0Q9HIbc3goxkmeLZztmFp6S7fX4cx91vrT5GijQWc21ceFvfmhcGMi3HlmFZaKIOp6O/DcCN8YUVUyZ/QwfFx9I4Fe7ZYKJ3wSehn/mHc2khtQ4LqrRGltYewCqrjKfSAUGkMVRgsVwPCkRI//7Brs7Qvkf2Sz7u/DMcWfnCdGoE0nyPlYZL4JiqcENvribK0qj89A== Received: from MW4PR04CA0177.namprd04.prod.outlook.com (2603:10b6:303:85::32) by SN7PR12MB7154.namprd12.prod.outlook.com (2603:10b6:806:2a5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Fri, 30 Jun 2023 06:38:47 +0000 Received: from CO1NAM11FT110.eop-nam11.prod.protection.outlook.com (2603:10b6:303:85:cafe::7) by MW4PR04CA0177.outlook.office365.com (2603:10b6:303:85::32) 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 06:38:46 +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 CO1NAM11FT110.mail.protection.outlook.com (10.13.175.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Fri, 30 Jun 2023 06:38:46 +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; Thu, 29 Jun 2023 23:38:36 -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; Thu, 29 Jun 2023 23:38:33 -0700 From: Bing Zhao To: , , , , CC: , Subject: [PATCH 6/7] net/mlx5: fix the error set for age pool initialization Date: Fri, 30 Jun 2023 09:38:20 +0300 Message-ID: <20230630063820.432593-1-bingz@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] 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: CO1NAM11FT110:EE_|SN7PR12MB7154:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ee8dee8-d7c1-45cc-f788-08db7934a7f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Mkdsebas22uRmIsfKoFw4o8NLfPVVAwLP+dzQr3r6B9K85tiwvVLnTbibXdYDDRv6KJVT8Un1gTs/O3lN20Ysjamw4yEDXjfcmUYbp18axGls3SpS7XfYIswF4dBiOUsnG1KZIB6nheQ2MoPW7gwNbNZYkhesN2AV+xCSaYBAO8AGdTfSMgCHHkpC3gTYwESugKxfofGBUx19KmLDM6AY58TppGvTKL/BB62U8+qez2Ut/UvYgg7wsE1XLrr6VECm05orehG5rIOZRjFFL3zsCaz3pjHEl1gxusdwYwE/5FMdu6Jy2RCBkr5pv7jNKl0/B7L1U2wAWUe1TsmK3ILtQxsDRggZb5ztYUVqEZ/qdsdJI6CGKGeXW5CDZjhTPxQ9g57xI5K745qWCA0m0IqH85pTC8KWGERJN0i+BBgSYRfrbMxeYc98ZStUHzrzPF4p9OkU+RmzvpuWNeF+oMxeR3Bhm28VddSH8YEd42/itCCPzoImZF15fn9WTaIZrogdXlNlaqK2GGp7JpH2Kt5vOzh8WmHFngUQz01Z0wRMCgZHV6trjWlF3VhZKybnIUyk7NBOHgPRvjj+5Locz6J5VGdlSDp7NH4TkyaiYgJec6M1SpXIOAFJGsCztERuHZGb6+8o12PnmU0SXeOJWTUAr2cOkRBTBRJzTVM/J5+f0KIFAzkhFBufu/4VgxCNyCIfvGd3rVu/2edyDk1I0W+P/PaUvCxdI2fGwap1XM91zFXVo0tmr9oJ+SwE6YHjvR 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)(396003)(376002)(346002)(39860400002)(136003)(451199021)(36840700001)(40470700004)(46966006)(107886003)(5660300002)(8676002)(7696005)(8936002)(41300700001)(6286002)(186003)(2906002)(16526019)(40460700003)(2616005)(356005)(82310400005)(336012)(426003)(4744005)(110136005)(36860700001)(54906003)(86362001)(478600001)(47076005)(83380400001)(40480700001)(6636002)(70206006)(316002)(70586007)(4326008)(1076003)(26005)(7636003)(82740400003)(6666004)(55016003)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 06:38:46.5032 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ee8dee8-d7c1-45cc-f788-08db7934a7f1 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: CO1NAM11FT110.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7154 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 Signed-off-by: Bing Zhao Acked-by: Ori Kam --- 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