From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 624588CF55; Mon, 28 Dec 2015 03:09:10 +0000 (UTC) Received: from pxdev.xzpeter.org (dhcp-14-147.nay.redhat.com [10.66.14.147]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBS38wK7010375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 27 Dec 2015 22:09:02 -0500 Date: Mon, 28 Dec 2015 11:08:57 +0800 From: Peter Xu To: Huawei Xie 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 Content-Disposition: inline In-Reply-To: <1450982292-129560-1-git-send-email-huawei.xie@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 0/4] check if any kernel driver is manipulating the virtio device 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: Mon, 28 Dec 2015 03:09:11 -0000 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 >