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 3A4DB45A8C; Wed, 9 Oct 2024 12:11:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD4844065D; Wed, 9 Oct 2024 12:11:53 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mails.dpdk.org (Postfix) with ESMTP id D4986402DB for ; Wed, 9 Oct 2024 12:11:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728468713; x=1760004713; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=9U4wf5XExgdRFS0xGZkKxfG2rJDZfwdvYq338hNA23Y=; b=nekgYk7mXTk7VkG8gRoV5XVI8IPZfrVNWO1fINfRZYhN0VrpiCfTAr1J KS7lAp33YEdU1fF4Q0UC3zc6FsNAF7OYuD45yb7gub6JATgpknmGP9u+c kmGXTNuzdjJCsahlOMXkpmGLW7Uv6xt2vCGAG3dQeDrSUk2DybSH01Mqd edniTPFj/Avp5Af37aVfo/Gw+JDpalIy+S5T3LJI9GGQaxRKr5ZxINhJJ At5M4cohgSZV//ZfBKkz7cC0cH44nIDDMCEJzuqr+qZEV30FxFJDnpv+e qMSssKbLdFLZfrdSjCpIVq6xpcnDn/ohrSGClpuCaadOfPnN4BnP98tam g==; X-CSE-ConnectionGUID: fRMTHT//SF6PxsVMLRtOkQ== X-CSE-MsgGUID: /WnRMKXxS4iqVOz7KeJtnA== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="27571753" X-IronPort-AV: E=Sophos;i="6.11,189,1725346800"; d="scan'208";a="27571753" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2024 03:11:48 -0700 X-CSE-ConnectionGUID: Be8tHQqXTKKODylRLTmAkA== X-CSE-MsgGUID: uyxGmdcBQTetEhAgywniZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,189,1725346800"; d="scan'208";a="76092853" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Oct 2024 03:11:47 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2507.39; Wed, 9 Oct 2024 03:11:46 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 9 Oct 2024 03:11:46 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.44) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 9 Oct 2024 03:11:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mg+cTSlRbbUpKEKGAIWmkd4BTk7jBJ99jQclYmPRp4p367IZSRcB4N0OMCfuEGSkoI68d6x/90fIXlgr2Erb+8Uy7IeSjhHIV0EyCJY4GtOJOR1qSiDO5LZ45rf9L+ZcgiVIRMJIbzh4t3kz5pxmTyoTFVrnGKUSo8N1hvGYVWqNeos8ZxZf9IERMYdfaJqRKuZOl/MME/u2Lpu8cq85/Azme4kcQYPUoVn4rhZlN8esfgXbI+Hu73OZvcYkSpnI7CdfkXhl8mrnTx+IXGiiHfZUJwAhkll2iujgf94wZ69YtBGCiWjF1eWSGIqnFZ5yj0ECbRILW2e1DMgDfwJo3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=FduikDbAXK+8mhQcNtuMB23JqgHkbk2eupcCzi6Djlk=; b=qJyvJw9bun65clSNPMQtnxE5ulVW0TtjWpWVPQLSIx4GaX02BP/VyzIJyOgd+0kGYdGxjeWbIgeXf/1f863Ev1GQslM4d1E0FCvq7U0zV40bYRq2qsn8SBE6vckodzLkd/LDo8oEjJQdV7A/qCzdNTYkC+GdTfzhbrKe2/KFQcK5rwuo6r0jD8Do0gNjIWli9RHaV3cHrPU84GITNWJnCCK+0z4iNx7aRNtO+X6pKyc2++Ei2YCXeCdlYwnFd6XXPMWOnhyRwTxtwBDkl+aNE8l+PaDicdffMhogAoxsztXqNiZ0USN7sX2KPNmTu2LzHn/ixVb5UdeQ/BKsqY/+7g== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CO6PR11MB5569.namprd11.prod.outlook.com (2603:10b6:303:139::20) by PH0PR11MB5014.namprd11.prod.outlook.com (2603:10b6:510:31::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Wed, 9 Oct 2024 10:11:39 +0000 Received: from CO6PR11MB5569.namprd11.prod.outlook.com ([fe80::5e92:7b53:f0be:a18b]) by CO6PR11MB5569.namprd11.prod.outlook.com ([fe80::5e92:7b53:f0be:a18b%4]) with mapi id 15.20.8048.017; Wed, 9 Oct 2024 10:11:39 +0000 Message-ID: Date: Wed, 9 Oct 2024 12:11:32 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] bus/pci: don't open uio device in secondary process To: Stephen Hemminger CC: , Chenbo Xia , Nipun Gupta , Peng Zhang , Long Wu , Zerun Fu , Chaoyong He References: <20240828104002.226704-1-konrad.sztyber@intel.com> <20241007104918.463c9adf@hermes.local> Content-Language: en-US From: Konrad Sztyber In-Reply-To: <20241007104918.463c9adf@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0261.eurprd04.prod.outlook.com (2603:10a6:10:28e::26) To CO6PR11MB5569.namprd11.prod.outlook.com (2603:10b6:303:139::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR11MB5569:EE_|PH0PR11MB5014:EE_ X-MS-Office365-Filtering-Correlation-Id: 52da263c-3d7e-47e2-fa94-08dce84ac3ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eU1EL1pLNnZLYVdnY3kyUUEyQUFyanQrNklYWm9XRVR5cTBOUkM4Q0loYnZB?= =?utf-8?B?MjRnenFsWGtCM3RybVpZQ1ZrZUl2a0gzWXZjUXU4TituUzdrWStMWmZ3cTFX?= =?utf-8?B?Z1Jsd2JkWVpEMXhHcXFXdFpkVm84VGk4TUNnQnVKb2NQY3BMUlA4K3hmUkRk?= =?utf-8?B?ejkwSjJERGZ3S1hGNjgzK1phZU1tcHc4aWNWNFgwT2JCMWRkMytYM3o1UVRJ?= =?utf-8?B?QjZKTk44dG9aRmQwbHJqeSszS0RWd0VhMHZwRjhyQW10SzkxZlNDckZjeGk3?= =?utf-8?B?bmU3bFhHa2dTNmRBeHpiamFzRmZGaEZQQ2VxVTE2TElQY2poZmFmeXV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HpaWnA0OXg5L2xnVDFJTSs2MzV1ODNqNnpY?= =?utf-8?B?NUxzNFZSMHVJYktmQXBIYy9TcEN4eURlVEpBVlRVUHNzRVVZUXNTL3ozK05S?= =?utf-8?B?UGNiYjBEeDVVakdOQ1RLVkdLMEJlQXc1cldBMldCSjNpbWJoNmgySExBUnhr?= =?utf-8?B?TTM4Mk4wbXpnN3R1VXI0aUZxOXFpcUp5NklFekJvK2VoUUFUTkJ2RFJiaTcv?= =?utf-8?B?OVExM0F1Ull3cjV3TDJEYjFuU1VzTGtZeXVDVXg3OHVQaHArMUMwUFpxQldJ?= =?utf-8?B?YlM2bVM5d2R3UjdoalZ0aHhGOHVvS2ZDWkdSVTFYNk5YZmF2d1JGd290eXBv?= =?utf-8?B?MzJvS2tjZHg0L1RpN3l3QlpUR0NaM20rUHhlRFo0Q2E5MXkrVlJlRFFST3hZ?= =?utf-8?Q?g1NcQ8TG2xv5NN2bgVSc8PyEZpHHTkCoTTs7hNoPPFEQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR11MB5569.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OENmTE44QWh4alBvMllacmxSSTRaVDhOWUhCYktxelNGNUNjSCs2aVBnNHFw?= =?utf-8?B?WE5QMWk3UWQ0cXZPa2lSU2tSUWdUbk45THFCTmpxV1FNZEQwcFBkb3JWaVA0?= =?utf-8?B?bnVyTWNld1ZtU29YU2x4ckoyMkhGVTVnWWlmZGNWVnZ4Z3VkUFpkQWZ5a3g3?= =?utf-8?B?RzBpVkgrVFJ4ZXlWUXlsdEtnOTR4UEFGQWJmb0RicnAzdWdUWUFxMkNwK2JZ?= =?utf-8?B?WDFicWJnSlpoWlZFbFJsR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SVZDZGZzWG16?= =?utf-8?B?L0s0UzBhVVFCb0E0anhyemJYcGJJNDVQMWUxQ2ZjaE9TL2djUCs1bHMyUURS?= =?utf-8?B?b1R3UU53R1BnM2VjUUJNT0NvVzdxcUxlOXNTQ0xHcHRZdTBKNlR2RDIxUDl5?= =?utf-8?B?TVE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 52da263c-3d7e-47e2-fa94-08dce84ac3ae X-MS-Exchange-CrossTenant-AuthSource: CO6PR11MB5569.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2024 10:11:39.1181 (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: rKMotC/3mcn4GBNBIgfJPKTWBKh1ASSJPi3yJ/ul3FzaIuC48MoeDNUhLWw1+SmwbaJH6cRoc3ZaKLcFl/ScWOdWZ8aytuH0y1p502NUzNk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5014 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 10/7/24 19:49, Stephen Hemminger wrote: > On Wed, 28 Aug 2024 12:40:02 +0200 > Konrad Sztyber wrote: > >> The uio_pci_generic driver clears the bus master bit when the device >> file is closed. So, when the secondary process terminates after probing >> a device, that device becomes unusable in the primary process. >> >> To avoid that, the device file is now opened only in the primary >> process. The commit that introduced this regression, 847d78fb95 >> ("bus/pci: fix FD in secondary process"), only mentioned enabling access >> to config space from secondary process, which still works, as it doesn't >> rely on the device file. >> >> Fixes: 847d78fb95 ("bus/pci: fix FD in secondary process") >> >> Signed-off-by: Konrad Sztyber > > Wouldn't this break use of interrupts in the secondary process? Yes, it will. But I don't think we can support interrupts in the secondary process *and*, at the same time, keep the device usable in the primary process when secondary terminates. Maybe we could pass the fd via SCM_RIGHTS? But I don't know if that results in the same struct file being used by both processes. > The patch does need the minor fix of the comment style. > So resubmit I already did, see: https://inbox.dpdk.org/dev/20240829085724.270041-1-konrad.sztyber@intel.com