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 4631EA04A5; Wed, 26 Jan 2022 07:57:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F29DE426FA; Wed, 26 Jan 2022 07:57:18 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id CDBA14069D; Wed, 26 Jan 2022 07:57:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643180237; x=1674716237; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=dKkSMEJ4kj9FNO4LHbC6IEq9FWmYT5UErxRMxH15USw=; b=FnUj15BRc8rPbpvmcxBFdPjicUhA2P84Vj4OS5BL9JE1qCfUGwziZmkF JCrxRU1JWtAMSA0mK8ehqpfzjD/M8Zg9SG0zZqGYFYy3rsine5TsMISSP 8X1eG47Bh/A5WoTqddf2hIq8J/k+LroiJGCq937SaFB4gr2aEeiTVjS5K nijwm6MVQYcgL9SvP++H/GaRAayS3povvVxNbBD965RcMLTHUH6RckNK1 id2fGO13oONmwEpLVXqC/KNIZGb0v38SxL0ODmM/VBeFMATKigmlS/BtT 5sRcgI+f3bmMw/JtBtTilRrWzE3kHTA2abqHrlja4eHeicTGUJ7b5Cp5Y Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="270943931" X-IronPort-AV: E=Sophos;i="5.88,317,1635231600"; d="scan'208";a="270943931" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 22:57:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,317,1635231600"; d="scan'208";a="479793120" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga006.jf.intel.com with ESMTP; 25 Jan 2022 22:57:15 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 25 Jan 2022 22:57:15 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) 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.2308.20; Tue, 25 Jan 2022 22:57:14 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.2308.20 via Frontend Transport; Tue, 25 Jan 2022 22:57:14 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) 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.2308.20; Tue, 25 Jan 2022 22:57:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=APMbOcwmdB1kuw95Q6hO0Q9jTDPBIQ2NNaAt66gfj5SGWy8ZQwmxaB9R2bmuz9hglGYRGLd8dr3Z4cdHVP8qU1IJAhJFLjOwB1uwamo3fEtcAJtdCnPe5aP9KerDucmBou7I8xokRH9styqiJhZkT6kcVQIFnxfSos43/xSKnPRSqyvXnJi57eq597OyUQ/tRzX6tK7XFJpUnsCluDyjuIq6Rqj1TCeHp5j/6g5T1hFyn6cqrsKvyQnhBpl2kaS3Zna3PXbJYmnV4UH8FQaJNV8zNUoP2b43posb4iDuBG3p++GNU9zGmbQ/AhU6AdVqU7+uNN++E2vFWu1koO9xsA== 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=9n0w7bozHGVX7I6Wg1Ss13SRwkuZVYSrjppuJXQm6Is=; b=YSpgZOY2lG1D44A4RtAD1qkXSEN8DXJgqeIKKznAdq09K6EnA9WXYetC5KcWP7DP/2UsJ/1HDkyaem2p98vSNt2XVS5+8xK//KD5kHjDhYPlV3DVczbkWL2Et1FJFHwe5cS3xTWTT23+5H2OyKR2LXxnYgtxHIihMd5+OITJgWjh7qR/GMBTuJTY9NgFVAWTw869bK2HcBHhiYtufErPVswLCkn0Q6fH/oscrw6fW6P9OOn448V/lrorTKRv93AvT2qblMS8q8/+hwnlmB6+hHBEK9gNstKdDZ6uoBMLteLAJcKtC25jri5PijXKNTw/RfjjnFh4hck2CfyZR+S7pA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by BL1PR11MB5431.namprd11.prod.outlook.com (2603:10b6:208:315::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Wed, 26 Jan 2022 06:57:06 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::c8ff:c95c:e601:eee3]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::c8ff:c95c:e601:eee3%5]) with mapi id 15.20.4909.019; Wed, 26 Jan 2022 06:57:06 +0000 From: "Zhang, Tianfei" To: "Huang, Wei" , "dev@dpdk.org" , "Xu, Rosen" , "Zhang, Qi Z" CC: "stable@dpdk.org" , "Yigit, Ferruh" Subject: RE: [PATCH v1] raw/ifpga: fix ifpga devices cleanup function Thread-Topic: [PATCH v1] raw/ifpga: fix ifpga devices cleanup function Thread-Index: AQHYEmV03nv4G+1YFkyVeUHpEmq+lax03qvA Date: Wed, 26 Jan 2022 06:57:06 +0000 Message-ID: References: <20220126032953.24695-1-wei.huang@intel.com> In-Reply-To: <20220126032953.24695-1-wei.huang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.200.16 dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0bdb5d8b-5f86-4f45-55d6-08d9e09910ac x-ms-traffictypediagnostic: BL1PR11MB5431:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:541; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nzdKJN2IeDfPsSh3XExxoHofCaCavDcdtPEz/W0vHw3sCCavL9udJmLqhYKM1HkFswXZh3yUBPGAHftf3LWjeqnkH3H9bdKienMJ4vI/0X+8lBlUyJ+Q26msK+vEEbA+9Mm5XHpmbBGzd5MxKlcroqf3c6MEFkbJpO1XvxVSW2J2ED93ebZe8rr3XlWE84Pqup6ddGRXy7hPaaKXXitJJEzzW/1xnRlY3okU4BUTyac14HwbgPA5CnWoI5h+zDZ2RUQmKwfOOEgNhze4Njkc/j5GaTEruPyOFtv6hAQ3fscd6IhIAduvi3x2RtiW6MDbbH7DaVHpMZPdWi7XaAJklSLuhPy1eTh/x8KuQ7m6G5ZiLRTruGsTrfiwtSBmS23yOANe15/UcIUyDdAbEu/+DpJabOmmFlgTPl+/3JTZQwN/ZUs9C3lbz2VsKBznHCYJKcZIoJGdtiBnE4RGYIoobwitr3Jgm8RNvCc9xe/3RPAb4bZRqTEE8gGBoomp93jgpEwymPUbOBKaKLheWePowJKYqLt8iofgNF6TZqnvtVuC2rSdjRjHr3RNyd0P75msypXrs4KT+WIUgXdmYkirNwQHn35jzU253kG+WZZTdirgHc4NjksfGvmBiTeA2ljt5eDf34UK0qOYW8BM6fTVndooFShxN1O1iL/6c7JOkw1M4Y5jvuvUganrfTD+Ed7TdpsuJEGKIcYE6S/+MHv7oQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5483.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6636002)(110136005)(8936002)(66476007)(66446008)(64756008)(66946007)(54906003)(450100002)(316002)(122000001)(33656002)(8676002)(4326008)(55016003)(186003)(66556008)(76116006)(71200400001)(83380400001)(6506007)(9686003)(107886003)(53546011)(508600001)(7696005)(38070700005)(5660300002)(38100700002)(52536014)(86362001)(2906002)(82960400001)(20210929001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ueLKSBHGucHpzCp2v3+kyqBAGFSGSmwGaZLR7G/ACs9HbGUilAN7qaf827KW?= =?us-ascii?Q?f2sLAlfb/pNAzs8QHFxn7ksPB5CwCKrWjhAIucetBPuGu6pemMMBjvWxMFLR?= =?us-ascii?Q?FeqCBZ9J+LY45Oon9ICmUNHETpicvU8iQuzUKyP+ldztjGnRhkW7a+ZhmJF/?= =?us-ascii?Q?71FIWEpntYwNJt7EhwcnSArfJcX8KX0BhvcPVUnvxfCxekkHHyq7shlMFUO5?= =?us-ascii?Q?//EjGlNKDjfODMYcU7nI0C3Sx3KWBw1tpWdfB5EW3uuxlWs8meLWcXHSWcTx?= =?us-ascii?Q?W3VEjJ/Y7m9vsgdrJyLMtXnxH8zAIt95ImlRowuFtge0EjfeBlNeShZshpzA?= =?us-ascii?Q?uyC293u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ApbaU?= =?us-ascii?Q?3RxxTKFI8tAid4FOgrm46/9BcQDSCR/SLCX8wIoPw/dpkgeFYrlwys1+nQmf?= =?us-ascii?Q?lT4RCnP++4PIT8UATQEGRPsz53pBES3WcqyqUcQ5SULx2GqcPNldXeJHzVjL?= =?us-ascii?Q?01FIUutwZ72gYJHnrNfkZDaeaN5cTy0CHBPXaJkxSRu0J4kQ9fp39nsfzKwx?= =?us-ascii?Q?xrO1Q+kwksaFo+kUfF2CH4ihVp+3P8o4XH1VO+SvO1MAWYiLnVyQs2r2pV1U?= =?us-ascii?Q?Zd1VII7Zt3FKUDarxuWmf8MBfRvDv8s5RpxsiHYUlMbO0qiKxdsoeOW98enu?= =?us-ascii?Q?Bj7NoMV3FWjlSkazDVkgqZoxCtinZ3c9xW3KmHeKcH3wMqVLdX1KHTHN0GdM?= =?us-ascii?Q?LCVljaf4B/0ms6REy6jpNd+FASqXpPCZl61qpOdwNLm3uOC+qKKKPZD+KD2Q?= =?us-ascii?Q?Zj1SDWo7roLO7kQgW0G+exSBIQk=3D?= 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: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bdb5d8b-5f86-4f45-55d6-08d9e09910ac X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2022 06:57:06.1640 (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: wIGb4HfDx/ubwE2x+t6l176oUS79Kt0z90qM8kRInPHNxTkzN5ZPbA1qcOPd34szpmmyJ2fHGYJnSTppQaDQwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5431 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 > -----Original Message----- > From: Huang, Wei > Sent: Wednesday, January 26, 2022 11:30 AM > To: dev@dpdk.org; Xu, Rosen ; Zhang, Qi Z > > Cc: stable@dpdk.org; Zhang, Tianfei ; Yigit, Fer= ruh > ; Huang, Wei > Subject: [PATCH v1] raw/ifpga: fix ifpga devices cleanup function >=20 > Use rte_dev_remove() to replace rte_rawdev_pmd_release() in > ifpga_rawdev_cleanup(), resources occupied by ifpga raw devices such as > threads can be released correctly. >=20 > Fixes: f724a802 ("raw/ifpga: add miscellaneous APIs") >=20 > Signed-off-by: Wei Huang > --- > drivers/raw/ifpga/ifpga_rawdev.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/raw/ifpga/ifpga_rawdev.c > b/drivers/raw/ifpga/ifpga_rawdev.c > index fdf3c23..88c38aa 100644 > --- a/drivers/raw/ifpga/ifpga_rawdev.c > +++ b/drivers/raw/ifpga/ifpga_rawdev.c > @@ -1787,12 +1787,14 @@ int ifpga_rawdev_partial_reconfigure(struct > rte_rawdev *dev, int port, void ifpga_rawdev_cleanup(void) { > struct ifpga_rawdev *dev; > + struct rte_rawdev *rdev; > unsigned int i; >=20 > for (i =3D 0; i < IFPGA_RAWDEV_NUM; i++) { > dev =3D &ifpga_rawdevices[i]; > if (dev->rawdev) { > - rte_rawdev_pmd_release(dev->rawdev); > + rdev =3D dev->rawdev; > + rte_dev_remove(rdev->device); > dev->rawdev =3D NULL; > } > } > -- It looks good for me. Acked-by: Tianfei Zhang