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 DB73544078; Mon, 20 May 2024 17:08:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33A0640263; Mon, 20 May 2024 17:08:09 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2044.outbound.protection.outlook.com [40.107.212.44]) by mails.dpdk.org (Postfix) with ESMTP id 6EA6E400EF; Mon, 20 May 2024 17:08:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DKGqCoxF1fpGzXfBWo3xcyrhcZpTauNYNdgG5PX1RYHsUt2XNv1ygwr+wJZ47QtCOdvvF4tklgHjnqnNn+UTt4ydKgVWc+Hdmvm/Mkun+hXHGKBIX9y+/A2ZCQs34SFP7Rr6KTfrWs3UxRjvK28S8kL7CgMUYJKYj5tczHVQGOPhmerye/1SmcfupPo8B2oiWlUon94SuYiue8QhUt2Ysi84FeSoevVeO1uBUiEkERQGzybbmGOZW50c5it4LyfIlRvFxSP8R3lhItPPJ+bw4ht+gm/74v/W3C0IOCtcoS++p/1cPkGD2Ap+AOIRLNr48LczEwWKYnXw4P1EWIyKGA== 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=0suI+bwC91IFD4LiND2epf6pi+F6NCzmbVxXu8t8yds=; b=DjSbl9xgje79mkmudqkZVKcZDwptXyWNmw8e/jQVac2c2OGRfjJkh7ZwGb/QSbH7xiDoTxlfK8UEA45NGBsCLmZ95rbMArNoKiY4HqR55k39oVCpdppNo7S8QbFp29e+CDB6cdbZgyYT2vXHS/opjfo/OqNHiXsvSvOk5iKRNmIrLpJSbtuYMZdxeVlvRDJIdG8x1I7MW1/X7PDiRzNDHvX3voAqAc1Aai5vex2m4sjBJapTy4opU2oikUh4SqVzVcquK+LoYHiacKoWc8x/5G7YjkMitTRGRZ/RjjuEgDDTRRDh7sM6c3scBZZub3ZtG+ldoLc6OreM2u1xpnGqoA== 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 (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=0suI+bwC91IFD4LiND2epf6pi+F6NCzmbVxXu8t8yds=; b=dsozY5nrRYzGgjj1Dlxd5kjH1NcLtT1c/z07TPMvljiGsm3lEXoZHd+HeU5AMo23z4KbxIYq0VJR3O5hSkCOTsJdc371aj9OgK7S9WSx54T8lxlHjBopa6rrwAyDNWvqUdrdBzCprYdnSV4JHjQmn6x+SzYU2uDdeBDHgf7XsNeuMJwMxS+SgAfqbsdoqw2vKeCVadZ4mcM7NWAGFUeR9o7alzBfY6wvmgAbOq7YIhmzuGn2gOj9v/WXPyoO4YmCoplcnI0MW00XFvO9aSIAybcLg46hakhnye4f2fuYSlNr+labxxMQGkaR2iiBbITME5rDkAW5dvC43Q8DQjjDVg== Received: from MN2PR15CA0060.namprd15.prod.outlook.com (2603:10b6:208:237::29) by SA3PR12MB9107.namprd12.prod.outlook.com (2603:10b6:806:381::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Mon, 20 May 2024 15:08:03 +0000 Received: from BL6PEPF00020E61.namprd04.prod.outlook.com (2603:10b6:208:237:cafe::5a) by MN2PR15CA0060.outlook.office365.com (2603:10b6:208:237::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36 via Frontend Transport; Mon, 20 May 2024 15:07:59 +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 BL6PEPF00020E61.mail.protection.outlook.com (10.167.249.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.14 via Frontend Transport; Mon, 20 May 2024 15:07:59 +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.1544.4; Mon, 20 May 2024 08:07:34 -0700 Received: from nvidia.com (10.126.231.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; Mon, 20 May 2024 08:07:31 -0700 From: Jiawei Wang To: , , Dariusz Sosnowski , Viacheslav Ovsiienko , "Ori Kam" , Matan Azrad CC: , , Subject: [PATCH] net/mlx5: fix Rx Hash queue resource release in sample flow Date: Mon, 20 May 2024 18:07:09 +0300 Message-ID: <20240520150709.39835-1-jiaweiw@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.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: BL6PEPF00020E61:EE_|SA3PR12MB9107:EE_ X-MS-Office365-Filtering-Correlation-Id: 76297b7b-df62-4999-8694-08dc78dea341 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|82310400017|36860700004|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?y/4xZUruTz9ALvwxUSKfEATpebUMoDKRNSqIzGDPSXrzdfBO3J0QMTxDgDKM?= =?us-ascii?Q?eSYFdHPxn+B126DkjitMYhleG1SZBgcNnpPuiHnNZxaRDKVyOAjURASDgZA8?= =?us-ascii?Q?MFayISDsAxBBc8MKUBtpBpVtOoMaVbLX/5rulFcCYcntuIUhgvxlwY4QPBXK?= =?us-ascii?Q?oXoR2JpGOfsw0VOU8F+UcEKkQ8rxgbmXJx8N4OaU/18LPJB15F5lpGvRAT+R?= =?us-ascii?Q?tMl2qmKgLs3W0+eYjn0uHEc5EfKu8ZDHiwRojI9elNHfU/9Z2WUjXsY6EFiN?= =?us-ascii?Q?1Pusf8uMP0nXo/YQMzRIDsmlGBsB8O7QW/wf2MidiNt6Mt4kHgCSDscTZ7Df?= =?us-ascii?Q?8gFQDq/5GNQYvUdYvb8ZJsfBj/erGEocS8F4snZsC003zNlCz1wuqG9d7YLj?= =?us-ascii?Q?uPfK+qpjYKVdkSRAv6XC7PUqdhDhbeMjx0wfLEc1Bz8DC0JaS0sZDWOVq+2F?= =?us-ascii?Q?2QcwwPOP+HPDx645pczqKiw2BzIF5sTzST+X0zBtnBQ2DuHS5kUScRGDKVtt?= =?us-ascii?Q?4a2nsrGxfjotuEFTyYcmJMGw0H+lKeI1JxRJziZPF9OrMnJF/yfYEuUs7qL7?= =?us-ascii?Q?yA1E37uRSMwW4wugKG94R9Tyx9Rd2lgcLYxosVBnfa4Vri9hq3HBPxLm+byG?= =?us-ascii?Q?gIdkUaLOrTln1PZuD9exV8bNJiPTI7gw1jD46XvndICBhT59/GrllRz7z7i9?= =?us-ascii?Q?2Age6fQy47ud8kFgkegUH24TpwvcJaAuAaaB0rxtyPwp4Lvkj0fEN2yt8zKk?= =?us-ascii?Q?Bf0+bQaJGHU2Zr3IPrDcblBwe4kMSLr3lb4cFvhUBaKQMZO0nQccQw2kZ1uB?= =?us-ascii?Q?JSmdN4HCa56STqkxXCTZO4N9QfIgyqD3RTYJJ5ColsdHUfp1mX8S12SZoZz4?= =?us-ascii?Q?f64BvLkj3n9Ju2ntdQgfnfZ4qbaI1CjKaTuI1kA2y+HWO+z5uqO9fBE0ZP0d?= =?us-ascii?Q?LIvEow3tF2AT3GffeIyaY+D0h7c4+dkWO0ZjBr4/FT0RAV4stqYBXId21LYR?= =?us-ascii?Q?Tu9esFeESX+3+1gERCBLCtVjZaEZSGCBiRA0U6mhfR4x8FbU1mqFTnoqcu44?= =?us-ascii?Q?BFS+byubSlyNQitOFBHoO9f6R0VjCnmUyG2uP0QKTdhHkZf2ebT3Oi2cAi2r?= =?us-ascii?Q?i03ZCqack6rf5YZ6oULJP/aFi+9QNvaLGePTmjdTN7izuo6lVcWz2UMdYaoM?= =?us-ascii?Q?u6q1KDmi82+YJZJt1bN/mGjzqqdAk9+zwkWnQk5T+dUF/rJpMA7FUgDefbcH?= =?us-ascii?Q?l5F5x06/kZJuUM7sBbFvbap+cCxnzLwybzUkkEVsk0rjgiTJktO9TKgA5uY9?= =?us-ascii?Q?vyoUCtMtoEhOYKL1UmOc4fBialDg0M67BPuL8JqhqNXXrMMVsXB8iM1Ptwhn?= =?us-ascii?Q?zKXul5U=3D?= 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:(13230031)(82310400017)(36860700004)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2024 15:07:59.4633 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76297b7b-df62-4999-8694-08dc78dea341 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: BL6PEPF00020E61.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9107 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 While the queue/rss action was added to sample action lists, the rx hash queue resource was allocated in the sample action translation to create the sample DR action later. While there's a failure in the flow creation, the Rx hash queue resource of the sample action list was destroyed in the wrong place. This patch adds the checking to release the Rx hash queue resource after the sample action release, to avoid one more extra release if there's a failure. Fixes: ca5eb60ecd5b ("net/mlx5: fix resource release for mirror flow") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang Reviewed-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow_dv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index d434c678c8..16d5f68622 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -15656,7 +15656,8 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow, SILIST_FOREACH(priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW], flow->dev_handles, handle_idx, dh, next) { /* hrxq is union, don't clear it if the flag is not set. */ - if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq) { + if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq && + !dh->dvh.rix_sample && !dh->dvh.rix_dest_array) { mlx5_hrxq_release(dev, dh->rix_hrxq); dh->rix_hrxq = 0; } else if (dh->fate_action == MLX5_FLOW_FATE_SHARED_RSS) { -- 2.18.1