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 E2AB6A04A8; Wed, 26 Jan 2022 14:25:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7D8B4272B; Wed, 26 Jan 2022 14:25:29 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id D136942716; Wed, 26 Jan 2022 14:25:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643203528; x=1674739528; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=KMCou5u0x455jLVQQ3LUpF1kGqoppPSsP+WAFdDM+nA=; b=HIxvOb8zmJcI/lu9s+hGbTC10MGrPVlDDvgtj/8PduJpDbWRTIQv7uyP uj6m2DwklwvV18e0j2E/9s7UABiOblHG31ubdf7fYYvFwuk19R/ncEaoL 5bhVxD2oOjXJeyJuleCSQjVLGeGtjlWzSnjX9vP+PFKayBw9tspWzu+Nb jBtFl93MH9Ujo4VQv/WAoihxyeU1MNKHZRbE/jDbG00CIO6tESi+ArCE/ xdidoe520wyEnZe64idFkd5WWXPyDAbZepKMBCIhKBQsWq+Z3GjZFFJOM qFiWRQ7xNdRGiRhJLmGNTm3BX3NZRR8Oxgc8WMEyHMwG8Oj7XjSas1SyF w==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="246325606" X-IronPort-AV: E=Sophos;i="5.88,318,1635231600"; d="scan'208";a="246325606" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 05:25:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,318,1635231600"; d="scan'208";a="520791178" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP; 26 Jan 2022 05:25:26 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 26 Jan 2022 05:25:26 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 26 Jan 2022 05:25:26 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) 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.2308.20; Wed, 26 Jan 2022 05:25:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I/m5n/XKP/8iU60E5sdi+lfya3ppTDPN5m2295O9FChATUTmnU3Gid1EUeHHDi/AU9pqu6o7UkPtKBLwfAIRwNl1zyjP8MZYMJxeptjLZU2mPaEz2pSTiz9aLaLLoN4ULWiiEpX7ZUvB2pAa+yNYR1kyvyTAekJS4RqaTfQdJsbBo7YY/jKZgKUWfkhPKKOsf9oFjJ26ZDYDehsyfRrEViyJrTMqcejekVGt5W3D1WVmfe1VV7c8/4JDAw3nXF7w2Uj1v8va2LNMBM1OTJ4SL8Nri7atrOxBVNpXg6ncQg1p8/UVQSVxTxziYlQtqy50Wq8puz8oyIVCGEwtaVlH5A== 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=PSvVmlL8uQZgXsEG9D+C0cUfwgjoh1O/5xx4Mvd35Uc=; b=LZXXnvJcjHAN0HiHKfgLTrACG+STxIk78vZNiIno+WF7AuChQpQqVpr4+cF5w7xyOT3PIS5TFgKn5WnLONkWJOi6/C7L7W5fdZmZoD8ZL70RJfAk3Qt8+rHNVWa3n/DcHgA7zn+fC/Vo8zqg4D/0+el5ewEt9pPhg4M5vMcqOUZnL42eEWp9xb2+hza9l0EENGZVTn+iB2MAgf4w4EXxSmHIrEMIcmM3SFWjMhQEOjOA0wr/9BTs6yrR+1W9kalqxIUOItma3RjMGtMHeogr6vDi3KhmjnMnxhxh2++C00QSfIGtsE80ihzN1HqWBiL5Ra6qeNTxFZ6t7ti/bCZwLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by MW4PR11MB5775.namprd11.prod.outlook.com (2603:10b6:303:181::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Wed, 26 Jan 2022 13:25:23 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4909.019; Wed, 26 Jan 2022 13:25:23 +0000 Message-ID: <26fd3861-0f61-9ea9-e3a9-1172cddc5e60@intel.com> Date: Wed, 26 Jan 2022 13:25:16 +0000 Content-Language: en-US To: Wei Huang , , , , Nipun Gupta , Hemant Agrawal CC: , References: <20220126032953.24695-1-wei.huang@intel.com> From: Ferruh Yigit Subject: Re: [PATCH v1] raw/ifpga: fix ifpga devices cleanup function X-User: ferruhy In-Reply-To: <20220126032953.24695-1-wei.huang@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0273.eurprd04.prod.outlook.com (2603:10a6:10:28c::8) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d05f4d33-1f8c-4d7a-b95c-08d9e0cf4e6b X-MS-TrafficTypeDiagnostic: MW4PR11MB5775:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o6H6p3AZ6usyhfSk6K2YL3pL9fdUzGtt88EbhvQjlngkQgdLJlTc8RjSaxSQKXb9oAEdX1elcOPbHHMk5vhp+knETwoCcbVId2eS8OFYz0G58Y/hQ1lRrqDVtOYO3g8P3VAskLf0UpjwuRGwWGJhJayd5gSkTfcWh80ZzGYDlH/0cQpqeIv09dSXuVZup2PSrBpwCeIx63Ictyg+M+ErVnXm+CWfxMhzaC3ugxdY11X5CK1MvWjwhRnvWwhfsRH6p2LtwQflys0iIze9eeWEXHNbUMnMK2UahoGflwrH8aG5MVl93FhBIkRbsnqihAtVCo47AkDdMFlUFy4kU39ak6Obi8bePQyY2mTYvIgQehpcSoKTyijNPJisCyUOShDkFSv8q/xtqWUzK/o9ajDioYcUEEITcoKhkBwYoTp+3i0OqsTIfomU3ByBLbmO0DU2MVONyn+rrjTStMWwDmkjapEkAUhfhopBuRx1ToSr3IK0zdPDH55FlsBifaxdCqhMLnU+sbtvhJyyHjZ4jfbrVGXKAooRCcHt54ySrCgCdnwy3VTCeiMYJnVIjQbNO7tb6APq5U48aCPPER4zHU839SDr5Ujj5FFO5yo6MgGL8WSjA2gEy120iw5VZmzM6IJ27P51EReHsk6usG8MM++a5LSAx4Ns3auXlH3ZcnxH/IVGos1Jt3d5YDFN+Pi1CPoshD08zEUo4BiGhyU64PIcvg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(508600001)(53546011)(6506007)(4326008)(31686004)(110136005)(66476007)(36756003)(66946007)(107886003)(6512007)(44832011)(8676002)(6666004)(186003)(26005)(6486002)(2906002)(5660300002)(2616005)(83380400001)(8936002)(31696002)(316002)(82960400001)(38100700002)(66556008)(86362001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QkExS0pqbkMyZ2s0TmNRMGZ5dVEzZkluMkFwdWhYbUxJblA1VGROeDNGQ0Rj?= =?utf-8?B?enQ0Wm5OQzB0SEFXRlB2UC92WUpNcHByWnpnQ2lleUoxaHpmdmJWaEc5NnVJ?= =?utf-8?B?SVNnOXVGTXlBWUJJZTJHQnh4VEdXOWZWUVE1TmlodXc1S1htK0VucGRMNVkz?= =?utf-8?B?SEVZVTNKWk12WkZ4TFBLSEtvR3Q0UE9WcFlkT0YyVEFMYzNKZ1c0MlIxUE45?= =?utf-8?B?bzNiMVluOWhHaVRwcXduWDdJT21MelU0NCswRnZFNU5TSFhlWnFoN0J1a2cr?= =?utf-8?B?cEdwMEVPdEtocUdDb3k3Rml2OEZ4b2c4RGRISGpqQXk3VituTHIwb2JhTFBP?= =?utf-8?B?b3J4R0g3a2tlR0hPbWNrVlUrUzdnK3Z3WUd4QjRzNVpjSnpmQ2ZzMHVCMGpD?= =?utf-8?B?UHNTNXFpTU9yY1c3elB5TFZ5QWZ4TnlRMnhMTzFGQ3Y2RFBmWDFscWh4TzZL?= =?utf-8?B?eFNT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MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2022 13:25:23.1607 (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: SDApjBAT5mlWCcePJNMQxi3VArkCEKNr0SQffCYpT3nLtmjNlMJSshHanOW7L6prg70+m1U3kaies8BJF1iEiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB5775 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 On 1/26/2022 3:29 AM, Wei Huang wrote: > 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. > As far as I understand you are fixing an issue that not all resources are released, is this correct? What are these not released resources? And 'rte_rawdev_pmd_release()' rawdev API seems intended to do the cleanup, is it expected that some resources are not freed after this call, or should we fix that API? If the device remove API needs to be used, what is the point of 'rte_rawdev_pmd_release()' API? cc'ed rawdev maintainers for comment. > Fixes: f724a802 ("raw/ifpga: add miscellaneous APIs") > > Signed-off-by: Wei Huang > --- > drivers/raw/ifpga/ifpga_rawdev.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > 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; > > for (i = 0; i < IFPGA_RAWDEV_NUM; i++) { > dev = &ifpga_rawdevices[i]; > if (dev->rawdev) { > - rte_rawdev_pmd_release(dev->rawdev); > + rdev = dev->rawdev; > + rte_dev_remove(rdev->device); > dev->rawdev = NULL; > } > }