From mboxrd@z Thu Jan 1 00:00:00 1970 From: Santosh Shukla Subject: Re: [PATCH v2 0/4] fix the issue that DPDK takes over virtio device blindly Date: Wed, 13 Jan 2016 17:47:25 +0530 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=UTF-8 Cc: "dev@dpdk.org" To: "Xie, Huawei" Return-path: Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 855D28E74 for ; Wed, 13 Jan 2016 13:17:26 +0100 (CET) Received: by mail-pf0-f182.google.com with SMTP id e65so80870098pfe.0 for ; Wed, 13 Jan 2016 04:17:26 -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 Tue, Jan 12, 2016 at 10:46 AM, Xie, Huawei wrote: > On 1/12/2016 12:24 PM, Santosh Shukla wrote: >> On Tue, Jan 12, 2016 at 8:32 AM, Xie, Huawei wrote: >>> On 1/5/2016 1:25 AM, Stephen Hemminger wrote: >>>> 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. >>> It isn't implemented yet in virtio PMD. I could add a note in the commit >>> message. Do you plan to implement this? >>> >> I can send vfio-noiommu patches for this one, as I am looking at >> vfio-noiommu for virtio for my arm v4 patch series. Stephen, let me >> know if you already started working on this? >> >> Also for some reason I can't find [3/4] patch, could you point me to >> patch link? Thanks. > Thanks. Here is the patch: http://www.dpdk.org/dev/patchwork/patch/9720/ > Thanks, I am rebasing my v4 series on top of this patch, although I couldn't see current series creating issue for vfio-noiommu case. We'll post feedback in v4 cover-letter.