From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Xie, Huawei" Subject: Re: [PATCH v2 0/4] fix the issue that DPDK takes over virtio device blindly Date: Tue, 12 Jan 2016 05:16:58 +0000 Message-ID: References: <20151222035041.GA7532@pxdev.xzpeter.org> <1451843773-103006-1-git-send-email-huawei.xie@intel.com> <20160104092507.297de1df@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Santosh Shukla Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D29635949 for ; Tue, 12 Jan 2016 06:17:02 +0100 (CET) Content-Language: en-US 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 1/12/2016 12:24 PM, Santosh Shukla wrote:=0A= > On Tue, Jan 12, 2016 at 8:32 AM, Xie, Huawei wrote= :=0A= >> On 1/5/2016 1:25 AM, Stephen Hemminger wrote:=0A= >>> On Mon, 4 Jan 2016 01:56:09 +0800=0A= >>> Huawei Xie wrote:=0A= >>>=0A= >>>> v2 changes:=0A= >>>> Remove unnecessary assignment of NULL to dev->data->mac_addrs=0A= >>>> Ajust one comment's position=0A= >>>> change LOG level from ERR to INFO=0A= >>>>=0A= >>>> virtio PMD doesn't set RTE_PCI_DRV_NEED_MAPPING in drv_flags of its=0A= >>>> eth_driver. It will try igb_uio and PORT IO in turn to configure=0A= >>>> virtio device. Even user in guest VM doesn't want to use virtio for=0A= >>>> DPDK, virtio PMD will take over the device blindly.=0A= >>>>=0A= >>>> The more serious problem is kernel driver is still manipulating the=0A= >>>> device, which causes driver conflict.=0A= >>>>=0A= >>>> This patch checks if there is any kernel driver manipulating the=0A= >>>> virtio device before virtio PMD uses port IO to configure the device.= =0A= >>>>=0A= >>>> Huawei Xie (4):=0A= >>>> eal: make the comment more accurate=0A= >>>> eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating t= he device.=0A= >>>> virtio: return 1 to tell the kernel we don't take over this device= =0A= >>>> virtio: check if any kernel driver is manipulating the virtio device= =0A= >>>>=0A= >>>> drivers/net/virtio/virtio_ethdev.c | 16 ++++++++++++++--=0A= >>>> lib/librte_eal/common/eal_common_pci.c | 8 ++++----=0A= >>>> lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-=0A= >>>> 3 files changed, 19 insertions(+), 7 deletions(-)=0A= >>>>=0A= >>> Overall looks good, thanks for addressing this.=0A= >>>=0A= >>> It would be good to note that VFIO no-IOMMU mode should work for this= =0A= >>> as well.=0A= >> It isn't implemented yet in virtio PMD. I could add a note in the commit= =0A= >> message. Do you plan to implement this?=0A= >>=0A= > I can send vfio-noiommu patches for this one, as I am looking at=0A= > vfio-noiommu for virtio for my arm v4 patch series. Stephen, let me=0A= > know if you already started working on this?=0A= >=0A= > Also for some reason I can't find [3/4] patch, could you point me to=0A= > patch link? Thanks.=0A= Thanks. Here is the patch: http://www.dpdk.org/dev/patchwork/patch/9720/=0A= =0A=