From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Xu Subject: Re: [PATCH 0/4] check if any kernel driver is manipulating the virtio device Date: Mon, 28 Dec 2015 11:08:57 +0800 Message-ID: <20151228030857.GA8686@pxdev.xzpeter.org> References: <20151222035041.GA7532@pxdev.xzpeter.org> <1450982292-129560-1-git-send-email-huawei.xie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: dev@dpdk.org To: Huawei Xie Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6E1855A26 for ; Mon, 28 Dec 2015 04:09:11 +0100 (CET) Content-Disposition: inline In-Reply-To: <1450982292-129560-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 Fri, Dec 25, 2015 at 02:38:08AM +0800, Huawei Xie wrote: > 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 Thanks for the patch. Looks good to me. Peter > > drivers/net/virtio/virtio_ethdev.c | 15 +++++++++++++-- > lib/librte_eal/common/eal_common_pci.c | 8 ++++---- > lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- > 3 files changed, 18 insertions(+), 7 deletions(-) > > -- > 1.8.1.4 >