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 4A2E6A034F for ; Wed, 10 Nov 2021 07:34:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4438840142; Wed, 10 Nov 2021 07:34:54 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2078.outbound.protection.outlook.com [40.107.92.78]) by mails.dpdk.org (Postfix) with ESMTP id 5F73640683 for ; Wed, 10 Nov 2021 07:34:53 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eqfiv+793xrFLJmNoNWtYGrQhb0qsaCEGOAuEI1mCrY0KWodBii+Oj0fFCYDUD2v7agtghl0pnzDfBFPWAVkQmxctOr/rkYEBWlpqBbawdtJRfQ53jIR61thy9ArvSUZskWhcTW5lAJa12Nv2OJaFaAQsbv8QRu9aRmiEoSiv4xkIENh/RiiOip6vqh+BVXiaQmg+RP9iLfNPjQXwCk8StMdUmWraem7w8YrnfOyBv2MUawy8Akoqn9d6esNqNZs9u20PMKzIcEDNmMW4mB588aNIDcF9TxN2xRDtYaGY0VzP6pkn5EAkscjXusSha/HYq2IDOFnNpTL/Bzg8rFM3w== 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=C1UORZ6ANhZ6OtsuzbIaiodmwg3hO4P33vDAPvcxi1c=; b=gjzgbEGbdI6lyD+9hRwZZCrf7duxXNoIovppOIRWjAsBismHY6wvm+axb1UV++sQtVVGDkpuzYZXXdsoLm2dZvK5ppn17iPS4E9whBOAzIGNAmgLWt2a6kn+lMg/slVBjOhaZKdz2o7XZsINO1NzlfdMDG+bDHQT/v+p2TuwLWzdceeFUm18+QHbwaTD9XCnMy//4NT1Y24XbvVvvnACvnEBTzy7K/8IFxF+6howjmZU6Os6Ac5SxfXOlLipImjD0Tj11ALT7tFk3vKXbPtCnIo+SkwpIPFNcmyXojUtNuJWIonGitUXcOABkb4JfNSYTImXURlgh+vcxfswsjM2nQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=C1UORZ6ANhZ6OtsuzbIaiodmwg3hO4P33vDAPvcxi1c=; b=TCD8ByCjPJFmWD6VkEojHL51WyzNwkHC1l11pBfGfqTrUlMMterJfsB1Cm1jHZYj0vOLMsBRaxaI86dmioow9wqcsFRKoi614oZIEWN4aO21xoouTLwQuHdh55MRrMY7DdfXQsQ0nTsJqfFQ4dRysVnrkxno1YXd14SpBcMK9FGaofN2elsGgvLJrNKx2sQ5mmZaWiMJ0AC/l9T6Xv+lbF3fmwwdsLW/v6MmF6M+LmWCJe6VW3fcLf7+2zElanOqIxGG3MuCtxJ5UYqPR5WETpL/tZ+mVH2E6kskke9HJ/nl/dbxJU5DeWXjw23qxilRRxHGLWQ88pC2Apjg80C7mw== Received: from DM5PR07CA0084.namprd07.prod.outlook.com (2603:10b6:4:ad::49) by DM6PR12MB4139.namprd12.prod.outlook.com (2603:10b6:5:214::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:34:51 +0000 Received: from DM6NAM11FT058.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ad:cafe::2f) by DM5PR07CA0084.outlook.office365.com (2603:10b6:4:ad::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:34:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT058.mail.protection.outlook.com (10.13.172.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:34:51 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:34:48 +0000 From: Xueming Li To: Haiyue Wang CC: Luca Boccassi , David Marchand , Qi Zhang , dpdk stable Date: Wed, 10 Nov 2021 14:28:25 +0800 Message-ID: <20211110063216.2744012-22-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ced171f-bc22-4ff9-943b-08d9a4143306 X-MS-TrafficTypeDiagnostic: DM6PR12MB4139: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e2RD+LoxV0ZWwEOd/IEHRKRDPbLTZDiJvc8xBGI34IMXCPdIrh3hA4eEv7+1ONWxEsm8LGRBbMZBIvZg9xTxyHzS51IIzA/LDqCo5Y+41hMmgebVQ3Fynq8/Wbf17ESib98kWGYeJIQVGPajOG8U7CJU1xrqSOj/G3MtgnOrcaRcpUnsjma+M/l1ut/bvinQOnOL+crf2vaDPudYk94SFL53eWbniRaLsmU1+pCSN68QUIbaBJggXGDct/KxeauhgWqPAn3+6nB3pu2cU7T3+wtNJbFhwRJmtJ6/b1Y4c5e+xb7qClGu0Lzy7928iya/QTjRX1CDjgRpL6AAsHgBZWpJJZk7bNFd0GBWxPzxuICz4jhYt/d5F0OlX9/KbpHNRv4Q1h5yZq1peBYm+uOpD9fdyLBYsyeOB5H1aC419fRMcTFWz0ecYwhVJpa4uN/pHWMPOqkZwzMcP+1hyxhjd6yI4Z4SabWxK5/of82/Di1QpgrXhkZnBk2QxrboTSdcz1CfdaLM1UrAG/3siF3MN15CzXpx6L/+8G5QH0wzMCDU4hJ7MIKD96TRZnuWGUmFAnhPMZgB7uInurpqPP/nge420BS/sKCtQu2P1Hcow7Zy4F+HAf6EQ5/btJ7PyIDzGcQ2tRYYHyR+OXAAyAcNqsi46ODZ2LwzHimVofwr9OPmKpxdSusfaKZPbXDJpPXMQoGMRxijEv4ZFXhTjw8rq/Y7qTbI0w/Tm7j8jHLduPSVi+fFeOevB2HyXduykyn1/s19iNZmG0pUn8FM+DY2/wmcBimaVQ+OoCw3V+KztxK4bx2UjXFmdQ/QNKGLyM7irLB0CInEanvoMyHmE0/fuQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(8936002)(6286002)(2616005)(5660300002)(186003)(426003)(356005)(86362001)(4001150100001)(2906002)(8676002)(7696005)(70586007)(1076003)(336012)(54906003)(82310400003)(7636003)(6916009)(53546011)(966005)(36756003)(70206006)(55016002)(316002)(4326008)(83380400001)(36860700001)(6666004)(47076005)(16526019)(26005)(508600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:34:51.0896 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ced171f-bc22-4ff9-943b-08d9a4143306 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT058.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4139 Subject: [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/34a2e17afc46a0ac011f42293f61514430b247be Thanks. Xueming Li --- >From 34a2e17afc46a0ac011f42293f61514430b247be Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Fri, 13 Aug 2021 14:21:54 +0800 Subject: [PATCH] net/ice: fix memzone leak after device init failure Cc: Xueming Li [ upstream commit 96b25c496aadae16c548ea25c0267a73154dbd64 ] When flow engine initialization or FXP resource reset failed, it needs to free the memory zone and unregister the interrupt callback. Bugzilla ID: 752 Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling") Fixes: 7edc7158d771 ("net/ice: cleanup RSS/FDIR profile on device init") Reported-by: David Marchand Signed-off-by: Haiyue Wang Acked-by: Qi Zhang --- drivers/net/ice/ice_ethdev.c | 10 ++++++++-- drivers/net/ice/ice_fdir_filter.c | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index c153c7ca78..02644deeed 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2258,20 +2258,26 @@ ice_dev_init(struct rte_eth_dev *dev) ret = ice_flow_init(ad); if (ret) { PMD_INIT_LOG(ERR, "Failed to initialize flow"); - return ret; + goto err_flow_init; } } ret = ice_reset_fxp_resource(hw); if (ret) { PMD_INIT_LOG(ERR, "Failed to reset fxp resource"); - return ret; + goto err_flow_init; } pf->supported_rxdid = ice_get_supported_rxdid(hw); return 0; +err_flow_init: + ice_flow_uninit(ad); + rte_intr_disable(intr_handle); + ice_pf_disable_irq0(hw); + rte_intr_callback_unregister(intr_handle, + ice_interrupt_handler, dev); err_pf_setup: ice_res_pool_destroy(&pf->msix_pool); err_msix_pool_init: diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 4a071254ce..bb720d1036 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -659,8 +659,10 @@ ice_fdir_teardown(struct ice_pf *pf) ice_tx_queue_release(pf->fdir.txq); pf->fdir.txq = NULL; + rte_eth_dma_zone_free(eth_dev, "fdir_tx_ring", ICE_FDIR_QUEUE_ID); ice_rx_queue_release(pf->fdir.rxq); pf->fdir.rxq = NULL; + rte_eth_dma_zone_free(eth_dev, "fdir_rx_ring", ICE_FDIR_QUEUE_ID); ice_fdir_prof_rm_all(pf); ice_fdir_prof_free(hw); ice_release_vsi(vsi); -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:03.056563545 +0800 +++ 0021-net-ice-fix-memzone-leak-after-device-init-failure.patch 2021-11-10 14:17:01.760746991 +0800 @@ -1 +1 @@ -From 96b25c496aadae16c548ea25c0267a73154dbd64 Mon Sep 17 00:00:00 2001 +From 34a2e17afc46a0ac011f42293f61514430b247be Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 96b25c496aadae16c548ea25c0267a73154dbd64 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index a4cd39c954..0683296584 100644 +index c153c7ca78..02644deeed 100644 @@ -27 +29 @@ -@@ -2139,20 +2139,26 @@ ice_dev_init(struct rte_eth_dev *dev) +@@ -2258,20 +2258,26 @@ ice_dev_init(struct rte_eth_dev *dev) @@ -57 +59 @@ -index 82adb1fc8b..7ba65b9b04 100644 +index 4a071254ce..bb720d1036 100644 @@ -60 +62 @@ -@@ -651,8 +651,10 @@ ice_fdir_teardown(struct ice_pf *pf) +@@ -659,8 +659,10 @@ ice_fdir_teardown(struct ice_pf *pf)