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 AF61F45AF3; Wed, 9 Oct 2024 17:12:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 332A3402C3; Wed, 9 Oct 2024 17:12:15 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id CDE16402A9 for ; Wed, 9 Oct 2024 17:12:13 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-7ea03ecf191so3052744a12.0 for ; Wed, 09 Oct 2024 08:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728486733; x=1729091533; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=p0jtxuCB2mN7XBCbtDbSbIx2iYPxO2Bau7RTY0Tga0o=; b=Lt10+10pHCrfcS3DZPj2F8bpmsI1i27wa6q4blUcGCkP00fQIGPhYBSpGOOPwowdpz DVff/cGFgaVz7vPQDt7i39cDtJJ6Tjmgmz12sFxpcPjEi9wmoT5Cc6eE9zk6HbQw1p8y 5OqFPC/+6+QDgVvPwMgdwPfMW2Jfbczmf4dyujuZBs0eU9Zy/UY+lh7Rp6B/PTq9NhS5 Ncke8QaeWalUbL8A+K9qcspDfLHDy+HtvON/3tOZAU4tsnqZ1quypiT3Zv03Llm4yoOe hA/JBrQ2fu/g6qephaaGGyjH+mScBZkOUTWJDZRikXXez03tSSHPKiOZVRvO30Xi3rNh bpVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728486733; x=1729091533; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p0jtxuCB2mN7XBCbtDbSbIx2iYPxO2Bau7RTY0Tga0o=; b=HGNstuD3ZsN55ewXzjvA2B3ZWh3GTCjJO2atYIiiIXEJeYlJRMIpSrPeZul5JMDERj 3WqbXZJRGOCFS5w13Twfjib2BCMdnEyRPFZm23eOS6pLLMmJJnaJH+wz6P2K0T2squvf HbHIncLz1erOEjZvz7PvwQuD2L28FweALAqWg/1Ies/PqfSaYWW1bhSVn8Q1ZFhC0GUO Q5MACdrvWUvipCwiL5FR8J6gIYJAzd/0rzfzWy5wvSM1qjpFJa25FUvlSpM5xb3Talnr uDbf2I5KiPlsRyIQjgGBvd68sncK9WFw1zrFPbqze4J2Y0q/D88NFrAgKglnsmgLiQIn Ua5g== X-Gm-Message-State: AOJu0Yx/PxV2n2ZYnECjnrUvb1ttzty0BY6XyoaO/BBFhLkV1AVYxDO6 PDePzJ5JST+gG5yoBi0I1hsfRi5t6wYuw+MUh6AiTsbuzcZz9schSIwKWjdCJW4= X-Google-Smtp-Source: AGHT+IHS/4pRyk/D+xwVrMawC9z0cRaEz67w3uXV0hsxKAIgMtuuW7s8YsBbjp3gmj8dlJdnLkrJsw== X-Received: by 2002:a05:6a21:3a48:b0:1cc:ef11:f2bf with SMTP id adf61e73a8af0-1d8a3c3ac9cmr4169338637.31.1728486732622; Wed, 09 Oct 2024 08:12:12 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e26a3b87fsm66783b3a.188.2024.10.09.08.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 08:12:12 -0700 (PDT) Date: Wed, 9 Oct 2024 08:12:10 -0700 From: Stephen Hemminger To: Konrad Sztyber Cc: , Chenbo Xia , Nipun Gupta , Peng Zhang , Long Wu , Zerun Fu , Chaoyong He Subject: Re: [PATCH] bus/pci: don't open uio device in secondary process Message-ID: <20241009081210.42fdcde8@hermes.local> In-Reply-To: References: <20240828104002.226704-1-konrad.sztyber@intel.com> <20241007104918.463c9adf@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 9 Oct 2024 12:11:32 +0200 Konrad Sztyber wrote: > 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. That is what tap, and xdp are doing.