From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mIYRftd7/yvygCD5EehN4bU9+7qZHU5Oq7UbcMukiV8=; b=0cTzU+fkvr2gtyCQ1+Ad98h2sVjybDgFeBkvT5l5mteI7JohuKwUvjV1P1q91pBVGy l1hCmAwAYYI9a/UnA3lUb/1LIpx5qKdKUB0LYtRHHXcz0h7BIp/lLIvGPNWOGhH7r5UI 9RLvQPDOMoAmZ/XKw80x168UAC73Mxt+N2inj0kb/Ura5lKJtl6A0MIfbj6vWCsggaFz mZGFLI7uuWqH5rShHeyhO2q97Mw+mKlbvterM/TNI7EkD9ctizLiV1SpNJDSgG4xXLcn bsv7tWamRlxsxf1dPHnACuzDWJw1j7MdlQoaytMwWiyQje0UONADeIJ/Fwn2rWk+dzD4 rCqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mIYRftd7/yvygCD5EehN4bU9+7qZHU5Oq7UbcMukiV8=; b=Ikq+Nsoj+pxRhcy/Xvi40MJQlQ5QKU9Dnxdwu8O23nQxrjpGE8ZlMnh7mcLKzdXgNp OdIKmUoU+/rLW8byqGOxlvtatROgPPb+g/02BRvZ6Gl6cVi4BEVx7I7+f2m/6S8mx9jC 8gjARpAtEb2+R9sXChKrkUCLabKccdaah56d1agMELA9sPiMGeQ6XlyGN2Lr76WEwctX 1iAb2mVa5JQfo8i2XxRE1doEJB7bf6M+mMGhWbsd7d+qqnjBGpR7+0lpk+Zz7qgRtylR z/jQTJuMTuzrmkcoJT6nUZfV6kblLf1Y9l6Nkl4oeolIdPtJwgWlXQ7t8JYw4OHCc0j0 h/dA== X-Gm-Message-State: AD7BkJI69mn7Nt6gisVgjqnlZKhjM6fV8/jzilj1a+bnFFa8pRwCDsvePx9nSdaEACyLqAovSwnW4W0AjYO2K8dw X-Received: by 10.202.214.78 with SMTP id n75mr217441oig.51.1456476050716; Fri, 26 Feb 2016 00:40:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.180.72 with HTTP; Fri, 26 Feb 2016 00:40:31 -0800 (PST) In-Reply-To: References: <20151222035041.GA7532@pxdev.xzpeter.org> <1453908082-92036-1-git-send-email-huawei.xie@intel.com> <33109608.rF1RQkQoo2@xps13> From: David Marchand Date: Fri, 26 Feb 2016 09:40:31 +0100 Message-ID: To: "Xie, Huawei" Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" , "Troitsky, Nikita" Subject: Re: [dpdk-dev] [PATCH v3 0/4] fix the issue that DPDK takes over virtio device blindly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2016 08:40:51 -0000 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