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 DD39F5693 for ; Tue, 12 Jan 2016 08:13:22 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 11 Jan 2016 23:13:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,556,1444719600"; d="scan'208";a="632049763" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by FMSMGA003.fm.intel.com with ESMTP; 11 Jan 2016 23:13:20 -0800 Date: Tue, 12 Jan 2016 15:14:17 +0800 From: Yuanhan Liu To: Santosh Shukla Message-ID: <20160112071417.GO26062@yliu-dev.sh.intel.com> References: <1452184390-5994-1-git-send-email-sshukla@mvista.com> <1452184390-5994-10-git-send-email-sshukla@mvista.com> <20160107102058.43499eae@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3 09/12] virtio: vfio: Enable RTE_PCI_DRV_NEED_MAPPING flag in driver 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 07:13:23 -0000 On Sat, Jan 09, 2016 at 06:08:46PM +0530, Santosh Shukla wrote: > On Thu, Jan 7, 2016 at 11:50 PM, Stephen Hemminger > wrote: > > On Thu, 7 Jan 2016 22:03:06 +0530 > > Santosh Shukla wrote: > > > >> +#ifdef RTE_EAL_VFIO > >> + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE, > >> +#else > >> .drv_flags = RTE_PCI_DRV_DETACHABLE, > >> +#endif > > > > Since VFIO is determined at runtime not compile time, the flags should > > be updated at runtime not compile time. > > > > > In general, Yes, Its a wrong approach i..e. Wrapping __need_mapping > flag only for vfio case. I am thinking to add vfio parser routine > something similar to virtio_xxx_xx_uio_xx() / virtio_xx_xx_ioport() > currently exist. This will remove RTE_EAL_VFIO ifdef clutter for this > patch and [08/12] patch and also virtio pmd driver can then initialize > device for vfio mode.. > > _but_ I still need _MAPPING flag enabled for in virtio driver as > because for vfio case - I want vfio_xx_mmap() routine to create vfio > container/group_id and then create vfio_dev_fd for each virtio-net-pci > interface. I'm thinking my following patch will help: http://dpdk.org/dev/patchwork/patch/9814/ --yliu > Let me know my approach aligned to your suggestion.