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 D1BF9428F8 for ; Sun, 9 Apr 2023 17:35:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CAF9442B71; Sun, 9 Apr 2023 17:35:55 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2083.outbound.protection.outlook.com [40.107.220.83]) by mails.dpdk.org (Postfix) with ESMTP id 192EF40EDE for ; Sun, 9 Apr 2023 17:35:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FlccdN38ppYIl7OTxJPHl0gO65UNL/7GEplsow8IDkXk4eIp19X7G6EI/H3gYzKFSyiwOdupDbPePU/Jbr21SoDNBvpmL1ubHxCivRGxqA04nAddricT+OS4iJ+Y7zIxZ0oGsrKtpZGXJSxGJXClD/odenBU5NDWy4DnEU6PeNE8ix+AwYH5Y3x6qCn724EgwkiDZNKq/62hs8OgzLruOYVOoPeYg4DovG3dsjtJCvlC8IUDmoXJAEVcXgraOFF0dSxu5Mou4IGB/vglmJE1bx58Sro+OfYEbyRKE498SvfNHh2LDu2wvTgrUZniBH12rKdDZix9/CpArIy94s9a5g== 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=QVvbR5SmBSuy8gqNN9LnXBETEeaBtxdGztxg47jihLc=; b=Tj0tNYM/G/GviTnUon728BWfB5wPHfF1jqS67aVCjgQh5GoAZttnP4MiVC9RQOjPL+Aj+k99NcwAl/O+Nj1b8hSZGTjepfrmc7ku7VEZd88Ug4G9Q+nN/A+bi9nsd77qE7SzTROrXey42EFx04P3+PHWlcWaos+GJjS5R4Wjzv3i5M0wMtvmN5uwH/DdZS/77zpika15SmJ9Rls/t4KS3s+5Ft9yi//vtBrXYN9Q6JYEsuVhm+RDDA1AjmLSRSDR+q+DJJTGofCKvQghzI/wBWCJ8c+OH6VDswtZqKdfItxNE85cEPUZM8K2GaW3SYOhDRvH07AOyaUJhFHTX9S8lA== 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=QVvbR5SmBSuy8gqNN9LnXBETEeaBtxdGztxg47jihLc=; b=Uq5fXcAwEWN0M9FPPiTE+sNc5JnyaAEx/rq+St7YaKeeFWcQUAMLIboLbNfOuhGNV1p0/dci8BDfypfL4fYyxBOIvUxtaudhwT6Q5tklYYDqJZSbIXu3aJ8TAkxZ9IMFq/qMED+C+J880gLtWendJ6qt9jLBM5ZugC/Mav9iwbCNxCn2iSQjwAcAgTq3GbIeIXNdea/icam5pnm9UFW6tTtOjXpMnnXYmsVrcchnBgYdbYbSPhaGQeW2XaPJtZpDXklf7zDvJgqJi+pVDHozQb/TAflLyURm8Gh2E7ng1jXryQOqV6El6aXbNnLuBu7pE87hBWpTHIjYld8HdawxLA== Received: from MW4PR03CA0154.namprd03.prod.outlook.com (2603:10b6:303:8d::9) by SN7PR12MB7417.namprd12.prod.outlook.com (2603:10b6:806:2a4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.34; Sun, 9 Apr 2023 15:35:52 +0000 Received: from CO1NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8d:cafe::cd) by MW4PR03CA0154.outlook.office365.com (2603:10b6:303:8d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:35:51 +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 CO1NAM11FT006.mail.protection.outlook.com (10.13.174.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.21 via Frontend Transport; Sun, 9 Apr 2023 15:35:51 +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; Sun, 9 Apr 2023 08:35:41 -0700 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; Sun, 9 Apr 2023 08:35:40 -0700 From: Xueming Li To: Bing Zhao CC: Matan Azrad , Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix hairpin Tx queue reference count' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:25:07 +0800 Message-ID: <20230409152529.5308-120-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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: CO1NAM11FT006:EE_|SN7PR12MB7417:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e58eae3-0f5f-4f4b-54b8-08db391019dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0gsw3d3v7+ZJgkx/ut2wyL1gJl0o03BEgFe0VdD2StMyXSddjeu32iTkVP5VFawrZ5PzPYzfJzj55ULNKMpfiZxC2+Qo7pTkyUXd++dyBhyyEA8sb7JF+rN58PsFJXnLKE5UTF4ZWyEqLqHqsiMKYw9HTjDlcBEQzO0L8oEwgJ/OPBQU8NNtJodHPDfc0EbixB9Zgx/X2IkKeuRJ3fEPzpzjuFUsuygXrvbgab0mapcr6fkT0xr7GRc9s2zA16XVXkKyJxbVwEFwVFN+HXxTNvyqHS0X6on1ddNSl1x/2/J/HxBNKHdZPAZ0GN+7qEqijeThg2PhXSQXwuRxiAxGFbajU77XdK/0Qyn6vAZST5DeV6arsy5PIsuAwWehFefFdwyOMkmwcNm7pd5lkwbWupIs8cupXLMU16WaRwDgebVKHgQU7ruSS5gHO0m6cMjpi8couniAZ+J/L6Y6spzuu49UD0J8xjGEFWkw0hXV+kiA1IrvuWRssORpfORfmCe62d9zSZGQpZqPR5O/qiOkUNKYvDntgOlbC48qHVSVi7iwOJ+Iw3ieEl9MYzBTbGvSq5W0MZZE/8CEzro8HMaxFfwWZSK2CVCvNml0Pk3f0hXXiSbJJ+qR6aq8RRhTkpl4e3DMvVTPwlvUI/UmsaRp45cvXWLz0rVThgh6mH780P+dvvh2d+jQzC7gS2k1Ahv3kni7KJ0NxY9rwaPivR9v1TWJDF8+4HDIPSH+DQ3RXplpPTBW4tCucVFLhIw36ap8mqWcds0VhgymgfzoKbTUXPv5M74sDYibShi2HEifaL7z/gF8lVQBcxJV/XvKwWu9Rvy9HckUtU9oZqDsVPb4fg== 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)(39860400002)(346002)(376002)(136003)(451199021)(36840700001)(40470700004)(46966006)(86362001)(36756003)(41300700001)(37006003)(316002)(8676002)(4326008)(478600001)(966005)(6636002)(70586007)(70206006)(54906003)(7696005)(40480700001)(55016003)(6862004)(82310400005)(2906002)(5660300002)(8936002)(36860700001)(7636003)(16526019)(6286002)(356005)(82740400003)(186003)(6666004)(1076003)(26005)(53546011)(426003)(336012)(2616005)(47076005)(83380400001)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:35:51.8249 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e58eae3-0f5f-4f4b-54b8-08db391019dc 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: CO1NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7417 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 Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/e528b4f96cdfaae33f5b308ef075928bf53f3bce Thanks. Xueming Li --- >From e528b4f96cdfaae33f5b308ef075928bf53f3bce Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Tue, 7 Mar 2023 12:31:08 +0200 Subject: [PATCH] net/mlx5: fix hairpin Tx queue reference count Cc: Xueming Li [ upstream commit 9284987a85b07e168b165fc258523a3a4fde58e2 ] When calling the haipin unbind interface, all the hairpin Tx queues of the port will be unbound from the peer Rx queues. If one of the Tx queue is working in the auto bind mode, the interface will return directly. Only when the Tx and peer Rx ports are the same, the auto bind mode is supported. In this condition branch, the Tx queue release is missed and the reference count is not decreased. Then in the port stop stage, the hardware resources of this Tx queue won't be freed. There would be some assertion or failure when starting the port again. With this commit, the reference count will be operated correctly. Fixes: 37cd4501e873 ("net/mlx5: support two ports hairpin mode") Signed-off-by: Bing Zhao Acked-by: Matan Azrad Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index f54443ed1a..6479e44a94 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -896,11 +896,11 @@ mlx5_hairpin_unbind_single_port(struct rte_eth_dev *dev, uint16_t rx_port) } /* Indeed, only the first used queue needs to be checked. */ if (txq_ctrl->hairpin_conf.manual_bind == 0) { + mlx5_txq_release(dev, i); if (cur_port != rx_port) { rte_errno = EINVAL; DRV_LOG(ERR, "port %u and port %u are in" " auto-bind mode", cur_port, rx_port); - mlx5_txq_release(dev, i); return -rte_errno; } else { return 0; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:41.821499200 +0800 +++ 0119-net-mlx5-fix-hairpin-Tx-queue-reference-count.patch 2023-04-09 21:45:38.779042200 +0800 @@ -1 +1 @@ -From 9284987a85b07e168b165fc258523a3a4fde58e2 Mon Sep 17 00:00:00 2001 +From e528b4f96cdfaae33f5b308ef075928bf53f3bce Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 9284987a85b07e168b165fc258523a3a4fde58e2 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -31 +33 @@ -index 3457bf65d3..bbaa7d2aa0 100644 +index f54443ed1a..6479e44a94 100644