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 82299A034F for ; Wed, 10 Nov 2021 07:37:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72EBA40142; Wed, 10 Nov 2021 07:37:02 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 0486340142 for ; Wed, 10 Nov 2021 07:37:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RxlqtIM0RcbJQ4ga8p2P6hJSYAQaBBoR2GnN0jlRET++ptlrZhPsf9D8Yl2Cd3U54M2/spGwv+GfmuEVSV9wI3yyT2lYQOhTuLiZyhhibNZJvGbTYqy72iMSi8fo0lbXInuSWCATWLnXGl7PW4k0nJhNiNrKl2IlNGvyg5e1wEAuRna79rBVZNMnUXv9qu0uRlOXdkuWnRfBWTy2kaP9AO3CkIki5/OS+QOBCLoqEVbNl2k/Babmul8oKuV/H76BdQlLmYOBoIgd8uUdssSZsIav+fGnxc+P1UBVwFf7uf4x66gErErXcUoVwiG9YJfZHVEvYaSTvLaKAsi5uH0iRA== 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=1wPrVejBsjp7lgkzKO6t63UZWo5oVKzn6yLjc3KAYkM=; b=OTBMn6ajjUGD1nJV3T1W2m5mJD7iP3/ccIVVQl0Gxt0N6x/LaF1DJgyWjkX8057VNfRP+XC+VDfmfz6bwxm3Surkxld62MBEQ+AFQxCAxqJYvwQLfsMSqMAuW+BIpMbMuO8GKghgJ4PEOqsZgPTLX+jyIui/PiCSbPbJBrldD2cU/mcbtWt+cW5MEoVddc7jdUy1r+zkOcdVZ0KA/mvS0+j+Q0h1TEm/3SB4av8lbNK1fRvd2QMIhpMPYMyMH5awab0v9y7B1LAA8QjcAt6KDFr0KgFvx4XQtwkIZwLkc0egldu9vrXIKWFiX34Hq967fW7DIiPg3OcGTNGon35J6g== 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=1wPrVejBsjp7lgkzKO6t63UZWo5oVKzn6yLjc3KAYkM=; b=OkhjPO/oJIP5qLs7PFrirxOqYnBh0mFq+D73Bok5al+kOdNLEi5se/8M3vbwXaUcdhOPdsxNdVViltgWQhYlIk1yleQ6Ja86SCFOmXvqh9D5EDHDMnl5ABrBpBn8e9krHiVgGyNmo3U+zIgDtZiIl3dpW396Zv1ZqIpkNF8TGQq/LgVVcrTBDvgOVcbXWB1rCi/iXUmC7heLAcFC9REA2uQPU3kjajcR95knm1X8464uVRqFUtzgXctoPFe371U95frhwVufHFX3YcB7p1F6XQS8ZZ0if4nnY7Yjm9u+uyMbN2yxUM9n3/ARpBVLQ97UqGlARKo/OQ9fgfhyawPmmQ== Received: from DS7PR06CA0023.namprd06.prod.outlook.com (2603:10b6:8:2a::14) by SN6PR12MB2816.namprd12.prod.outlook.com (2603:10b6:805:75::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Wed, 10 Nov 2021 06:36:58 +0000 Received: from DM6NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::a1) by DS7PR06CA0023.outlook.office365.com (2603:10b6:8:2a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:36:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.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 DM6NAM11FT027.mail.protection.outlook.com (10.13.172.205) 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:36:57 +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:36:56 +0000 From: Xueming Li To: Qiming Chen CC: Luca Boccassi , Haiyue Wang , dpdk stable Date: Wed, 10 Nov 2021 14:28:45 +0800 Message-ID: <20211110063216.2744012-42-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: 87acf9ad-8c45-45ca-8715-08d9a4147e9c X-MS-TrafficTypeDiagnostic: SN6PR12MB2816: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OZQlLbBxoP/V+x7M0JBDbXZOj8drVGAMfiRQdRDv3YLgx2D7HNq4U5nNJC5nzDJWUaXJAUvX5azae5X4FxM5IVFcYkBBwXerjKVCW3LPbduU87ls26f2teywNMHHapznVUOBIrUUp135ayhzu3DLs3SRCjRvtDxSIT4ZFbc9bm67cPUvfb8sAGt5YvIhhepRBrJe0XY4tl+FVlFFr60HBwdHve6uijvEo01KAaVjXPVWLcfBFLIyZkqi5bKQisPLpz2RCpoaNBsPCSNoXpL/N19CGbHKPza5b0oq0QS0wG+u8QIagH3mX/9QZ7BaWwkFas2SdttHJSjQCZkbshWvlHiLOVA18E6GwZnQLNnf8uxpjDeZ0Cb2yYNmt9/cl45SUKeRZAHw8e7eGg5LlCE+OZXUZGRlENSf90LEhwRqC2jtgWm89un1n4daqcPT6x+RUHG1cgvnaGPcnQ2ylRhMQJfLdtZ/FoGc4Lr+80pakE28YAZxZid6d/Xwv+8xe+vVnKqcvPhwxndaB0NuJ8FWwkIPsWa8h3zR5so8s+p1eFLymQnghf3dzG8mxGIw7BbrJKTEu6EyRsCqdUtwqs5aGEcxLL19ewCM2dXnYe6KIVDwrovtKp6gFIoFezcYWdJjg1SOxqtXtAhGA96mYko3oFhmcQdk5KYBG/j4WmlzPMnynS30tOzHypo8jcHucep9jNOvxa32WYVi4elDR/s5bES/OrAMIm7C3rymXNwMZAz/xnbbn6BQLqBpgT/fJiDUeY9Tgu3W5rIvN7FM1BmF7IRSlsuQc/7XGvm9LSxiIzvuGBnWA1xJQzw19xuHmrRJhlbkxq1S8rtVf11tRClY5Q== 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)(2616005)(966005)(86362001)(4001150100001)(1076003)(8936002)(186003)(356005)(6666004)(4326008)(8676002)(36860700001)(55016002)(16526019)(47076005)(2906002)(5660300002)(26005)(53546011)(70586007)(70206006)(336012)(36756003)(426003)(6286002)(7696005)(82310400003)(508600001)(316002)(54906003)(6916009)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:36:57.9105 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87acf9ad-8c45-45ca-8715-08d9a4147e9c 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: DM6NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2816 Subject: [dpdk-stable] patch 'net/ixgbe: fix mbuf leak' 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/d9958c190766e659e9f3d9b24d3331c147390096 Thanks. Xueming Li --- >From d9958c190766e659e9f3d9b24d3331c147390096 Mon Sep 17 00:00:00 2001 From: Qiming Chen Date: Wed, 1 Sep 2021 15:22:37 +0800 Subject: [PATCH] net/ixgbe: fix mbuf leak Cc: Xueming Li [ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ] A local test found that repeated port start and stop operations during the continuous SSE vector bufflist receiving process will cause the mbuf resource to run out. The final positioning is when the port is stopped, the mbuf of the pkt_first_seg pointer is not released. Resources leak. The patch scheme is to judge whether the pointer is empty when the port is stopped, and release the corresponding mbuf if it is not empty. Fixes: af75078fece3 ("first public release") Signed-off-by: Qiming Chen Acked-by: Haiyue Wang --- drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 3b893b0df0..3d983d4db7 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -2948,6 +2948,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1); rxq->rx_tail = 0; rxq->nb_rx_hold = 0; + + if (rxq->pkt_first_seg != NULL) + rte_pktmbuf_free(rxq->pkt_first_seg); + rxq->pkt_first_seg = NULL; rxq->pkt_last_seg = NULL; -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:03.949497390 +0800 +++ 0041-net-ixgbe-fix-mbuf-leak.patch 2021-11-10 14:17:01.797413358 +0800 @@ -1 +1 @@ -From d54b51efb6ef12b8cdfc7316316d99e2a762e1cd Mon Sep 17 00:00:00 2001 +From d9958c190766e659e9f3d9b24d3331c147390096 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index c814a28cb4..bfdfd5e755 100644 +index 3b893b0df0..3d983d4db7 100644 @@ -26 +28 @@ -@@ -2981,6 +2981,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) +@@ -2948,6 +2948,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)