From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 8FA1EDE6 for ; Wed, 13 Jan 2016 13:18:48 +0100 (CET) Received: by mail-pa0-f47.google.com with SMTP id cy9so357804196pac.0 for ; Wed, 13 Jan 2016 04:18:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hVYgAoKUhudnR1Vip+C3EMO3qfyLEgJ8uUC9lXM2zKY=; b=YEwLUrM82t26OTCPW7N3khLVOXnQcgahsIQS5lUMx04QVGcMLTjGikyiOdt3wZGqqs X7QbLvz7xO4SgFBF2IWLgd7hMvKnRrmHU1rfohkP/ufeXNbybc4Kjth0kpEwJjKUeO4Y TN+EXqHQka3FdlrPXvcZg/bQAsIE5HtPWYLaoul+2ykuRs/om3k0McRy1jaH/8dHN5bO U73PHD0PBRaDenJ/EawrRiYG1mKNxBgqcKTIBYmc6DnPFgGkZzrnfjC8mq8y7cAtAcgo Xn/Js1Oqb/CFCfamL9Ws5ItKbgMCl/3MPwE9OkjRNnX0bBZ0ZQF0bAIteu0o5cUOt1I+ O5Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=hVYgAoKUhudnR1Vip+C3EMO3qfyLEgJ8uUC9lXM2zKY=; b=YYTW5eZJ9VSbF4RDU6c08sznwp3FOfqEBSHdgGOsbyIoOMWQf+L0h2dGGZ0d8P7IbG 2zhJeSIz1RkLWAUMYu/oKwQopNVbJbhxE/pxUfP1dKVsadSMgsv/89EORr1XXJWeTaB1 UHHGIttaTl1Sdxvs65kbRy7C6urm8GaLve8GY1L6GEXvZMdfbcl3wetZQmGuk/2BD9aN b0GKkkFb1Se3T+SgfwasdNgcPTKNKHzdfz/VwGPculMrhw9dew5jyt3ga3ntQa53syRS zu27mKzDCyfbMgEp9gTpgeaqWKa9RhMQ6uPV6EY4KOARa5AdFRl31W7HYxv3YOe8CuqG tdwA== X-Gm-Message-State: ALoCoQl28cRVKPUM08kYwHvOzUjT3HcI0olK5bxLaqTrtDgzd0ln6vJUngtusWeiD96aLfI8Eax07sPAJWUpHh9QJDlYI6LJdLEOndwGV2xMPSkh/95LcRE= MIME-Version: 1.0 X-Received: by 10.67.5.228 with SMTP id cp4mr17628974pad.29.1452687527966; Wed, 13 Jan 2016 04:18:47 -0800 (PST) Received: by 10.66.196.81 with HTTP; Wed, 13 Jan 2016 04:18:47 -0800 (PST) In-Reply-To: <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> <20160112071417.GO26062@yliu-dev.sh.intel.com> Date: Wed, 13 Jan 2016 17:48:47 +0530 Message-ID: From: Santosh Shukla To: Yuanhan Liu Content-Type: text/plain; charset=UTF-8 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: Wed, 13 Jan 2016 12:18:49 -0000 On Tue, Jan 12, 2016 at 12:44 PM, Yuanhan Liu wrote: > 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/ > Yes, It works, so wont need NEED_MAPPING flag, Sending v4 patch series rebased on this patch.. > --yliu > >> Let me know my approach aligned to your suggestion.