From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id 58EF85A06 for ; Sat, 9 Jan 2016 13:38:47 +0100 (CET) Received: by mail-pa0-f49.google.com with SMTP id yy13so204214756pab.3 for ; Sat, 09 Jan 2016 04:38:47 -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=PpvGDBofu3g/1jI44ctoFKg2g81r12Rjs9jOuL+IOQ0=; b=l5pw0JRLuq/BJGkOCrSGcxnlwbWK+eDMFynSJK07Fb7ZVfk+bfxOb6EmCKCQTV5sid kZHa9Y+IJAEGCffnjqu+0XE0AMKt5u7L3vWXzqp+MNCiM5ZX1Ikz/9yIlWshZdDTaQnb C2BSGEnTzsH1hsPgb+VhJ4v+CBJPDI+tDZrCkycH5hw3Ub3iG7sAxs9d1OVETW1OF2q5 GwTVjxS0K3/TJdzpG4dDV+C5hqqduj4cwDr8s0pH/+1qDiKcHyz/adgTTVee1voBdj9p OswWtkSE+4GHpwBQT8X3dkTnTYX9Jovh1ozWisAsDn8WuRUfq6uU3T+tJDY8oHOJSIel 0y5Q== 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=PpvGDBofu3g/1jI44ctoFKg2g81r12Rjs9jOuL+IOQ0=; b=HcXgs1k6pGcV3cOG9cqkod6CAEfnCPz5PbvQ8cVJ13uX58eFIGWasp0HeB5R9wqpoH h8TMZHWMODmv8gXR6RYFdzKJlDQYSWhyYVFWjOLT0eNqPZBrp0SkyV+59aIEdEweQQ8l yQxhist2HyXdHfhOEgC1yfmyflvc+4syryyA5WFntnhSg4y5KZ+VQ15EFGsgjwfINk/c LsKck/g0lMz0iSipLkCJk2meB6MFEDP3XelO7v1h1vj5HXPBN3eAHnDUtonL6L9LWO9S kbIUZMAS3q+1gF0S5jur2scuO8wBkyhjOVPIfZ3hLOoW90xGX+QtPEsdg4RMALGiyISs /Xcg== X-Gm-Message-State: ALoCoQmK6tOvLI5VIOnK3j+ZfAUMJbnO6MD81qgCfWhh1TDRN8OcG1vC6ir/HTtSdRpg2nChZIKfvWI+u5vqJtdnWnk4R4M9SYm8NFim6vEE+SwaCEzW/Hs= MIME-Version: 1.0 X-Received: by 10.66.240.97 with SMTP id vz1mr166225542pac.29.1452343126329; Sat, 09 Jan 2016 04:38:46 -0800 (PST) Received: by 10.66.196.81 with HTTP; Sat, 9 Jan 2016 04:38:46 -0800 (PST) In-Reply-To: <20160107102058.43499eae@xeon-e3> References: <1452184390-5994-1-git-send-email-sshukla@mvista.com> <1452184390-5994-10-git-send-email-sshukla@mvista.com> <20160107102058.43499eae@xeon-e3> Date: Sat, 9 Jan 2016 18:08:46 +0530 Message-ID: From: Santosh Shukla To: Stephen Hemminger 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: Sat, 09 Jan 2016 12:38:47 -0000 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. Let me know my approach aligned to your suggestion.