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 68BDF428F8 for ; Sun, 9 Apr 2023 17:30:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E7C940A80; Sun, 9 Apr 2023 17:30:18 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2086.outbound.protection.outlook.com [40.107.244.86]) by mails.dpdk.org (Postfix) with ESMTP id AA630406B8 for ; Sun, 9 Apr 2023 17:30:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+wR9F1ejs/UTrd/qDytq4wt+974G3RRa5cvyhjcSfT7q/To2kUBF7zs0NzAq/pFGXoRQv86bDws+Bv6197eXiBfik4FyvQ4spGZUw2u4FQpZdxLz54a6l3hfVg+1j+nipxsi4P4DcLAb+3izkCIbgHYBQZQBKm1UB/aGIyKQHOACZSkAzU1pcEzTFNaAl+WA8vV/MJ7djozRNaPpcBGW5YctaXQldH9MHi7J4OD3i/39cnEbIZlJ2g0AedqxYcf2XMQSv0R1HmnO0b9y+ixM1NlC+ZZ23KH8dDyTwiqLeagvNpUeqIdjnYUZI2U5GevH+7j3TdVldWJnhQpnH9H/w== 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=qBWZnRBZEhV6QiXrYAAuc1aQbN1RpVy0OctrNv5rh8U=; b=OsiyZMSsbP7m/CYG00lhjkr957a6w5wHKY99eXqr/0W+obz9TMdmK1TGi7V24C8yzyiFxhp0Z6A7JGVOUxpA3tGM/8xm0/kMp12dtttZsoZ6sA6pF9ZS8EURntMD5o9nFt4ctLNHFdk5iukub9SZCP8unIxGxcf5NaUR20vmUuoqzrqTT9ysVqc/T+JvAhZV99hiwSoZefR3I+aSFI+89cvm541xiXtZ2nitp+q+j7hP3QutXLoUMuX7wIq7heDuIWc3ESGrTBjRZkk+L4SyHU2M/+0Pd6ExbR84WmKYfZdJSKFFnULJ9F/fKkKd60P6MKirHGNSZgwcoVzOhWsJ6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=marvell.com 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=qBWZnRBZEhV6QiXrYAAuc1aQbN1RpVy0OctrNv5rh8U=; b=VWckBomAp0Fl+z8U8VN71bFTI0pBEjbiGP9S0hZIwhBgfhyFlpvlEN7Nqe9PNxQK+MKUYCo5sXWc00JEr7hCX0LK/68vMjwdE6dShBZpyLKMAIRa55EUnRtHZO5t8pjdiXQ1Jayw2HOjrp3cXpEAhedbocP0k+qcDVKRZpu2H1Wxvne3FPRIvulEZXwLHhFvnVrHFLgBxHKWO00p6kYFHee5x3NaQex+C2MLIrZwunGki0+uB46s/MPwrI20SejbhxyTL7dkohqa0VhrjExueWY13N+rdHSxTX2SKemoMpmPvGAKHQZTIddcRWS94ED7Lqm4Z/yE4nlHJ7be40vCwg== Received: from BN0PR02CA0041.namprd02.prod.outlook.com (2603:10b6:408:e5::16) by SJ0PR12MB8138.namprd12.prod.outlook.com (2603:10b6:a03:4e0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Sun, 9 Apr 2023 15:30:14 +0000 Received: from BN8NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e5:cafe::11) by BN0PR02CA0041.outlook.office365.com (2603:10b6:408:e5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.34 via Frontend Transport; Sun, 9 Apr 2023 15:30:13 +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 BN8NAM11FT006.mail.protection.outlook.com (10.13.177.21) 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:30:13 +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:30:02 -0700 Received: from nvidia.com (10.126.231.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:30:01 -0700 From: Xueming Li To: Rakesh Kudurumalla CC: dpdk stable Subject: patch 'net/cnxk: fix LBK BPID usage' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:23:59 +0800 Message-ID: <20230409152529.5308-52-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.231.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: BN8NAM11FT006:EE_|SJ0PR12MB8138:EE_ X-MS-Office365-Filtering-Correlation-Id: d650538e-f1be-42b6-d085-08db390f5002 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T7/A0SdXVIc8qNW9mDueVWtsmsnm2VYrrtbEvz8PXX2mWlyUK1scs1B89Nb3/1UCVWMcPbmNUlNLBuYCKptwXf0cp+4/M73TXkimEhCl2FJ4/7WJXVD3Gc61BAPNO90krnzhTRipJv4JOe+uWz4jwiqMoDjyl24VeRVnT3I+BNhiS8jzWuF387R32RMcoKmyKkpQnoYRLquIyYUWKrttlMMm+ZG8x5E5chru09kBOMe1cdpxdIpBfqAS2VtRwgJS+lmSUhQDUiP4wVGQsMoUKJ4cRPHqciaV2lvV7C3Ap8MhLo6uu6im7VmIbYUa1Mgd+d+a64NqafbWN3N2s/2jygJSRTWBfpEaScIFavXp3vjirToRS/rE/UAXEK6NVHehKggc8/AzaQcv31gCGIdV95zEs8aZeY5Ps3qDjMiVq+owW5IX+wF0l+Ep34g2W+qivmEZJ6vMAEcBiu5MX649VH/XkEu29SWOodhOlRAxTiiUrU+I0TsK+f5nZx7nw+dS8In+PMjnDsMnvHCjDfLTLV3J0+KJtL8MMVBn5Q+pH/9BYdfsFM1WgXoDth6OQwyIvDPV8pwH6XmO3r2UasxSAxKWOK/dGEPwUVOoq+kkvwnTFKAqqk/s0/7165w/pErhMuuRTqOWr/WQXYmviUxYaEufupTmrVb9nh+rxV1K1Gr93Z4BE3lMJ4A0RRjJADWx9czXA1zeCpfSR2WF2eNuhLlNsxmIUFVyaec7T3O4+RDS9yW6+rZweLjRpjUvcQ/AMidsEar+fXTLebPHyqheOShQMxV83MFUF5v6cBUOX/Iu223Z3v2dyxvBTJskOtrozIuM/a9dQDDQ9XQALu/P6g== 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)(136003)(376002)(39860400002)(346002)(451199021)(46966006)(40470700004)(36840700001)(426003)(47076005)(2616005)(316002)(336012)(41300700001)(4326008)(55016003)(356005)(83380400001)(6916009)(7636003)(40480700001)(70206006)(5660300002)(8936002)(70586007)(8676002)(86362001)(82310400005)(36860700001)(82740400003)(40460700003)(36756003)(7696005)(6286002)(16526019)(53546011)(26005)(186003)(478600001)(966005)(1076003)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:30:13.0680 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d650538e-f1be-42b6-d085-08db390f5002 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: BN8NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB8138 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/67479d24a4c9376df20188340693a1749e75d42c Thanks. Xueming Li --- >From 67479d24a4c9376df20188340693a1749e75d42c Mon Sep 17 00:00:00 2001 From: Rakesh Kudurumalla Date: Fri, 3 Mar 2023 13:40:01 +0530 Subject: [PATCH] net/cnxk: fix LBK BPID usage Cc: Xueming Li [ upstream commit c9b0bb00d201b57d1d1cdf7820d1a174d652f1ef ] BPIDs are not disabled while freeing resources for NIX device as a result a new BPID is assigned which leads to exhaustion of BPID's after soft exit of application. This patch fixes the same. Fixes: d2bebb1feece ("net/cnxk: support flow control operations") Signed-off-by: Rakesh Kudurumalla --- drivers/net/cnxk/cnxk_ethdev.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index bf1585fe67..f9245258cb 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -884,6 +884,27 @@ cnxk_rss_ethdev_to_nix(struct cnxk_eth_dev *dev, uint64_t ethdev_rss, return flowkey_cfg; } +static int +nix_rxchan_cfg_disable(struct cnxk_eth_dev *dev) +{ + struct roc_nix *nix = &dev->nix; + struct roc_nix_fc_cfg fc_cfg; + int rc; + + if (!roc_nix_is_lbk(nix)) + return 0; + + memset(&fc_cfg, 0, sizeof(struct roc_nix_fc_cfg)); + fc_cfg.type = ROC_NIX_FC_RXCHAN_CFG; + fc_cfg.rxchan_cfg.enable = false; + rc = roc_nix_fc_config_set(nix, &fc_cfg); + if (rc) { + plt_err("Failed to setup flow control, rc=%d(%s)", rc, roc_error_msg_get(rc)); + return rc; + } + return 0; +} + static void nix_free_queue_mem(struct cnxk_eth_dev *dev) { @@ -1202,6 +1223,7 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev) goto fail_configure; roc_nix_tm_fini(nix); + nix_rxchan_cfg_disable(dev); roc_nix_lf_free(nix); } @@ -1431,6 +1453,7 @@ tm_fini: roc_nix_tm_fini(nix); free_nix_lf: nix_free_queue_mem(dev); + rc |= nix_rxchan_cfg_disable(dev); rc |= roc_nix_lf_free(nix); fail_configure: dev->configured = 0; @@ -1980,6 +2003,11 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset) /* Free ROC RQ's, SQ's and CQ's memory */ nix_free_queue_mem(dev); + /* free nix bpid */ + rc = nix_rxchan_cfg_disable(dev); + if (rc) + plt_err("Failed to free nix bpid, rc=%d", rc); + /* Free nix lf resources */ rc = roc_nix_lf_free(nix); if (rc) -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.099375600 +0800 +++ 0051-net-cnxk-fix-LBK-BPID-usage.patch 2023-04-09 21:45:38.659042200 +0800 @@ -1 +1 @@ -From c9b0bb00d201b57d1d1cdf7820d1a174d652f1ef Mon Sep 17 00:00:00 2001 +From 67479d24a4c9376df20188340693a1749e75d42c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit c9b0bb00d201b57d1d1cdf7820d1a174d652f1ef ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 22072d29b0..e99335b117 100644 +index bf1585fe67..f9245258cb 100644 @@ -23 +25 @@ -@@ -900,6 +900,27 @@ cnxk_rss_ethdev_to_nix(struct cnxk_eth_dev *dev, uint64_t ethdev_rss, +@@ -884,6 +884,27 @@ cnxk_rss_ethdev_to_nix(struct cnxk_eth_dev *dev, uint64_t ethdev_rss, @@ -51 +53 @@ -@@ -1218,6 +1239,7 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev) +@@ -1202,6 +1223,7 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev) @@ -59 +61 @@ -@@ -1456,6 +1478,7 @@ tm_fini: +@@ -1431,6 +1453,7 @@ tm_fini: @@ -67 +69 @@ -@@ -2026,6 +2049,11 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset) +@@ -1980,6 +2003,11 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)