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 8EFD4A034F for ; Wed, 10 Nov 2021 07:40:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8646740142; Wed, 10 Nov 2021 07:40:29 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2067.outbound.protection.outlook.com [40.107.102.67]) by mails.dpdk.org (Postfix) with ESMTP id B278A40142 for ; Wed, 10 Nov 2021 07:40:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l4GeoCsBj1szDAWxd1mE3xcRI6UxuY8I8xqsJzvGcHcW6T4/VXkhOJLAbGq0HBZcyAAr/kCrQHGvVM11W4rT5ea6DvzMaQiKiXtGvcZn9rL8sFryfLSlKuSNDunjO6VO2FL4E2TmQW3swW4BG6QsFjr9D0Set7KM+Jc4M2uKdNGUdvaYEuU33t9L3fFsconcbRYKAIeU0nTsg0u8WYRz9eXPve724QRSV4qzWVzgkY44JVAHt/putezA6Y2bqZHRPqId8tODlfsRDvUoDHSZpPSeSJiFanjPvlBjP3SzqHacZVdHapdyMZ/RfJdq7amrVe7ii4+xo8/lm6BP4A5FGg== 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=A/m4sidE/yXdV0OSXaZOJGQEOCUBC9Z0sWH7FGlSpLA=; b=ARCwhUaOAy1cvTY8WWQdLfWNi4RMEBkCl+l7WWVxaG6Mh5iUMmQBa1OiDlFt3YzyQdoujLRgWTSnLWogSdUO0ECJUD0+CUyCMZzkB7dLHQnazZMumVSvkq8AredZYoA06jCd1ZIV6zd7i7OhAVj3Tc4g7xb/dpL9Pph2R2SWmzfgOfyYmpa6sOvPvwF5r0LPKYQiNLZPXPJNsMzTJDOqNunhVgegMlFjIdZa2tcEPbq0ZTO+AU5RHXhvqB9fo50SE1r+el6ISjzx6t1JcyisR7BCgXlNcesk78uDp/hEyk0UlWfwsUhNQZK/CdB2ZCB/IDUPote8pRF2PNIgT3HPyA== 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=A/m4sidE/yXdV0OSXaZOJGQEOCUBC9Z0sWH7FGlSpLA=; b=pPj6rwuqU0vIlWprN9X2ueuiwZx6j/Qqp4SEewChnnm6OWgqv/vYXhnlA0/z0RBhap3xZsmTCcFRJb6mUe8rsKtPXJbaUwRZgpg6IDNfWqkt/1bHdaEbrv1wj0Hq7lr6Eqo3hPzqu2WuzXDN3f+2LMpjQuZjf01KTaHoF88x0BI5vPGXWVCVDmXF3RgDsFxcutQ287eMLsoqvjCaAYKjJ5hdS2KMVKutN6MOIrW6GAsLbXtHcI4Si7ksbvgWz0Wa4566EP6kJYRYFkAbIjlbUIQ7BH/I2i3d/ZPoflWnaUT/RENiSdxUIGFn7KZKuTs+aMKBKcg1KnlpjVM37+2XhQ== Received: from DM6PR04CA0002.namprd04.prod.outlook.com (2603:10b6:5:334::7) by BY5PR12MB3668.namprd12.prod.outlook.com (2603:10b6:a03:194::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16; Wed, 10 Nov 2021 06:39:09 +0000 Received: from DM6NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:5:334:cafe::ca) by DM6PR04CA0002.outlook.office365.com (2603:10b6:5:334::7) 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:39:09 +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 DM6NAM11FT014.mail.protection.outlook.com (10.13.173.132) 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:39:09 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:39:07 +0000 From: Xueming Li To: Qiming Chen CC: Luca Boccassi , Qi Zhang , dpdk stable Date: Wed, 10 Nov 2021 14:29:05 +0800 Message-ID: <20211110063216.2744012-62-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.6] 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: a8580925-dc73-4ad4-30cd-08d9a414ccd9 X-MS-TrafficTypeDiagnostic: BY5PR12MB3668: 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: Tq2fsV0npd5Ny4T2WVp1mItITF+bBTrcl7zMp8nP94oslnnHtqcGQz7MuOlV6bnwlzjpMg8RtaTHvbcgU21E3HD5Ac1HHZBERblomNUj/5wt0KRkodwxtS+O6r+ia1mY2uZF2pLjKd8F2y2SBHPAGwYghrADrAUNgynm9bhZ5G97zxsvg/XMR5A9Ni33UmVQyjIRzwwyiIZeHkYGV4trFrQO4m2J0gqspwKtwgK7sFNbqk+67+6t75dE/lpxkChzsP14nrljXoHh5BC5/vZDpN4TGGJ7QoaZ564wC0yFjSrzZQaaUvy2/LiJyU7e3JU6/bkUyB+V5RyePWZPnfZ/C8Wu5NZtx9/kMKxDSd/+yyGSZ9VQHAplQIn/bQ80mQhKKA7nPoxRNj0o0CRRHr8XDIhYeJAJe+BAVpbFvymzd0XeE6ZbyEoqZdpqib/o9zJYfLTXFPF8ha2VL/52J8gan2SswoCFR81gmSg2vuekMHBt2qHUQq3qJzYgYBFJGMde1tCPj/xb0KcKwdGYXND4xpxCgD+huCVgslKh3zF+uD4HuH8/cUaLeT9T4Kg4vbrQI/pbqdr93/K1BiqLZGlt2ii4+24XHcF1Ky80yloc/vXYxLg+kReP9wzdjTICOdV/iD1ZjUAuMbNUDoSJf3XGBRLXJvL5kOI7tZCANBC9eUiUF33bd9km107v9L2kQZuotQIUkxgPvbUgBvHdysUeHoZUt4ukuWv3q0Dwgq1a2yaa8sFW+YUzyxGcOkcvtrW/vsfzPJeV2tif2dN6zQKvif+2eKc8wxJFOrn50nj8bSRedIT1mHRGCOjI/Lp6Q8IVnGvYjicVnsTQWbJDWGu1eA== 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)(55016002)(86362001)(54906003)(70206006)(2616005)(26005)(5660300002)(53546011)(316002)(36906005)(426003)(336012)(4326008)(186003)(508600001)(8676002)(8936002)(36756003)(36860700001)(6916009)(1076003)(47076005)(2906002)(70586007)(6286002)(7696005)(966005)(7636003)(82310400003)(4001150100001)(16526019)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:39:09.1463 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8580925-dc73-4ad4-30cd-08d9a414ccd9 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: DM6NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3668 Subject: [dpdk-stable] patch 'net/iavf: 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/012f9cfceb42f1f6c7978dbab893844865590aac Thanks. Xueming Li --- >From 012f9cfceb42f1f6c7978dbab893844865590aac Mon Sep 17 00:00:00 2001 From: Qiming Chen Date: Sat, 11 Sep 2021 09:47:09 +0800 Subject: [PATCH] net/iavf: fix mbuf leak Cc: Xueming Li [ upstream commit a38df1edd6324f922ca46a043e87b2489f7bc17e ] 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: 69dd4c3d0898 ("net/avf: enable queue and device") Signed-off-by: Qiming Chen Acked-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index e1108af7a9..248e3df03b 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -192,6 +192,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq) 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; rxq->rxrearm_nb = 0; -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:04.814584567 +0800 +++ 0061-net-iavf-fix-mbuf-leak.patch 2021-11-10 14:17:01.824079806 +0800 @@ -1 +1 @@ -From a38df1edd6324f922ca46a043e87b2489f7bc17e Mon Sep 17 00:00:00 2001 +From 012f9cfceb42f1f6c7978dbab893844865590aac Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a38df1edd6324f922ca46a043e87b2489f7bc17e ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index e33fe4576b..7240e70f9e 100644 +index e1108af7a9..248e3df03b 100644 @@ -26 +28 @@ -@@ -225,6 +225,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq) +@@ -192,6 +192,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)