From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 149B28DED for ; Tue, 22 Dec 2015 07:59:16 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 21 Dec 2015 22:59:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,463,1444719600"; d="scan'208";a="878822333" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by fmsmga002.fm.intel.com with ESMTP; 21 Dec 2015 22:59:15 -0800 Date: Tue, 22 Dec 2015 15:00:29 +0800 From: Yuanhan Liu To: Peter Xu Message-ID: <20151222070029.GO18863@yliu-dev.sh.intel.com> References: <20151222035041.GA7532@pxdev.xzpeter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151222035041.GA7532@pxdev.xzpeter.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 06:59:17 -0000 On Tue, Dec 22, 2015 at 11:50:41AM +0800, Peter Xu wrote: > Hi, > > I got a question related to how virtio pmd driver work without > UIO layer. > > I see that in virtio PMD driver, DPDK will first try to init the > device using UIO interfaces. If it fails, it will try to init by > manipulating IO ports directly (see virtio_resource_init()). > > For the ioport case, is it okay to do it like this? E.g., in > eth_virtio_dev_init(), we are resetting the virtio device, however, > this device should still be owned by virtio-pci driver in the > kernel. > > How is that working? Did I miss anything? That's for configuration part: as far as we can read/write the right PCI port, virtio pmd configuration will work. Note that on this case, uio just provides another way to tell you where the port is. --yliu