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 6CAA0A0C43; Thu, 21 Oct 2021 23:19:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE2CA41103; Thu, 21 Oct 2021 23:19:34 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id AF66940040 for ; Thu, 21 Oct 2021 23:19:33 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10144"; a="216315761" X-IronPort-AV: E=Sophos;i="5.87,170,1631602800"; d="scan'208";a="216315761" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2021 14:19:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,170,1631602800"; d="scan'208";a="492147886" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 21 Oct 2021 14:19:32 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.2242.12; Thu, 21 Oct 2021 14:19:31 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 21 Oct 2021 14:19:31 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2242.12 via Frontend Transport; Thu, 21 Oct 2021 14:19:31 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 21 Oct 2021 14:19:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jt172zMYQeqAKiGnMtQTrHf7M7YO5KM0c9J4vTXnn5QFy4s+qxqmnmHLutSoJxk9khDefTKONoLxwfYHrY1dyMuDXYdy5VXxTid99Vtwbr4w+4Y47wDDPbS3A3djAKF2/wZPGjTR5BWsliS/XCWqxsumG3bjm1Oxwh/6GnvIzANrPPhflfUINzApn21r/ksVcjh52vEtsu1jDTLjIgR9IVdLg4fCDSZni57pXT4mpOE7Af5kgk1NRYASJBXGo8Rk2Iyu9+qz8es4vCoDryAp/p2Osy7ioPH6XB4uEilz1hHaSLyAu8TPnYLCcCA0gjoirg7Rfej+t/UH67jEFVgsEw== 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=9fuaTSk+Z2MFf6ltqvOv8QKsXPxaPO3I+BVOqso7RUM=; b=XVb2SsWrYUWWKshXLAl4VguA/qkA1tu4fEq74VDOE7BOM6gdm6jQeQRmzoVpXVKNaCHsdxPr0ZYd+53vwg/3eBwNX+LNWgvh/DV0231IWCmqOf5jd71AVb8X8iopk40lMI6MPoggsN/pwMRV7gxtUb2SH0dLw2GBOTdaes29h3++b9+IopbdrL7rxSHVAALR8DF51nemaLkbOI2dhI4NN0I2ULtrLuPnQ5G9naD+CHhm9FYGC+EPScNurNFZ7gvkEelwtJW7P0NnzNDt4PYfJKY4hncdeXKz4+YWHSBUQLk9vDnQjPjGozVORrki200VLXj0FaR4Kyjhu0bToZ0h8Q== 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=9fuaTSk+Z2MFf6ltqvOv8QKsXPxaPO3I+BVOqso7RUM=; b=depgY7vmdbMucHUNWOXLv2Qugq09DDxfYIxYBhE2qmaR4bxD9mIAFnArj2YwiP7WqcqzL+Bm3b5t3ZqlGvi9TVZmMLhZLKYIZjR7g+f8a6oufMWpEr2mUFfab7mhDk3yfENfluMYHrfDUgsbBJbY+MRk0f/1OMXpGIGRDlBdoWw= Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.15; Thu, 21 Oct 2021 21:19:29 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%6]) with mapi id 15.20.4628.018; Thu, 21 Oct 2021 21:19:29 +0000 Message-ID: Date: Thu, 21 Oct 2021 22:19:23 +0100 Content-Language: en-US To: Huisong Li , CC: , , , References: <1627908397-51565-1-git-send-email-lihuisong@huawei.com> <20211021022421.9306-1-lihuisong@huawei.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211021022421.9306-1-lihuisong@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB8PR03CA0027.eurprd03.prod.outlook.com (2603:10a6:10:be::40) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB8PR03CA0027.eurprd03.prod.outlook.com (2603:10a6:10:be::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18 via Frontend Transport; Thu, 21 Oct 2021 21:19:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d2727307-b9ae-491e-bb0c-08d994d877e2 X-MS-TrafficTypeDiagnostic: PH0PR11MB5207: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z0T07KKCw8JWtBcATqP/KYSQsUUGDo/W4D6qIOKP2asWUGfuq9ty2tT8WmAq8iHOLanKEUNSBVZlCpzuspm1H2opDAbE/HLREyA9lIVLq1oOoVjNIL+/eUk/dL1vq9DF231GuxCkBz83Bi9VdzbA9w+NkcW7sG9OuhRM17r6pxfOhOO728L9iZMfepBwlfFJkRQ9dz1v+GiHm7jxiTg+hjs4JL3aZBR6Vj1UCMDVRt19jxhxqUbeVJL37PF5AUPJh5ovFeKFPmd8iJ8+MT0XmFmhiy8KKR6kA5DwnfQ/jwZHkWSO9TMOi691yHBIExfjoASkzsEY9HI2GL3owI+9fOV14IMmSvxHHDa5+9Te27uyFSS94yTfuNYRpQsvk7KCaLwQ1E0ym6blc/udMvfUT4SJKaO3684R6CU7ApS7RLXAKnLzg3Oweh03sZHIOymBgnNqnr8pgFAKioyWes4yo167fF2c/x9q1gMXhU5rJ05Z4fO2SGKQaZRvEjw0l0MyxAV0iSHT1pJbQCl/U6UOvQxApvvTIfhjO7iMltP2ns+oT1xzQcZMj0cMw12uSnLgvom+a7aKswdBajhEv+92NQSp0NcAGOqc1abLfu+zk6LzTRK+HrAF3v6lb53pivkPgxfBpg0RdhTgDF7//IrOGojL+76Y0aKuOcFwkM6F3UZzQH6GaD/HuowX6IGUVmHugltfuS1DcZWg2GhwNCTmDQ== 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)(36756003)(2906002)(16576012)(8936002)(508600001)(31696002)(53546011)(44832011)(38100700002)(5660300002)(316002)(956004)(86362001)(6666004)(8676002)(31686004)(66556008)(26005)(4326008)(107886003)(66946007)(83380400001)(186003)(82960400001)(6486002)(2616005)(4744005)(66476007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QnhuTlVoUVhWTEdUMjU2dFR2NEc2TmtqdDB2S0pBR05Mb0JjenVMYi9YaTR5?= =?utf-8?B?WStFS0NSZ1l1Z2ZHamRlRHZsalA5T0MwM2paNVo2eWMreHU0WHJ0N21YTVQr?= =?utf-8?B?Qy82WDZ6UGxEdTcyazlvNnZJQTJYajNJNzZOT1B1aWkvUC9PRU82Q0lmQ2lI?= =?utf-8?B?R3NUZ3M5Vm1sM3VuRG82UzRmdVBRNUlGY0RISSswV0tHaXEvcmtNZ1pta2pM?= =?utf-8?B?cDJTcnFlK0plblFXRDMzcllmZnprUm9rN1NFU2ZiUlI5VUNNQ0JaTXBxUzk2?= =?utf-8?B?eFlKRFZxVUZsQXlSVWJqOG9odE4rU2o3MVhTck5hTC9oWitZbDFGOGg1Njhj?= =?utf-8?B?WWlWVzIvclRCSVVBK3RpeU9iRzMvMHJRcTVUU21wZHNPSmlIck9WUG9rUzBZ?= =?utf-8?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RHVm?= =?utf-8?B?WmdhWEtrNWtZM0p1ZGw0WWswUVRnNy9LTyt6RGViMVJ4M0VIdUhBZHcxa2Vj?= =?utf-8?B?dFpzRWN6OUZiOUpVa0ZXcGlEdDcvS1BibnR2M2ZvcU5xUkhpZEtTYU9mUUFh?= =?utf-8?B?cWkvTWVKVFZhKy91T3MvSVdlMjZPUTM3UDVQblgzZW83QWlOK0pFL3RSaUlC?= =?utf-8?B?cDVzOEhFQlZGdzRFL21UalhnZnpyV2JETGthYWh3SkNKWXRTL0J3WEVmSVZw?= =?utf-8?B?Qm9qa0k4NjZ3VXRvamZyUDd3MWluMlBuREVpR3F2MWhiamJmTHlYbXRrM3I4?= =?utf-8?B?bkYzbjZwdkgxamtZcmVnQ1FSWmQ1ZUdicUd5aE1ES3hmSC9sdmlBZWZnKzRv?= =?utf-8?B?YWE0c0tBRlFKYk41T2pHdEZJcHNFQ0NGMUhaRDRQNHhNSnJvM04yY3VsMXBS?= =?utf-8?B?QXRJTWJ0Uk55em9yUEJjendJZm9OOUxwR0gvRVNkbE1Jb05QUzRSQWFKNE1G?= =?utf-8?B?ZytLMG5CaTVxSjdNVzA4aFFoZ0x2Y0tOTG8vbkJzQ3ZDY2tzYjFBeFVkNmY5?= =?utf-8?B?akQrSUF0Tm1VNFBCZlpOd3pPNEhOd0tMREJXMHNiT01MQjJQbXdaZ0s1NDZZ?= =?utf-8?Q?VJX5kNVMYKsIBf11CV1SdFJ/8dbG/Kcl?= X-MS-Exchange-CrossTenant-Network-Message-Id: d2727307-b9ae-491e-bb0c-08d994d877e2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2021 21:19:29.7647 (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: ferruh.yigit@intel.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5207 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH V4] ethdev: fix eth device released repeatedly 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" On 10/21/2021 3:24 AM, Huisong Li wrote: > In secondary process, rte_eth_dev_close() doesn't clear eth_dev->data. > If calling rte_dev_remove() after rte_eth_dev_close(), > in rte_eth_dev_pci_generic_remove() function, the released eth device still > can be found by its name in shared memory. As a result, the eth device will > be released repeatedly. The state of the eth device is modified to > RTE_ETH_DEV_UNUSED after rte_eth_dev_close(). So this state can be used to > avoid this problem. > > Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") > Cc: stable@dpdk.org > > Signed-off-by: Huisong Li Reviewed-by: Ferruh Yigit Applied to dpdk-next-net/main, thanks.