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 D506B432C1; Tue, 7 Nov 2023 07:56:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C472A40EDC; Tue, 7 Nov 2023 07:56:21 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 3EF1640DDE; Tue, 7 Nov 2023 07:56:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699340180; x=1730876180; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=NyX6X4rSat127rPMLv53Leh2pxorK2LGOb5MADbM274=; b=FgYxCH4woLVeTNmwvyJ5Z/intssK7WShso5Mk5wjL37iSkFzmm8yrXSa 8g3z0Ug5L9Vd66UMTI4gfrKzQXXpBuSiwv2VeDr94rEIBqNvqXMSBOiqm A4dTvo2v4l0gXqRis6OfB4r6m/6G28Sa280ItjEMl2AzVwAtyj3fyUq/t XITCvrEdd1aaaBQTE3/1DAJR2O2wUUDZ1adZAIofJgwApYLk9MWWdaECK g89WvlLLh18STtpslzKPWGgF30wH+rDrHnS2hNfgbsofUolOesWu7B0Ky /V7fZFLB+TxW8sX4xxaOqBsypih+z4Ggb1GNPButB6ZJisnIipzAkwuZH w==; X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="374471650" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="374471650" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 22:56:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="3890994" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Nov 2023 22:56:19 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 6 Nov 2023 22:56:18 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Mon, 6 Nov 2023 22:56:18 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 6 Nov 2023 22:56:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UoQhOgjmNqLj6mfw46Kj7wFsawByB0XjyZc+Mib8x2FLU/s5sPHSiMDFKWxzG2kZtz1MLfPr8iJCBpbeL5gD/dPG7nfDe+QNetEC0Ti9RU8m634tBKazWfM+J1G5/l11ftZJWSwJw1czbWPXX9BRS2iLf5dI7ESan58uDnIDBciqABTgwCewwcU79qUbKSd90f5qh8rk74X6Ep1NGtUFR+6pKtF512vXlGj7bgAsChKBeeY+JdtMfOWQhlZGDoyqmLUmf/S//Jcm/w9tE9uE+4GH0FGpY/0YsImjLaUueOdK/fozYu7fXskcjQjw2jyblzZvtRv+4AoEoz6/CxGizg== 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=NyX6X4rSat127rPMLv53Leh2pxorK2LGOb5MADbM274=; b=McTWOeU7a3DDSrG/VWqL9Px7ZWozBBCZWtCmD4PAYK8OTUTnvV40RwekmAMXk37+0SIvKcHqXtHGtAqeQ+PCL9ySGXTdAXRFLBF9akvy5I9v8NlGKLudvHhHCn1g05DL8GTaIF1rayGXLaH/CWk8awFv1A6O+RWK28sdL9GL67n00Qnojz4jtdiRFwVLqv7WGemz6cgZrlK6E3TDnjgiB3dCeak6yQTMCMHW60bN0Vq7NaBnK7WTZgLRCWxEjq/IxkmhUetwbsyR+lLmCxCf7YVSGCF5J/9GfB1Cn5pkLv/730Tic/LZC2B9tkmwKxThDO30O6fdtDSyXffv+o0Q2Q== 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 Received: from SN7PR11MB7139.namprd11.prod.outlook.com (2603:10b6:806:2a2::14) by SJ2PR11MB8470.namprd11.prod.outlook.com (2603:10b6:a03:56f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 06:56:16 +0000 Received: from SN7PR11MB7139.namprd11.prod.outlook.com ([fe80::5216:6b58:10e7:9875]) by SN7PR11MB7139.namprd11.prod.outlook.com ([fe80::5216:6b58:10e7:9875%7]) with mapi id 15.20.6954.025; Tue, 7 Nov 2023 06:56:16 +0000 From: "Ye, MingjinX" To: "Ye, MingjinX" , "Burakov, Anatoly" , "dev@dpdk.org" CC: "Yang, Qiming" , "stable@dpdk.org" , "Ling, WeiX" Subject: RE: [PATCH] bus/vdev: fix devargs memory leak Thread-Topic: [PATCH] bus/vdev: fix devargs memory leak Thread-Index: AQHZ3KbeijggetUpAkiI6S6QGkb9G7AW99OAgASxV0CAUyV0AA== Date: Tue, 7 Nov 2023 06:56:15 +0000 Message-ID: References: <20230901072409.741847-1-mingjinx.ye@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB7139:EE_|SJ2PR11MB8470:EE_ x-ms-office365-filtering-correlation-id: c5c9c719-340b-44ff-8ddd-08dbdf5ea2d2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6c8ztbtFkGweFVFvFe97lmMTl8IW0YHvVQrQz6Ii8oITW7Ozk2bMt+ZcKbSWviKy5V6OEc6FJ0cYa/swpszDGhmcet2Gqbob0VY2n9sWM9142d7X0+F7J2eA+UqYJwTUnrT2v66Kon7VRla0jELN/x3z+ARkzHMmGbwyGlymB524FQ9kQaZKqnyjd6MOOgfJC5eSHkgP+oNo7e8sYvB2PEWfx/76mwV3n0cIH70YriUekOfZoT/HaQ1wuKT1rCCRqvLY753d8M3zuhc6fPI6as+UXpSrDQuHKI+T+Xjr+NUs2faIBxJF2pJIc8oJk/UzP857sDw2HvG2OXw2Qnoxpd7c6a6tyQ4oc3gZcCRMnMJWOgHRrxR0Af/YwDnPpZ81kMjVVA641Z22bZbo4I4af/gyxpI9w8AziQ9pneNFhDI2X7yAKVC3LU4vBy8Q2MesBnqM2eNnvx53I30aBCIZfwJaUyAHGAQ5UInorccUCkuPdx8g+aq+NyDLbeXHMivXJicIJ3rdaw2s8y+2hGSbA7Doyxk3jQpHopwkUJfmHc2cQAORran0sp1d1zzMYcHJ3Li4Q6Dk4l45V4deqc8QK+nFBcYO2pO3Oxil7+ldt9iVRMWlKC1E0h/4BVVtgmTk x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7139.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(376002)(39860400002)(136003)(346002)(230922051799003)(186009)(451199024)(64100799003)(1800799009)(2906002)(33656002)(7696005)(41300700001)(64756008)(66556008)(478600001)(66446008)(316002)(66476007)(450100002)(38100700002)(8676002)(8936002)(76116006)(55016003)(110136005)(54906003)(52536014)(4326008)(66946007)(5660300002)(86362001)(38070700009)(83380400001)(122000001)(53546011)(82960400001)(107886003)(6506007)(71200400001)(26005)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?FOTuBHsYFAgxeEVp9PAjDhVFBCb5yYjG7kpVpnxTRKs1NAbF8AjQXmTmfxIl?= =?us-ascii?Q?tp2VXNLmwSqR1+LmZLWZpeFWJ0nZqnLp/JEf6fJP7uvnnkLRs8Rnkij5jB+9?= =?us-ascii?Q?0+fcDkX9DggIkasTdh0ynCDwqPaV7t7poWy0592KDyrSRUT50TsCve9pdPuQ?= =?us-ascii?Q?Y+UjtOjUXwq2iyzKoIeAPYKV7se3zoIZKUUhRGZ+38Ip2Gw1KY+VX+R8veTb?= =?us-ascii?Q?KqtzAq++PrdGjBb4kIph9VWRNUqrXfUi4fV/TY22bSa1/nB3BE7GmeiJPaWm?= =?us-ascii?Q?o33hkTvL37WkAXo9O52oVgbsLKzyHfuwP/OVZEaFFOlI0mioDTTR8TwnLxHK?= =?us-ascii?Q?BQFlIW83a52bGi1j+fCFYKu2pt7mqUOzVfo25oe7dq9j+YJaHMH8JTfkDN90?= =?us-ascii?Q?3BTxcd1nx1jTcmDqEqkfWTmd4inHM9BiCq+gQ1qpncIsZdmtX7t50uIh5PcC?= =?us-ascii?Q?hivOKVFvSyPG24T3oFtiO6/08zMzKmhhRl6OlyysNBfEvrUnF07EXX2DyQGe?= =?us-ascii?Q?1S76eInp+3524KmxJa0/YC0e09g81jv+1lLTCPwWesX2cr5NrwEXKsxkFWA+?= =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nOJATpGBTNJkl?= =?us-ascii?Q?vQ6v5ddZFR02Bc4kud4zVONMe34AGlCScleX40s+PCpZDvzJ7Gnci85sTFVE?= =?us-ascii?Q?DQrPs01iTPmUlpFOQAvhZYqOWn8sc1Uy+YlB2vfw?= 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: SN7PR11MB7139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5c9c719-340b-44ff-8ddd-08dbdf5ea2d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2023 06:56:15.4648 (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: /fdxVmENFYGCQd6YnEGoyF28Gkp/S1hnuVTFyfbvEqFBhtOTLbazlXnITtyIh51U6y/oOYqzzVgY6vtlIE+xBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB8470 X-OriginatorOrg: intel.com 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 Hi Anatoly, can you please take a look at this patch. Thanks, Mingjin > -----Original Message----- > From: Ye, MingjinX > Sent: Friday, September 15, 2023 4:56 PM > To: Burakov, Anatoly ; dev@dpdk.org > Cc: Yang, Qiming ; Zhou, YidingX > ; stable@dpdk.org; Ling, WeiX > > Subject: RE: [PATCH] bus/vdev: fix devargs memory leak >=20 > Hi Anatoly, >=20 > Could you please review and provide suggestions if any. >=20 > Thanks, > Mingjin >=20 > > -----Original Message----- > > From: Ling, WeiX > > Sent: Tuesday, September 12, 2023 5:08 PM > > To: Ye, MingjinX ; dev@dpdk.org > > Cc: Yang, Qiming ; Zhou, YidingX > > ; Ye, MingjinX ; > > stable@dpdk.org; Burakov, Anatoly > > Subject: RE: [PATCH] bus/vdev: fix devargs memory leak > > > > > -----Original Message----- > > > From: Mingjin Ye > > > Sent: Friday, September 1, 2023 3:24 PM > > > To: dev@dpdk.org > > > Cc: Yang, Qiming ; Zhou, YidingX > > > ; Ye, MingjinX ; > > > stable@dpdk.org; Burakov, Anatoly > > > Subject: [PATCH] bus/vdev: fix devargs memory leak > > > > > > When a device is created by a secondary process, an empty devargs is > > > temporarily generated and bound to it. This causes the device to not > > > be associated with the correct devargs, and the empty devargs are > > > not released when the resource is freed. > > > > > > This patch fixes the issue by matching the devargs when inserting a > > > device in secondary process. > > > > > > Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct") > > > Fixes: a16040453968 ("eal: extract vdev infra") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Mingjin Ye > > > --- > > > > Tested-by: Wei Ling