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 5EE31A0C45; Wed, 22 Sep 2021 15:51:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0898E41198; Wed, 22 Sep 2021 15:51:18 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 6794041196; Wed, 22 Sep 2021 15:51:16 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10114"; a="284606434" X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="284606434" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2021 06:51:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="435440404" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga006.jf.intel.com with ESMTP; 22 Sep 2021 06:51:15 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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:14 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:14 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (192.55.55.70) 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:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m/Z5nkWbTmPP872yhYwGMlhdBWIasAn9FU32YIChBRALznEv1R6iOhRKzgBxlaeDiXEQJoIekIQA/tItKDFM28+HEgy0xcELac/hVW7vXDcgCOP7ampSY7WjWtmPeFgkIkUzVU3f69ILj7lNOQ7ATjOlfiKouoeD8j4hKuGN6taOLXK3Wfr0n8cCDQzZWdvGP/bNjd2rPaRBJ2RRHh5bFDvhSbj245AX+ecHHO5cAT2PiwS8GfaXchMmYNJ6XCM2jr4ikFqcNeZ6yR6hCoR/uzx+Lu3cY8Gdbn37K/8tjyLYwZp/Zbgv8rIYBKGpAbypZtrtutpCsNgtjoJhyseJ1g== 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=TW/X7mlYH0/iPbs0ohrNs4flj6m7Prj5O469M6vXULo=; b=IqNgTbVrvbO8ZNuiliHr0eJKwXm2f7sPai/c6dShicIYl7dKJJFnlH+r0KeHebVWeDBkO8HGW8Vl5b9piZ9IpLQUEcJCPg2luAhocx9k2ZamiSZvMlZtdsMn8GDBPkExcYf49dJietstYlIWnpFU3Oc3HyWnTvJ5DopWAhQHcelEHLuwoXElOxQyTaU7dAJlWhv2B/q79rgM5UEjRBWENOlHiwxTYMoFuomaRDsmAV8OYWblPH+PXIrBmJe5tFuDBHjmWTMl4ylUsjtVaNtvcUmiGr+s6A02hbzgO6pdpsg1/AgLLrNtCe7BhjnVq3eqcr4lIdsNEny7yQUU4DEGvw== 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=TW/X7mlYH0/iPbs0ohrNs4flj6m7Prj5O469M6vXULo=; b=FdFAUlS92QliGvSxdV/kXJ+d1OoXcCEBVxDPG69uhpPi8x+v3WSZXGQA5unvlTL+eqUAG/dxQQWUkxEpfwN+hRp4SkGA5McTLew0hhiLA7bp/nAdhC8DCrZLAg1vJ+GFkM4q9jlJh0PsZWuI9nITUsdkuGqCbraiz4xc+4DWVJ4= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN0PR11MB5743.namprd11.prod.outlook.com (2603:10b6:408:165::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Wed, 22 Sep 2021 13:51:10 +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:10 +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 1/4] net/e1000: fix memzone leak when re-configure the RX/TX queues Thread-Index: AQHXr7XE4jQzt9pn3UWN/7JS0YxTdauwECmg Date: Wed, 22 Sep 2021 13:51:10 +0000 Message-ID: References: In-Reply-To: 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: 71c3c8a5-74f5-4020-6689-08d97dd008bd x-ms-traffictypediagnostic: BN0PR11MB5743: 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: O5OJ9TKIe6d57hG4qOz5q5akqwr9jTIyER+vNXNmCJDrLLwL45y0OhMqQPFwWeXlytF7wgkDTlVjXGmaN7KADeQ8XHjlREl/wx8B3Rky9HJwphc1RIoA3TI85Wlgn6Y8zgaTbcB5on6fYpI5H4o2MFSDIzDvhicScvLWpb8lxDNsdlRSXWktuvfzGiDcD6VzxY5bMhBVELQ3Bd2QMmSyFr2K5X/ZgXju2VWMsaqeG+dRsVGqgPaIobltcnK/lij9atpWAqqCHiI7Xgcp7j8gR/JXn81w97DSsmKU1z9Ln6n0tQ/WQtYI0emtgC39nP7r6F5cXAtwN5Hv207LOlKPkmqpx/oIrfIepR+leIE8IL5Y9Wa0PBA2qg2cIvKj7/2FK1WbgbDo0sdH9z538wK5dC0wO8jc/2x0k7DcscF7Pd10B7cKP0ql6DIve38FhHN3lZlWW18+DLP53MN3UkWULz0QFKab/Yue+5OACoRL7xhhxrEz/3Go0mBiMm/GLU25fyPxcB5AXNgZB3/o08o+r6xIUCXh6jU2fHpiAOkJMOOXAUa3ZewVLvSkcZoZhIkG6dPNT5y3LOkwJEdCB+gcRHSPb5KYfvUuGJRPyhaBnmfQWe/VWvZvTqBghM40uOE4KEo5kptDki8m+jZZF4yoVP2JRlitvjOjtBLfdV5zCKu3H4jWhYaJbQR4Ka9IPm5qyGur1V7RF5RSQSnsVJKZkg== 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)(83380400001)(9686003)(86362001)(508600001)(8936002)(52536014)(38100700002)(66446008)(66556008)(55016002)(66476007)(76116006)(4326008)(2906002)(33656002)(64756008)(71200400001)(8676002)(38070700005)(316002)(53546011)(110136005)(6506007)(186003)(7696005)(26005)(54906003)(66946007)(5660300002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LAv1I2+6jefKqYOaudnU9+1q6EB++XWTjoLD5HFZZEHWFApu5Bxw0llwJqcZ?= =?us-ascii?Q?iq8+kfHBtdt6a5cUYELMvMDwx2041N0kKpGiWxXFIBQa7g/2JFNARgO0au+6?= =?us-ascii?Q?2JElgaoiPVXXGhdJk9fvsdnAvarzNa0ZqS62VFbdX9w+arhfoc37G+A9JBFt?= =?us-ascii?Q?I7HKpgtpd4+qahoDLG+jB7dWkOikPDQEQo8B9/pZ7KjxLgKP7l79J/xBWua9?= =?us-ascii?Q?XxWAwnaLLw31WkCZu233di/OkC0kCjyc5JDKaIHW5MjTGkFoW/QPH/5H8zlT?= =?us-ascii?Q?yh+Utp1OOceVaf0jeFiPMLW9sFoM07g1972sS3fsEUNismaJyZMhx4vmcyc8?= =?us-ascii?Q?JWeSCLDUuVUpCSK3NuSuFJ5GeihRd/4mxCI3MpSICyQblEoDTpFuxgWDk3fp?= =?us-ascii?Q?9QVbYtMopc5/l4AJ59rRzvsJzl5K+oJcz+djLXU+LWLgyiXSCIRM79SE2ku8?= =?us-ascii?Q?/zuv2inhlCNXEd+acyjCdKRdBp79uZ6XsiGoiAXJO/txh1VHB1Lrw8siE6ZH?= =?us-ascii?Q?G10Xf7f3H5XM+vwZ3tZ0fk0CUv9daJfy75BvTkM53UGvdD4ehCYIFw8Um05J?= =?us-ascii?Q?PFeYUOHfOE9QV6cpDqfW9FAW0381lPij5KEprOfoPY8RlIj/jWfJbvl2l/zt?= =?us-ascii?Q?SSAXCRSytbTJxu5nzdr3wOe8UIIYWpyW1A58WvXdfjgZoHPvcelE7JubsyN9?= =?us-ascii?Q?1ubbGA41U/jiDRuLHLk/GqD7txY5PyXahBH1vK1b5Nt2aEPj887RpI1h9AwT?= =?us-ascii?Q?iBUUzEer3ppiaum2QJdhoKnq65QoSSjokMLvfPWiycyGeRe+ITviiibdiO+O?= =?us-ascii?Q?JdQZDMU8th1Bn06yv/XJpXJAngS/BhDhpXzGRtFaHO0dEWnK+pS/SF//bc68?= =?us-ascii?Q?CIbotREbqB7XbEgG2pjTXFKIubh+QhcaYDethZPspPKMtO15Rebe52PjOkL1?= =?us-ascii?Q?+XG47pVDFst0ckvy42np1xb0RWimOcEzt7+Q7BrKYAHLXp+DGPC5+uMfJYx9?= =?us-ascii?Q?P2NSXQcslsR2od8Oev66NNAtWZyXO3m79h54I2Afe9hLtZ6s1jxe3W/JgDXp?= =?us-ascii?Q?nOpJc4WADgziAPDbsjDYYcJcyLt7QU9mrKb/mgOAuPyrNRNvw8+u0QqlKkn9?= =?us-ascii?Q?d+C77j6T/oJfYeloQWV/+OJnBJVJpQkZS5GsyjXrF2+qCECeabWA9vH6rL+y?= =?us-ascii?Q?GHmLB1X7kyYgSGQxgELZDnmRdDkAJ4U8AuubK2sDxX+eTCBVRCgWFStAd6yu?= =?us-ascii?Q?t90fZTRb7GixYEd1ZsJaFZcA+2Yth3xPz9iwgXC/OL0qPlhiRyikT43Hiycb?= =?us-ascii?Q?m6jLx7E6mpBQhfKy2Vbi1Grp?= 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: 71c3c8a5-74f5-4020-6689-08d97dd008bd X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2021 13:51:10.1446 (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: Fx2fg28uoqM4csROSYQGfeTr0GAEKpn5NSFKWvqejSk2nwGHQPhI4NEFx4q1WdU0fZfi8ayrn+30sP1fsHqUow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR11MB5743 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/4] net/e1000: 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:28 > 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 1/4] net/e1000: fix memzone leak when re-co= nfigure 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 > ------------>em_rx_queue_release > rte_eth_dev_close > -->eth_em_close > ---->em_dev_free_queues > ------>em_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/e1000/em_rxtx.c | 8 ++++++-- > drivers/net/e1000/igb_rxtx.c | 9 +++++++-- > 2 files changed, 13 insertions(+), 4 deletions(-) >=20 Acked-by: Haiyue Wang > -- > 2.23.0