[dpdk-dev] [PATCH v4] pci: support both PIO and MMIO BAR for legacy virtio on x86
谢华伟(此时此刻)
huawei.xhw at alibaba-inc.com
Wed Oct 21 10:46:59 CEST 2020
Hi Ferruh:
Comments to this patch? Customers are urging us to run DPDK with virtio
mmio support.
@david
Though this patch is to support MMIO bar, it is the right thing to do.
Previous code with virtio (IO/MMIO) port map/RW under different driver
is too complicated.
This patch also fixes the performance issue with VFIO port write(virtio
only).
Besides, next thing we could do is to move some of those PCI codes to
virtio PMD as they are for virtio
PMD only.
/huawei
On 2020/10/13 16:41, 谢华伟(此时此刻) wrote:
> From: "huawei.xhw" <huawei.xhw at alibaba-inc.com>
>
> Legacy virtio-pci only supports PIO BAR resource. As we need to create lots of
> virtio devices and PIO resource on x86 is very limited, we expose MMIO BAR.
>
> Kernel supports both PIO and MMIO BAR for legacy virtio-pci device. We handles
> different type of BAR in the similar way.
>
> In previous implementation, with igb_uio we get PIO address from igb_uio
> sysfs entry; with uio_pci_generic, we get PIO address from
> /proc/ioports.
> For PIO/MMIO RW, there is different path for different drivers and arch.
> For VFIO, PIO/MMIO RW is through syscall, which has big performance
> issue.
> On X86, it assumes only PIO is supported.
>
> All of the above is too much twisted.
> This patch unifies the way to get both PIO and MMIO address for different driver
> and arch, all from standard resource attr under pci sysfs.
>
> We distinguish PIO and MMIO by their address like how kernel does. It is ugly but works.
>
> Signed-off-by: huawei.xhw <huawei.xhw at alibaba-inc.com>
> ---
> drivers/bus/pci/linux/pci.c | 89 +--------------------
> drivers/bus/pci/linux/pci_uio.c | 167 +++++++++++++++++++++++++++-------------
> 2 files changed, 119 insertions(+), 137 deletions(-)
>
> diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
> index bf27594..885e54e 100644
> --- a/drivers/bus/pci/linux/pci.c
> +++ b/drivers/bus/pci/linux/pci.c
> @@ -687,71 +687,6 @@ int rte_pci_write_config(const struct rte_pci_device *device,
> }
> }
>
>
More information about the dev
mailing list