From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH v3 0/4] fix the issue that DPDK takes over virtio device blindly Date: Fri, 26 Feb 2016 09:40:31 +0100 Message-ID: References: <20151222035041.GA7532@pxdev.xzpeter.org> <1453908082-92036-1-git-send-email-huawei.xie@intel.com> <33109608.rF1RQkQoo2@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" , "Troitsky, Nikita" To: "Xie, Huawei" Return-path: Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by dpdk.org (Postfix) with ESMTP id 4176D2C32 for ; Fri, 26 Feb 2016 09:40:51 +0100 (CET) Received: by mail-oi0-f54.google.com with SMTP id w80so1242990oiw.2 for ; Fri, 26 Feb 2016 00:40:51 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Feb 26, 2016 at 7:09 AM, Xie, Huawei wrote: > On 2/24/2016 8:45 PM, Thomas Monjalon wrote: >>> Huawei Xie (4): >>> eal: make the comment more accurate >>> eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device. >>> virtio: return 1 to tell the kernel we don't take over this device >>> virtio: check if kernel driver is manipulating the virtio device >> The virtio PCI code has been refactored. >> Please Huawei, would it be possible to rebase on master? > > OK. Since IO port map is moved to EAL layer, it is not straightforward > like before for virtio PMD to distinguish the reason why port map fails. > We have two choices. Return 1 to the upper layer to say that we don't > take over the device for all the map failures or we check the driver > type, return -1 for UIO/VFIO driver error, return 1 for kernel driver, > which is a bit overelaborate. The important thing is to have eal report "none" driver first (your 2nd patch) , then in ioport_map, "none" driver will trigger the x86 special case (see other discussion [1]). For "uio" drivers, code (when fixed for uio_pci_generic) already does the right stuff. "vfio" is handled. Anything else should fail once we have the "none" driver correctly reported. What did I miss ? [1] http://dpdk.org/ml/archives/dev/2016-February/034035.html -- David Marchand