Thread (122 messages) 122 messages, 8 authors, 2016-02-03

Re: [PATCH v2 6/7] eal: pci: export pci_map_device

From: Santosh Shukla <hidden>
Date: 2016-01-13 14:44:17

On Tue, Jan 12, 2016 at 2:35 PM, Yuanhan Liu
[off-list ref] wrote:
On Tue, Jan 12, 2016 at 04:40:43PM +0800, Yuanhan Liu wrote:
quoted
On Tue, Jan 12, 2016 at 09:31:05AM +0100, David Marchand wrote:
quoted
On Tue, Jan 12, 2016 at 7:59 AM, Yuanhan Liu [off-list ref]
wrote:

    Normally we could set RTE_PCI_DRV_NEED_MAPPING flag so that eal will
    invoke pci_map_device internally for us. From that point view, there
    is no need to export pci_map_device.

    However, for virtio pmd driver, which is designed to work without
    binding UIO (or something similar first), pci_map_device() will fail,
    which ends up with virtio pmd driver being skipped. Therefore, we can
    not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver.

    Therefore, this patch exports pci_map_device, and let virtio pmd
    call it when necessary.


Well, if you introduce map function, I suppose, for hotplug, you would need
unmap.
Good remind. Thanks. I will export pci_unmap_device as well.
And here you go.

        --yliu

-- >8 --
From aa3d9d0fa827781d1563fd4c06ba04a8fafdc41c Mon Sep 17 00:00:00 2001
From: Yuanhan Liu <redacted>
Date: Mon, 11 Jan 2016 16:51:35 +0800
Subject: [PATCH] eal: pci: export pci_[un]map_device

Normally we could set RTE_PCI_DRV_NEED_MAPPING flag so that eal will
invoke pci_map_device internally for us. From that point view, there
is no need to export pci_map_device.

However, for virtio pmd driver, which is designed to work without
binding UIO (or something similar first), pci_map_device() will fail,
which ends up with virtio pmd driver being skipped. Therefore, we can
not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver.

Therefore, this patch exports pci_map_device, and let virtio pmd
call it when necessary.

Signed-off-by: Yuanhan Liu <redacted>
---
v2: - export pci_unmap_device as well

    - Add few more comments about rte_eal_pci_map_device().
This patch tested for vfio-noIOMMU mode for arm64 platform.
Tested-By: Santosh Shukla <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help