From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 62F21568D for ; Tue, 22 Dec 2015 11:53:30 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 22 Dec 2015 02:53:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,464,1444719600"; d="scan'208";a="712721273" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 22 Dec 2015 02:53:30 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 22 Dec 2015 02:53:29 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 22 Dec 2015 02:53:28 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.190]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.151]) with mapi id 14.03.0248.002; Tue, 22 Dec 2015 18:53:27 +0800 From: "Xie, Huawei" To: Peter Xu , Yuanhan Liu Thread-Topic: [dpdk-dev] [Question] How pmd virtio works without UIO? Thread-Index: AdE8piK6l8VXEhglRhmhlN1f6b8L3Q== Date: Tue, 22 Dec 2015 10:53:26 +0000 Message-ID: References: <20151222035041.GA7532@pxdev.xzpeter.org> <20151222070029.GO18863@yliu-dev.sh.intel.com> <20151222082338.GG7532@pxdev.xzpeter.org> <20151222083246.GT18863@yliu-dev.sh.intel.com> <20151222095641.GH7532@pxdev.xzpeter.org> 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: DPDK Dev Subject: Re: [dpdk-dev] [Question] How pmd virtio works without UIO? 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, 22 Dec 2015 10:53:30 -0000 On 12/22/2015 6:48 PM, Xie, Huawei wrote:=0A= > On 12/22/2015 5:57 PM, Peter Xu wrote:=0A= >> On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote:=0A= >>> Actually, you are right. I mentioned in the last email that this is=0A= >>> for configuration part. To answer your question in this email, you=0A= >>> will not be able to go that further (say initiating virtio pmd) if=0A= >>> you don't unbind the origin virtio-net driver, and bind it to igb_uio= =0A= >>> (or something similar).=0A= >>>=0A= >>> The start point is from rte_eal_pci_scan, where the sub-function=0A= >>> pci_san_one just initates a DPDK bond driver.=0A= >> I am not sure whether I do understand your meaning correctly=0A= >> (regarding "you willl not be able to go that furture"): The problem=0A= >> is that, we _can_ run testpmd without unbinding the ports and bind=0A= >> to UIO or something. What we need to do is boot the guest, reserve=0A= >> huge pages, and run testpmd (keeping its kernel driver as=0A= >> "virtio-pci"). In pci_scan_one():=0A= >>=0A= >> if (!ret) {=0A= >> if (!strcmp(driver, "vfio-pci"))=0A= >> dev->kdrv =3D RTE_KDRV_VFIO;=0A= >> else if (!strcmp(driver, "igb_uio"))=0A= >> dev->kdrv =3D RTE_KDRV_IGB_UIO;=0A= >> else if (!strcmp(driver, "uio_pci_generic"))=0A= >> dev->kdrv =3D RTE_KDRV_UIO_GENERIC;=0A= >> else=0A= >> dev->kdrv =3D RTE_KDRV_UNKNOWN;=0A= >> } else=0A= >> dev->kdrv =3D RTE_KDRV_UNKNOWN;=0A= >>=0A= >> I think it should be going to RTE_KDRV_UNKNOWN=0A= >> (driver=3D=3D"virtio-pci") here. I tried to run IO and it could work,=0A= >> but I am not sure whether it is safe, and how.=0A= > Good catch, peter.=0A= > Actually recently customers complain that with this feature, DPDK always= =0A= > tries to take over this virtio-pci device, which is unwanted behavior.=0A= > Using blacklist could workaround this issue.=0A= > However, the real serious problem is that kernel driver is still=0A= > managing this device.=0A= >=0A= > Changchun, Thomas:=0A= > I think we should fix this, but firstly i wonder why using port IO to=0A= > get PCI resource is more secure.=0A= >=0A= >> Also, I am not sure whether I need to (at least) unbind the=0A= >> virtio-pci driver, so that there should have no kernel driver=0A= >> running for the virtio device before DPDK using it.=0A= > If you unbind, you have no entry under /proc/ioports for virtio IO port.= =0A= >> Thanks=0A= >> Peter=0A= >>=0A= >>> --yliu=0A= >=0A= =0A=