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 B619FA0C45; Wed, 22 Sep 2021 15:52:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8AA6411A8; Wed, 22 Sep 2021 15:52:11 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id ECFB341196; Wed, 22 Sep 2021 15:52:08 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10114"; a="287263963" X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="287263963" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2021 06:51:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="533776124" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga004.fm.intel.com with ESMTP; 22 Sep 2021 06:51:28 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 22 Sep 2021 06:51:28 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 22 Sep 2021 06:51:28 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 22 Sep 2021 06:51:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YfGkNE24N8TsVjWMsLpWSqYqJ+C/uwQI3mQiAjU4YnHWEd3TtUDQ+yqzb+kJfcrCZiPS+T5xkzZTiRN96n53+QGdnToyULOO6+B2LgjRKjU139BWhpceOgJTjQyy9dBIaJVMT6wc73RKWc6bOhtllNhvI8yg1/3x6BtMBgYWoHUXn0bmBUzK28zTK2LoeZqK91Bi0jXfhK+DxGQcj/vB0bTnWtBSzte6eTNIMFcCY/DctM8cIAflDtKwrYsejH/0i6ddhp9E64a1S5pZSzckBCUzlwh/k/jsLRRDMAIEiB+dHhB6oDpMgAo11kUPIzLf6LZClNJw/0hyB3lXw9gK4w== 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; bh=t+xHvqfun6DYk/pK0UWLrbBlUn4a8YncdSnb+p5aCEY=; b=J7rSRhoh3sP7Kzs8yFFNwSH1zUykLPcX88LlVrdzNmiLm8fkFAH0XfNUvR6R3TDrxbvS6q4QICIjX/PsqiBXkYA3iPq8z/f/NlGgRALQlwWGnvPDxpHB8681OmBIZhTu8g20eGb/SZ+D14o8Kvj+3NBh2Fda0/UWmmGQzgWvuKBqhB1vYIJQ+V2xwYQIhuCoIZKdRZaOjl4iDfME1mUwsk7tRH6f2bX9f/8cn2JoYwvnnhPCJF2vEjtvteDa6hnUGrFj08Eu+fRnxxwGPsi+BQA6Ee83gyqdFztpAkSmQfNy4kIYgdviV8yxgnXmrIx8JIZT/GcyvqT3SDC9qtkTMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t+xHvqfun6DYk/pK0UWLrbBlUn4a8YncdSnb+p5aCEY=; b=MtFiPLnjyIwaO8m8GHRj/GIlzspY/cgyFHT+NIgajpRDok9Y4nVkLln1ki8AOZq+8X+Z+6KG4Y1KpangsrFqOZlIXcY5XHyzoAf0nVEZ8RmkD/mtxbNGDfOrx3B5tV//mrSJBwFsBpCqIO/PHYr+bTrLNNL24RvRsG8A+9AoiFk= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN0PR11MB5742.namprd11.prod.outlook.com (2603:10b6:408:162::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16; Wed, 22 Sep 2021 13:51:27 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::a437:5cee:7df:1fa7]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::a437:5cee:7df:1fa7%3]) with mapi id 15.20.4544.014; Wed, 22 Sep 2021 13:51:27 +0000 From: "Wang, Haiyue" To: Yunjian Wang , "dev@dpdk.org" CC: "Xing, Beilei" , "Yang, Qiming" , "Zhang, Qi Z" , "dingxiaoxiong@huawei.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 3/4] net/i40e: fix memzone leak when re-configure the RX/TX queues Thread-Index: AQHXr7X5XTR8bUhkIk6oaAjkeOrcmauwEYyQ Date: Wed, 22 Sep 2021 13:51:26 +0000 Message-ID: References: <4a8e530c7981069326a5bfffa0f59457022d11ff.1632315160.git.wangyunjian@huawei.com> In-Reply-To: <4a8e530c7981069326a5bfffa0f59457022d11ff.1632315160.git.wangyunjian@huawei.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: eeed4a93-dfa4-49ca-f88f-08d97dd012b5 x-ms-traffictypediagnostic: BN0PR11MB5742: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:989; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DZ8hk7MwPbw5A1RB/RLj549M64kTnuV86ehkBvtS3LuZxkg2+A6m6VdD6nAp2hVr43lN9DsVWB8H5SYBXS93Wew/wog+gBmv5GJ7Du2E854tHvPowV4Jxeg8ZzrUHLFbyTqVXwQaAOJhcCgylAWHQrvw+bYK0acAWG7yqdxCjrB5dbDPZDXrk+lLxcoXmh5YSuTlV0KdytQctwiLr7GZ5jT+noSzSbuV+0x6CFd/JCxavC2lVx9cMtJ4r4TY/DymRm+6n6r4hn2bQYlB1y8E7/+2xwhlFSjLIVHc2Yyb6NCfK7XnngH2/yKck4KILNG4kXE2u7uMMXgSjOPqrLjDzFeUKgEvM+giwcVUKguIsh0M5AZeAyCOArpFLby5jDtHf26mGpNPzqUxuux42o4XXaudZWZv0jxrl3BdRVSK0gnYefjkB2Z29nDbhmzbecoLLwwyJdWeyAbNFgimrXoInBbNwlbkBPmaib9bi/gijUgQjpTjmfQmrfV/RzJ5dvWL6bp79Xv7j8TH3Yl3nS9kKU3u65t1bxrfI/Bm9tlQuxHUAQLKKMZBZwn0E5BOTpeZ1gCweVdOE0fqLuWuzNZgQnz0T3q3M+XcvTah7YVFcQ9hb+b9+N3qrqA1Uk0OPR62dYhJAa+9Kce59tHXT5EX3zpgu81oE7FaYP26G8XMy1B/RXXs2DN7UzSD51E0EVsi00NvxD0yKOk8ik79ubu/jA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(52536014)(66556008)(508600001)(64756008)(7696005)(66946007)(33656002)(4326008)(38070700005)(8936002)(66446008)(83380400001)(71200400001)(66476007)(86362001)(110136005)(76116006)(55016002)(316002)(5660300002)(8676002)(54906003)(186003)(9686003)(38100700002)(6506007)(53546011)(26005)(122000001)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vFCG6wPV419X4mRB+t/jS/rSDMIgJnbYExlgIcWc4fMfTMSiuWPpQWmofGDj?= =?us-ascii?Q?H0ELyksC7dB5eq9pLNhxTrorzKlUrISlW38lWucR6WQNK18fMKP2iPfpw4e2?= =?us-ascii?Q?C1iy+0stF6f7FaC2gk4krJB6Pe0gDWBMawyJLiusc91l+ESdCrUVMWD0X+g+?= =?us-ascii?Q?FrFq+Lmc2oou4FuYDPagwvoTcbNHs24IjaheHLKlI7896VSkaVswgnasLLaQ?= =?us-ascii?Q?sKLOnxl8tIW6lwM81QAtRwtxCZS4x0bP+s6unPkvgf9i3gOdaYQH4PWoQejC?= =?us-ascii?Q?47il6YS4VTGzX3wpyauCNcpg+GiYDdVSeqfmN5/6XyDqHVrIOS++8hqyHLfj?= =?us-ascii?Q?RmRMYjgcLpPfx5IK0MXL50Lp05pn3j9FVrEQSdALHKsHvUK3g7Rcd8wFzsN0?= =?us-ascii?Q?oR2sLopnRClM9rUGYpv3dR1T9NaNASHClVTY6MSzR8SEdTqdUfJO5rq3s509?= =?us-ascii?Q?z4ZrDlcIGJ0arJ480An3M7al4Q4CU4DhA7zG4+aoIUC+i824L1Aa0twF2+CK?= =?us-ascii?Q?qAxchMnoEyQ1h9bLgpX3xFTlKeh7QZl8benhbqT2UJaKx9oY0S2isbj5CzAk?= =?us-ascii?Q?BxAQcVxeq4NCteCDUOHU4a8QITe2uGrso3Jb2SodpoQH2bRhqDI04HHJFZaY?= =?us-ascii?Q?Uso3W/k7rCSKLfYy+CdV8KWicpWV70DisgJ6kKvpQBnt0IG0SuqNDKMCaBWy?= =?us-ascii?Q?FsSD4U6Js9bCCrYKxx1W39OdiFKRiUmPKP4ZHWGrMqWEDjmpXcBpD16iFXc6?= =?us-ascii?Q?Qq7y7uCEsthw/0whYjo/GcOdQzlsvTfKuti95PIcXXkjmCuRfe5wFwT90DMV?= =?us-ascii?Q?yRtLAEiuzx1JDapKFHdJNETiF9GNWwmCVaVb6tIarh+cbK+i/EL4cR4jLHta?= =?us-ascii?Q?O7QD7PFV6kxsdD4fU2EAUSMc4ozO423oViTso9OQr2mgBKZ2J76GAcetmZ+k?= =?us-ascii?Q?Y+fqgvgAuSo2c+0Ya/gxU89QeN/Z1Fv/bM7qgzHR8/T6GMpXiyXqqVxy5zgX?= =?us-ascii?Q?hwAHV+jLvEQlDQ7EzdImWbvSaYXYR3lLTaHHPp53NCIaJNcYQ/uJF5gAQlSP?= =?us-ascii?Q?pvddJJORWh6JvqXIKi8w8pwdh9t/LqXmONPCRQ/VLhMY6TeKTua2MmR7lHew?= =?us-ascii?Q?N6YwpLUymTIZqWx3G/Sx+E6KdDcNmfLaea1YRpDtNHGKdLBmOb3fu5V56B2p?= =?us-ascii?Q?YMs9WBBYybyXw+sJk9BKPilCSN5KL6+o2GnpJKSv9Dd+LfOP3x0CdonBJ6WR?= =?us-ascii?Q?n8ry6Dxt/nHFiY5UrPatTic7vVsM1pM33d2b1xco6U0S6eTEqNc9lsmmEsTQ?= =?us-ascii?Q?Sye0b+uKFytb+iTPT8QJkYpR?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eeed4a93-dfa4-49ca-f88f-08d97dd012b5 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2021 13:51:26.9371 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: b13LigXRdcPFvaC0RqaKi3tstZdNsVuhu1e7PYlPHRVDkbiDh1GYTGHsPFgeMQ5A8PZfoBNtwVm5mVtYoDTdLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR11MB5742 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 3/4] net/i40e: fix memzone leak when re-configure the RX/TX queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Yunjian Wang > Sent: Wednesday, September 22, 2021 21:30 > To: dev@dpdk.org > Cc: Wang, Haiyue ; Xing, Beilei ; Yang, Qiming > ; Zhang, Qi Z ; dingxiaoxion= g@huawei.com; Yunjian Wang > ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH v3 3/4] net/i40e: fix memzone leak when re-con= figure the RX/TX queues >=20 > Normally when closing the device the queue memzone should be > freed. But the memzone will be not freed, when device setup > ops like: >=20 > rte_eth_bond_slave_remove > -->__eth_bond_slave_remove_lock_free > ---->slave_remove > ------>rte_eth_dev_internal_reset > -------->rte_eth_dev_rx_queue_config > ---------->eth_dev_rx_queue_config > ------------>i40e_dev_rx_queue_release > rte_eth_dev_close > -->i40e_dev_close > ---->i40e_dev_free_queues > ------>i40e_dev_rx_queue_release > (not been called due to nb_rx_queues and nb_tx_queues are 0) >=20 > And when queue number is changed to small size, the BIG memzone > queue index will be lost. This will lead to a memory leak. So we > should release the memzone when releasing queues. >=20 > Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yunjian Wang > --- > drivers/net/i40e/i40e_fdir.c | 3 --- > drivers/net/i40e/i40e_rxtx.c | 8 ++++++-- > drivers/net/i40e/i40e_rxtx.h | 2 ++ > 3 files changed, 8 insertions(+), 5 deletions(-) >=20 Acked-by: Haiyue Wang > -- > 2.23.0