From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 8E8395A1F for ; Tue, 12 Jan 2016 04:02:40 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 11 Jan 2016 19:02:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,556,1444719600"; d="scan'208";a="891250292" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 11 Jan 2016 19:02:39 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 11 Jan 2016 19:02:38 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 11 Jan 2016 19:02:38 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.111]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.201]) with mapi id 14.03.0248.002; Tue, 12 Jan 2016 11:02:36 +0800 From: "Xie, Huawei" To: Stephen Hemminger Thread-Topic: [PATCH v2 0/4] fix the issue that DPDK takes over virtio device blindly Thread-Index: AdFM5bBsrCBu8USfSAuyFIWhpt++Eg== Date: Tue, 12 Jan 2016 03:02:36 +0000 Message-ID: References: <20151222035041.GA7532@pxdev.xzpeter.org> <1451843773-103006-1-git-send-email-huawei.xie@intel.com> <20160104092507.297de1df@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 0/4] fix the issue that DPDK takes over virtio device blindly 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: Tue, 12 Jan 2016 03:02:41 -0000 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 the= 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= =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= >=0A= =0A=