From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2 0/4] fix the issue that DPDK takes over virtio device blindly Date: Mon, 4 Jan 2016 09:25:07 -0800 Message-ID: <20160104092507.297de1df@xeon-e3> References: <20151222035041.GA7532@pxdev.xzpeter.org> <1451843773-103006-1-git-send-email-huawei.xie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Huawei Xie Return-path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id E23438E93 for ; Mon, 4 Jan 2016 18:24:58 +0100 (CET) Received: by mail-pf0-f180.google.com with SMTP id 65so160140914pff.3 for ; Mon, 04 Jan 2016 09:24:58 -0800 (PST) In-Reply-To: <1451843773-103006-1-git-send-email-huawei.xie@intel.com> 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 Mon, 4 Jan 2016 01:56:09 +0800 Huawei Xie wrote: > v2 changes: > Remove unnecessary assignment of NULL to dev->data->mac_addrs > Ajust one comment's position > change LOG level from ERR to INFO > > virtio PMD doesn't set RTE_PCI_DRV_NEED_MAPPING in drv_flags of its > eth_driver. It will try igb_uio and PORT IO in turn to configure > virtio device. Even user in guest VM doesn't want to use virtio for > DPDK, virtio PMD will take over the device blindly. > > The more serious problem is kernel driver is still manipulating the > device, which causes driver conflict. > > This patch checks if there is any kernel driver manipulating the > virtio device before virtio PMD uses port IO to configure the device. > > 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 any kernel driver is manipulating the virtio device > > drivers/net/virtio/virtio_ethdev.c | 16 ++++++++++++++-- > lib/librte_eal/common/eal_common_pci.c | 8 ++++---- > lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- > 3 files changed, 19 insertions(+), 7 deletions(-) > Overall looks good, thanks for addressing this. It would be good to note that VFIO no-IOMMU mode should work for this as well.