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 C7C54A0548 for ; Thu, 11 Aug 2022 09:37:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F22A40DDE; Thu, 11 Aug 2022 09:37:25 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2082.outbound.protection.outlook.com [40.107.101.82]) by mails.dpdk.org (Postfix) with ESMTP id C429440DDE for ; Thu, 11 Aug 2022 09:37:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=obK/ROuE/Yo6cFfH64pvr6vMyjk1TtO4M7FIaXHuZq/Pnk/Iqb1hGFBEzW/rL1zy3GYpTEUTWqYe4/WK5lXQLALw3UW9B14rtFMv196bb5waXEvOHN8l5tEmGqHPVeHFCnlI9vuaddKCxtxonBfKCKDocklsxJ7Y+Mw/4qeC8Gx6/RWW7hlVg5bkEj1pe+UvUoORFUFXhLInNCLiUeCWdU6KrH4pR9F2a8hoxrwYeK8Amc0WQS+0xWXPRjzetH/b01xKCIKX1dVd+6QYoaRTwYvYk8XSrHAdAXa7QUd5LpTGp62geGSm0C0aOpaUBWfCFVWLONB87/R394eDnhpxCw== 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=Ke4MU7gjATjgtPUpPku185x38MAFgmdgdYh/6bPoo6A=; b=ItBHC9bTfnZR4V6TBxRtpxA67YF9JUl0lXm04I0Hsox7W2Smu9ZlhbmRF+MeLtfNqukPzzh2q+qjO+ncgXgSe9ioArrZiycKlQnQFzjiUMosM/qrZJsUGiAGcSYq1V5DWE2gPGsrSsbvNRMD62K413kaowNuah4hENPzO9Gu/hYW1RTr98SUgcfBpdfblNgcy2KWd1iK2dum2qXLO+cuHJsoZNJfgAGnvNa0k57w0fI/EQov8MyECpMsSkNRdN7SbWbB/TRHQmcs00PcTYmcDIRvxtTWAReup42QK4TtH7YE/++aCo1dPF/C4LMnUquNAlf6YoHXfyfQRvVFVlxNAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) 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=Ke4MU7gjATjgtPUpPku185x38MAFgmdgdYh/6bPoo6A=; b=lRG6nZG9lH5f9gHYyERze/fL03rBsERAB0uTKyM5hr/zc+7zFhK/Xhy7fCM6ky4qH1pu7E4GT5YWD6Obmu5Vr48980TPRk3qcp0O8CwtD/Zxfr9F2/5SLArzxMMqC0McVDU4AWTjQ1COtPxqOiQfEqGaa12qKaA3BosDC0fabgFPIdJ8ppCf/eyTW5z8InU8qW/4L3QTpqqIjabTsZR15orX2xutAT+w5G4VIiGoLlliv6I07unZzzRjWwwfg4kDzKjvYwLCxVTjA7545a2ghl5ixR7XaIly8dPEAibtUMM8wuX+TZuFphMa5jczAB1SGQgQ+8RrDHGzOFPP2oWe5A== Received: from DS7PR03CA0274.namprd03.prod.outlook.com (2603:10b6:5:3ad::9) by BL3PR12MB6404.namprd12.prod.outlook.com (2603:10b6:208:3b4::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Thu, 11 Aug 2022 07:37:22 +0000 Received: from DM6NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ad:cafe::54) by DS7PR03CA0274.outlook.office365.com (2603:10b6:5:3ad::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.17 via Frontend Transport; Thu, 11 Aug 2022 07:37:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT004.mail.protection.outlook.com (10.13.172.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5525.11 via Frontend Transport; Thu, 11 Aug 2022 07:37:21 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 11 Aug 2022 07:37:20 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 11 Aug 2022 00:37:20 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Thu, 11 Aug 2022 00:37:19 -0700 From: Dmitry Kozlyuk To: CC: Xueming Li Subject: [PATCH 20.11] net/mlx5: destroy indirect actions on port stop Date: Thu, 11 Aug 2022 10:37:16 +0300 Message-ID: <20220811073716.3631212-1-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 458ee739-01b7-45ae-a710-08da7b6c5394 X-MS-TrafficTypeDiagnostic: BL3PR12MB6404:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R+hyeFQi2f3i0gnXvZuc+IPFZASIBZSO/xbqa7vy873iiwFXoj+Aubx1N3q3S4+q+RO3fz6N+Fel/IeCLe8L8rfZXeQv3/WIhlC0Iy8nMsMx1OZoHuG80c/GH9a+SSp53JajrKCfDlTsy6e/GXxS5JQXQ6wd+FALAEk4qCPsVC7BOoZUZ7oe1SQ+YFX8d71yvlX0g7Htx560Bk0p0kYeYX6lE76J5oAjNfgRtsINtwOHaE3KJFBwiI867Raw+WlwsPEJ4nGWbM9KvVTGedB+ut34lUnmEv4NFWF+TPNEZwV+UYM6j7V9h7UNciE0ul2hpdTOKfNs6E7MnzCSu8GYOnR5hkqAA4AnQYCmB23/nqV2eRBzZ2Ifp5iSWMKLOS1khM0uEUHZLUOEru6ErPSpM3BP9kz03x+iuzFJrwCM9S1WBfGywxKIeW9PK3vrY95tu3uUzQXEMn7Ql0S5wfAmNYwPjpDil+9P+Z9m6cTqrl7I6YbPyEmE7CIYWvJ4MLEHi38HesZaG8M5YaePThLyTUQQ0KliO7O5QjRKBkTrQBEyWdfyDjrfNVQ3bCKgTkodqMXL5Gg7pnCUbugaCptbdGJqrh6/fHxbg09VRbu41WmO3pRlSKVnYRiUJ/evaw5zl9wEBYFbVkAs63GHf9mDa8XyQ9CIEl9DFZ9iODx5JYbsL1lhRjxHH0hC7LnyYowM4m6LrQnEm6/yaHKePO4IGVA0Y5FnsgiClDle3ez6Bfvz5O0NE1PSkS54R8praTGzCeoSH9kWFWLpKWOJ3XCod3xnk0B2SynZJw3Qx0OKQk6nhIbe7Sy8kBqQFKR32yqNkoQVttNkZKmajQuEHCaL2A== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(39860400002)(396003)(346002)(46966006)(36840700001)(40470700004)(336012)(47076005)(426003)(83380400001)(86362001)(478600001)(5660300002)(1076003)(186003)(36756003)(36860700001)(107886003)(2616005)(40480700001)(55016003)(40460700003)(8936002)(6916009)(41300700001)(356005)(316002)(82740400003)(82310400005)(6286002)(81166007)(6666004)(8676002)(70206006)(70586007)(2906002)(4326008)(26005)(7696005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2022 07:37:21.4032 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 458ee739-01b7-45ae-a710-08da7b6c5394 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6404 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 [ Upstream commit ec4e11d41d129ebc7c395b567827492e56fb08b7 cannot be backported, because it avoids the issue by advertising and using a new capability of keeping indirect actions across restart. The behavior was unspecified before then, so it is correct for 20.11 with this patch to behave differently compared to the upstream. ] Shared RSS actions were not destroyed on port stop, preventing release of involved RX queue resources. As a result, associated pool of such queues was exhaused after a number of port stop and start operations. Diagnostic message from rte_eth_dev_start(): Rx queue allocation failed: Cannot allocate memory When built with RTE_LIBRTE_MLX5_DEBUG, the following assert was triggered: testpmd> port start 0 PANIC in mlx5_rxq_start(): line 169 assert "!rxq_ctrl->obj" failed Destroy indirect actions on port stop to release the resources. Fixes: d7cfcddded61 ("net/mlx5: translate shared action for RSS action") Signed-off-by: Dmitry Kozlyuk --- drivers/net/mlx5/mlx5_trigger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 6273122e40..c8dc0398ea 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -13,6 +13,7 @@ #include #include "mlx5.h" +#include "mlx5_flow.h" #include "mlx5_mr.h" #include "mlx5_rxtx.h" #include "mlx5_utils.h" @@ -1192,6 +1193,7 @@ mlx5_dev_stop(struct rte_eth_dev *dev) mlx5_traffic_disable(dev); /* All RX queue flags will be cleared in the flush interface. */ mlx5_flow_list_flush(dev, &priv->flows, true); + mlx5_shared_action_flush(dev); mlx5_rx_intr_vec_disable(dev); priv->sh->port[priv->dev_port - 1].ih_port_id = RTE_MAX_ETHPORTS; priv->sh->port[priv->dev_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS; -- 2.25.1