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 C0F94A0A0E for ; Mon, 10 May 2021 18:05:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9B4E4003E; Mon, 10 May 2021 18:05:29 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2058.outbound.protection.outlook.com [40.107.102.58]) by mails.dpdk.org (Postfix) with ESMTP id B684940147 for ; Mon, 10 May 2021 18:05:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EPpVpGvoFF1jVLO36d5z3A1wWjLPymMqn+kDkqYRkVZTQVRJq9BQ/wmDCaxAeAtM1XYCmQsRMIf/O+peuodwFFGFshzF3t44J04wRVCCDdk/fXFFXqRQ/hGCWBPZsZ7nDrYP5KoVf92NtRhaTIZ3YcPTZK2AhmGgZVJMMiJclPfCTaeLlXIjYE9NkxzGww6PAJywwonQQjyG2oV/sHKFgEK8Fg0aESYIZK0A9kHWo3KTjbz7ZslM5M9VxH3pDt78u46YyKMHoQcCaSAwBtywKwgkOkzNp25WY2J2ccE/bo+SanzBPLJ9LndMqHc1d5no8TnTGlrGyWbBImzetJabxA== 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-SenderADCheck; bh=PEPOmYsw9YsfBjo/vkLlEZYkmFoUQ2iUs/dMz1JgDpg=; b=eTpanvT2cYG8LL+tIe2Wmzrt/L7/TIGwsrGYZ/61pmpWQaCxp6LHKYkOM4CzkwyuerJ9teO6lpK28LGcJzgHOsUxm/WzDfFZGj3KIdi2KozTKyWO00Dh43YAiitGQb6NjFhp2JDvca/E1SDfnbVFi10U4/n6VdLRKNw1sclnnrow0OtJr+t6LdjYVKUFEEijxnLCJrLX5JC8kEZQ5vdLyqM6GEfGKIE21uN3DHpiS6YKAhTdWcL6MmdYrtxphDiMkMwYQVFlakKf2cJXum2AH7S1+D47bomBdJaQ78P/hbEsvqghZt29ufSW3Dgad1IMEVocNqZg9K7pP7H1koucdQ== 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=none sp=none 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=PEPOmYsw9YsfBjo/vkLlEZYkmFoUQ2iUs/dMz1JgDpg=; b=WejjW4RWWtwQFS8IxRkxb+P5+6yLKndg4CwoBSPksKVkQr/PSalCJVw/GafKcfXEvrB9nGMAl5So2uv40fw1yQbCx6D012f9hMhkW1KhIs9cq5y8/YZQQTq4jE7V9V42FGzoW12UqXE+HpZ/MQlFqmuIEui8dYhSRP6mkoPFmi3im8EaG0efktuwYubfMZJj/GB25ebIzSQqoJWBbRXzScbDiVrN0KGAVPbXts+72EWhz1zyt0KJgviFvqY9q1IbeCpsRUswRehYH5E43NEavaMEpvllCqnnv4dPuO90GOj/nNxBRPGPRMsiF0bili5Q8eEIFDbmqFsW/ui/Do1D3Q== Received: from BN9PR03CA0104.namprd03.prod.outlook.com (2603:10b6:408:fd::19) by CH0PR12MB5283.namprd12.prod.outlook.com (2603:10b6:610:d6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:05:27 +0000 Received: from BN8NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fd:cafe::35) by BN9PR03CA0104.outlook.office365.com (2603:10b6:408:fd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:05:27 +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 BN8NAM11FT043.mail.protection.outlook.com (10.13.177.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:05:26 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:05:24 +0000 From: Xueming Li To: Tengfei Zhang CC: Luca Boccassi , Ferruh Yigit , dpdk stable Date: Mon, 10 May 2021 23:59:31 +0800 Message-ID: <20210510160258.30982-22-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a63110fc-8a48-4504-8b9e-08d913cd6d24 X-MS-TrafficTypeDiagnostic: CH0PR12MB5283: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z9ZVFpdDdWMSCsAj9JWtZ40gmO8SxbwwgjnA8NqmYvAXiI/tRxQs/kr1p+jgWnS1tOO2i1jYTKtBWbdTahiOv/Sd50P1AKjcejc6gmAmmnpQ1QqmafLB6DO4JxlQcJ5O1kziHikUzMJHGa4qEkv0sc7Sb0b0cgziGnvDaAOWLwuh1gWYw2tMC87vbaGw6Yto+8E45ztwXSLekUnQh06m2rt0bc2QiSYhZG6O/yoWBMuKp5Nhg/NbQKBtr4rb1o9m5qArDRmHoAhhqeYeTMlTHjTnO1DhaAtDVJV7VM6Y24/ltytHU0FoaqCxjp2fpFZQnaGtjSZs79AH6DZBp438+OKz2+ij8m9RF+kTCwQFt/pIAV69BrXPhuhfXpUiEJTT+/ua1fqKWMb0Jg518oMCDcs66HTjMZwmAYTR7zaX7CsiJ9uiM5B7oZvPB9CVYdSorJ+p2f1d9ydbRrnRDsyp8tKcnTpoKMa7evnF4xXV/e8gK6iavBStjB++h8OPUdeKGLfVJ9WmNqIyPF+WxEJfxYWfbepzN83QOttsqiAr8fEbzU1AEhxuPwQI8s9VKpH3MFV9lw91357k4WKCGFoUmnY2qbLiiju/jrmDCd6dn1uwVjjgyFSUbAIFEiyv8C3u5/CPspv9pGx855mhL6MUcP+9Cq45fx+3AeClxMuV3+69opbotg6Ueks7euR7LYfEyBdIgmkFGXRjPijps94dRoGQh1knxI9y91NS4AtM+LJ5HxeH39+dPhqwElPwqdft 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)(36840700001)(70586007)(1076003)(54906003)(70206006)(7636003)(966005)(356005)(7696005)(82310400003)(8936002)(26005)(53546011)(8676002)(36756003)(83380400001)(498600001)(426003)(55016002)(32650700002)(5660300002)(36860700001)(36906005)(2616005)(16526019)(6286002)(4326008)(45080400002)(6666004)(186003)(86362001)(336012)(6916009)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:05:26.8091 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a63110fc-8a48-4504-8b9e-08d913cd6d24 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: BN8NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5283 Subject: [dpdk-stable] patch 'net/pcap: fix file descriptor leak on close' has been queued to stable release 20.11.2 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.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 05/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/44e87e7c102af00f688992b09487b1dd33c47506 Thanks. Xueming Li --- >From 44e87e7c102af00f688992b09487b1dd33c47506 Mon Sep 17 00:00:00 2001 From: Tengfei Zhang Date: Tue, 2 Mar 2021 16:51:30 +0000 Subject: [PATCH] net/pcap: fix file descriptor leak on close Cc: Luca Boccassi [ upstream commit e412a138db918019cbd883132f81860951515a9b ] pcap fd was opend when vdev probed, but not closed when vdev removed. Fixes: c956caa6eabf ("pcap: support port hotplug") Signed-off-by: Tengfei Zhang Acked-by: Ferruh Yigit --- drivers/net/pcap/rte_eth_pcap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 14a0072d86..da4dfe799e 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -621,9 +621,11 @@ eth_dev_stop(struct rte_eth_dev *dev) /* Special iface case. Single pcap is open and shared between tx/rx. */ if (internals->single_iface) { - pcap_close(pp->tx_pcap[0]); - pp->tx_pcap[0] = NULL; - pp->rx_pcap[0] = NULL; + if (pp->tx_pcap[0] != NULL) { + pcap_close(pp->tx_pcap[0]); + pp->tx_pcap[0] = NULL; + pp->rx_pcap[0] = NULL; + } goto status_down; } @@ -755,6 +757,8 @@ eth_dev_close(struct rte_eth_dev *dev) PMD_LOG(INFO, "Closing pcap ethdev on NUMA socket %d", rte_socket_id()); + eth_dev_stop(dev); + rte_free(dev->process_private); if (rte_eal_process_type() != RTE_PROC_PRIMARY) -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:27.284370200 +0800 +++ 0023-net-pcap-fix-file-descriptor-leak-on-close.patch 2021-05-10 23:59:26.350000000 +0800 @@ -1 +1 @@ -From e412a138db918019cbd883132f81860951515a9b Mon Sep 17 00:00:00 2001 +From 44e87e7c102af00f688992b09487b1dd33c47506 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit e412a138db918019cbd883132f81860951515a9b ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index 2766745a71..28a5027315 100644 +index 14a0072d86..da4dfe799e 100644 @@ -22 +24,2 @@ -@@ -682,9 +682,11 @@ eth_dev_stop(struct rte_eth_dev *dev) +@@ -621,9 +621,11 @@ eth_dev_stop(struct rte_eth_dev *dev) + @@ -25 +27,0 @@ - queue_missed_stat_on_stop_update(dev, 0); @@ -37 +39 @@ -@@ -821,6 +823,8 @@ eth_dev_close(struct rte_eth_dev *dev) +@@ -755,6 +757,8 @@ eth_dev_close(struct rte_eth_dev *dev)