Thread (29 messages) 29 messages, 6 authors, 2016-01-13

Re: [PATCH v3 09/12] virtio: vfio: Enable RTE_PCI_DRV_NEED_MAPPING flag in driver

From: Santosh Shukla <hidden>
Date: 2016-01-13 12:18:48

On Tue, Jan 12, 2016 at 12:44 PM, Yuanhan Liu
[off-list ref] wrote:
On Sat, Jan 09, 2016 at 06:08:46PM +0530, Santosh Shukla wrote:
quoted
On Thu, Jan 7, 2016 at 11:50 PM, Stephen Hemminger
[off-list ref] wrote:
quoted
On Thu,  7 Jan 2016 22:03:06 +0530
Santosh Shukla [off-list ref] wrote:
quoted
+#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
quoted
Let me know my approach aligned to your suggestion.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help