[dpdk-dev] backport virtio mmio support to LTS version

2021-06-07 Thread (
Hi: Customer want to develop their NFV app based on LTS version. How about back-porting the mmio patches to LTS version, like 20.11?

Re: [dpdk-dev] [PATCH v11 0/2] support both PIO and MMIO BAR for legacy virito device

2021-03-17 Thread (
On 2021/3/15 22:16, David Marchand wrote: v10 changes: - trival fixes in commit message, like > 75 chars v11 changes: - commit message fix and change Aligned Sob and Author to fix the last checkpatch warning. Series applied to the main branch. Thanks Huawei and thanks too to revie

Re: [dpdk-dev] [PATCH v11 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-03-15 Thread (
On 2021/3/15 18:19, David Marchand wrote: #else #define IO_COND(addr, is_pio, is_mmio) do { \ is_mmio; \ } while (0) #endif We should not just copy/paste kernel code. Plus here, this seems a bit overkill. And there are other parts in thi

[dpdk-dev] [PATCH v11 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-03-10 Thread (
With I/O BAR, we get PIO(port-mapped I/O) address. With MMIO(memory-mapped I/O) BAR, we get mapped virtual address. We distinguish PIO and MMIO by their address range like how kernel does, i.e, address below 64K is PIO. ioread/write8/16/32 is provided to access PIO/MMIO. By the way, for virtio on a

[dpdk-dev] [PATCH v11 0/2] support both PIO and MMIO BAR for legacy virito device

2021-03-10 Thread (
virtio PMD assumes legacy device only supports PIO(port-mapped) BAR resource. This is wrong. As we need to create lots of devices, adn PIO resource on x86 is very limited, we expose MMIO(memory-mapped I/O) BAR. Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for all other p

[dpdk-dev] [PATCH v11 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-10 Thread (
Currently virtio PMD assumes legacy device uses PIO bar. There are three ways to get PIO(PortIO) address for virtio legacy device. 1) under igb_uio, get PIO address from uio/uio# sysfs attribute, for instance: /sys/bus/pci/devices/:00:09.0/uio/uio0/portio/port0/start 2) under uio_pci_ge

Re: [dpdk-dev] [PATCH v10 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-08 Thread (
On 2021/3/6 0:17, chris wrote: On 2021/3/4 2:47, 谢华伟(此时此刻) wrote: Actually, igb_uio sysfs attribute exports exactly the same thing as standard PCI sysfs, i.e, pci_dev->resource[] in kernel source code This patch refactors these messy things, and uses standard PCI sysfs attribute.

Re: [dpdk-dev] [PATCH v10 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-05 Thread (
On 2021/3/4 2:47, 谢华伟(此时此刻) wrote: Actually, igb_uio sysfs attribute exports exactly the same thing as standard PCI sysfs, i.e, pci_dev->resource[] in kernel source code This patch refactors these messy things, and uses standard PCI sysfs attribute. Hi David: My fault. I set vim cc=80,

Re: [dpdk-dev] [PATCH v9 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-03-04 Thread (
On 2021/3/4 2:24, Stephen Hemminger wrote: On Thu, 04 Mar 2021 01:46:50 +0800 "谢华伟(此时此刻)" wrote: virtio PMD assumes legacy device only supports PIO BAR resource. This is wrong. As we need to create lots of devices, as PIO resource on x86 is very limited, we expose MMIO(memo

[dpdk-dev] [PATCH v10 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-03-03 Thread (
From: "huawei.xhw" With I/O BAR, we get PIO(port-mapped I/O) address. With MMIO(memory-mapped I/O) BAR, we get mapped virtual address. We distinguish PIO and MMIO by their address range like how kernel does, i.e, address below 64K is PIO.. ioread/write8/16/32 is provided to access PIO/MMIO. By th

[dpdk-dev] [PATCH v10 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-03 Thread (
From: "huawei.xhw" Currently virtio PMD asssumes legacy device uses PIO bar. There are three ways to get PIO(PortIO) address for virtio legacy device. under igb_uio, get pio address from uio/uio# sysfs attribute under uio_pci_generic: for X86, get PIO address from /proc/ioport

[dpdk-dev] [PATCH v10 0/2] support both PIO and MMIO BAR for legacy virito device

2021-03-03 Thread (
virtio PMD assumes legacy device only supports PIO(port-mapped) BAR resource. This is wrong. As we need to create lots of devices, as PIO resource on x86 is very limited, we expose MMIO(memory-mapped I/O) BAR. Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for all other p

[dpdk-dev] [PATCH v9 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-03-03 Thread (
From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how kernel does. ioread/write8/16/32 is provided to access PIO/MMIO. By the way, for virtio on arch

[dpdk-dev] [PATCH v9 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-03 Thread (
From: "huawei.xhw" Currently virtio PMD asssumes legacy device uses PIO bar. There are three ways to get PIO(PortIO) address for virtio legacy device. under igb_uio, get pio address from uio/uio# sysfs attribute under uio_pci_generic: for X86, get PIO address from /proc/ioport

[dpdk-dev] [PATCH v9 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-03-03 Thread (
virtio PMD assumes legacy device only supports PIO BAR resource. This is wrong. As we need to create lots of devices, as PIO resource on x86 is very limited, we expose MMIO(memory IO) BAR. Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for all other pci devices. This pa

Re: [dpdk-dev] [PATCH v7 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-03-02 Thread (
On 2021/3/2 21:14, David Marchand wrote: This change is a fix/optimisation. This is a separate topic from adding MMIO support with x86 ioport. I would split as a separate patch. Hi David: Maybe there is confuse? There is no change. The out/in is added. I don't remove _p on purpose. Looking a

Re: [dpdk-dev] [PATCH v8 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-03-02 Thread (
Hi David and ferru: Any other issue integrating this patch? On 2021/3/2 0:01, 谢华伟(此时此刻) wrote: From: "huawei.xhw" virtio PMD assumes legacy device only supports PIO BAR resource. This is wrong. As we need to create lots of devices, as PIO resource on x86 is very limited, we expose M

Re: [dpdk-dev] [PATCH v6 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-02 Thread (
On 2021/2/25 1:52, David Marchand wrote: On Wed, Feb 24, 2021 at 4:29 PM 谢华伟(此时此刻) wrote: Did you check that virtio devices bound to uio_pci_generic still works with legacy mode + PIO? I had verified PIO, might under igb_uio driver. Well, if you are unsure, please retest both cases

[dpdk-dev] [PATCH v8 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-03-01 Thread (
From: "huawei.xhw" virtio PMD assumes legacy device only supports PIO BAR resource. This is wrong. As we need to create lots of devices, as PIO resource on x86 is very limited, we expose MMIO(memory IO) BAR. Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for all other p

[dpdk-dev] [PATCH v8 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-03-01 Thread (
From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how kernel does. ioread/write8/16/32 is provided to access PIO/MMIO. By the way, for virtio on arch

[dpdk-dev] [PATCH v8 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-01 Thread (
From: "huawei.xhw" Currently virtio PMD asssumes legacy device uses PIO bar. There are three ways to get PIO(PortIO) address for virtio legacy device. under igb_uio, get pio address from uio/uio# sysfs attribute under uio_pci_generic: for X86, get PIO address from /proc/ioport

Re: [dpdk-dev] [PATCH v6 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-03-01 Thread (
On 2021/2/25 1:52, David Marchand wrote: On Wed, Feb 24, 2021 at 4:29 PM 谢华伟(此时此刻) wrote: Did you check that virtio devices bound to uio_pci_generic still works with legacy mode + PIO? I had verified PIO, might under igb_uio driver. Well, if you are unsure, please retest both cases

Re: [dpdk-dev] [PATCH v7 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-03-01 Thread (
On 2021/2/25 17:52, David Marchand wrote: On Thu, Feb 25, 2021 at 5:00 AM 谢华伟(此时此刻) wrote: Is the 'outb_p' to 'outb' conversion intentional? And if so why? Same of the all 'outb_p', 'outw_p', 'outl_p'. There is no need to delay for virtio d

Re: [dpdk-dev] [PATCH v7 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-24 Thread (
On 2021/2/24 23:45, Ferruh Yigit wrote: On 2/23/2021 2:20 PM, 谢华伟(此时此刻) wrote: On 2021/2/23 1:25, Ferruh Yigit wrote: On 2/22/2021 5:15 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We disti

Re: [dpdk-dev] [PATCH v6 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-02-24 Thread (
On 2021/2/24 20:49, David Marchand wrote: On Sun, Feb 21, 2021 at 4:58 PM 谢华伟(此时此刻) wrote: On 2021/2/18 17:33, David Marchand wrote: On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) wrote: From: "huawei.xhw" Currently virtio PMD asssumes legacy device uses PIO bar. There are three w

Re: [dpdk-dev] [PATCH v7 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-23 Thread (
On 2021/2/23 1:25, Ferruh Yigit wrote: On 2/22/2021 5:15 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how k

[dpdk-dev] [PATCH v7 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-22 Thread (
From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how kernel does. ioread/write8/16/32 is provided to access PIO/MMIO. By the way, for virtio on arch

[dpdk-dev] [PATCH v7 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-02-22 Thread (
From: "huawei.xhw" Currently virtio PMD asssumes legacy device uses PIO bar. There are three ways to get PIO(PortIO) address for virtio legacy device. under igb_uio, get pio address from uio/uio# sysfs attribute under uio_pci_generic: for X86, get PIO address from /proc/ioport

[dpdk-dev] [PATCH v7 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-02-22 Thread (
From: "huawei.xhw" virtio PMD assumes legacy device only supports PIO BAR resource. This is wrong. As we need to create lots of devices, as PIO resource on x86 is very limited, we expose MMIO(memory IO) BAR. Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for all other p

Re: [dpdk-dev] [PATCH v6 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-02-21 Thread (
On 2021/2/18 17:33, David Marchand wrote: On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) wrote: From: "huawei.xhw" Currently virtio PMD asssumes legacy device uses PIO bar. There are three ways to get PIO(PortIO) address for virtio legacy device. under igb_uio, get pio address fr

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-21 Thread (
On 2021/2/19 16:52, Ferruh Yigit wrote: On 2/9/2021 2:51 PM, Ferruh Yigit wrote: On 1/29/2021 3:18 AM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(mem

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-17 Thread (
On 2021/2/17 17:06, David Marchand wrote: On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) wrote: @@ -517,6 +525,60 @@ } #endif +static inline uint8_t ioread8(void *addr) +{ + uint8_t val; + + val = (uint64_t)(uintptr_t)addr >= PIO_MAX ? + *(volatile uint8_t *)a

Re: [dpdk-dev] [PATCH v6 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-02-03 Thread (
On 2021/2/3 17:37, Maxime Coquelin wrote: Hi Huawei, On 2/1/21 8:43 AM, 谢华伟(此时此刻) wrote: On 2021/1/29 11:25, chris wrote: Hi ferruh and maxime: v6 changes: send v6. Let us discuss if merge in this or early next release. Ping. The -rc2 was released on the 29th, so I think it is too late

Re: [dpdk-dev] [PATCH v6 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-01-31 Thread (
On 2021/1/29 11:25, chris wrote: Hi ferruh and maxime: v6 changes: send v6. Let us discuss if merge in this or early next release. Ping. Sorry that forget to reply to previous message id. - change to DEBUG level for IO bar detection in pci_uio_ioport_map - rework the code in

Re: [dpdk-dev] [PATCH v6 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-01-28 Thread (
Hi ferruh and maxime: v6 changes: send v6. Let us discuss if merge in this or early next release. Sorry that forget to reply to previous message id. - change to DEBUG level for IO bar detection in pci_uio_ioport_map - rework the code in iobar branch - fixes commit message forma

[dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-01-28 Thread (
From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how kernel does. ioread/write8/16/32 is provided to access PIO/MMIO. By the way, for virtio on arch

[dpdk-dev] [PATCH v6 1/2] bus/pci: use PCI standard sysfs entry to get PIO address

2021-01-28 Thread (
From: "huawei.xhw" Currently virtio PMD asssumes legacy device uses PIO bar. There are three ways to get PIO(PortIO) address for virtio legacy device. under igb_uio, get pio address from uio/uio# sysfs attribute under uio_pci_generic: for X86, get PIO address from /proc/ioport

[dpdk-dev] [PATCH v6 0/2] support both PIO and MMIO BAR for legacy device in virtio PMD

2021-01-28 Thread (
From: "huawei.xhw" virtio PMD assumes legacy device only supports PIO BAR resource. This is wrong. As we need to create lots of devices, as PIO resource on x86 is very limited, we expose MMIO(memory IO) BAR. Kernel supports both PIO and MMIO BAR for legacy virtio-pci device, and for all other

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-28 Thread (
On 2021/1/28 0:45, Ferruh Yigit wrote: On 1/27/2021 2:43 PM, 谢华伟(此时此刻) wrote: On 2021/1/27 18:32, Ferruh Yigit wrote: I was waiting for clarification if this can be solved in virtio, which seems clarified and decided to go with this patch, I am OK to proceed with patch 1 & 2. But f

Re: [dpdk-dev] [PATCH v5 2/3] PCI: support MMIO in rte_pci_ioport_map/unap/read/write

2021-01-27 Thread (
On 2021/1/27 18:40, Ferruh Yigit wrote: On 10/22/2020 4:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" If IO BAR, we get PIO address. If MMIO BAR, we get mapped virtual address. We distinguish PIO and MMIO by their address like how kernel does. ioread/write8/16/32 is provided to acces

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-27 Thread (
On 2021/1/27 18:32, Ferruh Yigit wrote: I was waiting for clarification if this can be solved in virtio, which seems clarified and decided to go with this patch, I am OK to proceed with patch 1 & 2. But first patch changes how PIO address get, it changes the Linux interface used to get the

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-26 Thread (
On 2021/1/26 20:35, Maxime Coquelin wrote: On 1/26/21 1:30 PM, 谢华伟(此时此刻) wrote: On 2021/1/22 15:25, chris wrote: On 2021/1/21 23:38, Maxime Coquelin wrote: Do you mean we apply or abandon patch 3? I am both OK. The first priority to me is to enable MMIO bar support. OK, so yes, I think we

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-26 Thread (
On 2021/1/22 15:25, chris wrote: On 2021/1/21 23:38, Maxime Coquelin wrote: Do you mean we apply or abandon patch 3? I am both OK. The first priority to me is to enable MMIO bar support. OK, so yes, I think we should abandon patch 2 and patch 3. For patch 1, it looks valid to me, but I'll le

Re: [dpdk-dev] [PATCH v5 2/3] PCI: support MMIO in rte_pci_ioport_map/unap/read/write

2021-01-24 Thread (
On 2021/1/24 23:22, Xueming(Steven) Li wrote: + } else if (flags & IORESOURCE_MEM) { + iobar = 0; + base = (unsigned long)dev->mem_resource[bar].addr; + RTE_LOG(INFO, EAL, "%s(): MMIO BAR %08lx detected\n", __func__, base); Same here, INFO level

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-21 Thread (
On 2021/1/21 23:38, Maxime Coquelin wrote: Do you mean we apply or abandon patch 3? I am both OK. The first priority to me is to enable MMIO bar support. OK, so yes, I think we should abandon patch 2 and patch 3. For patch 1, it looks valid to me, but I'll let Ferruh decide. For your device,

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-21 Thread (
" I think that using inb/outb in the case of VFIO with IOMMU enabled won't work without cap_sys_rawio, and using it in the case of VFIO with IOMMU disabled just bypasses VFIO and so is not correct. Get your concern. PIO bar:     HW virtio on HW machine: any vendor implements hardware virti

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-21 Thread (
On 2021/1/21 16:29, Maxime Coquelin wrote: On 1/20/21 3:54 PM, 谢华伟(此时此刻) wrote: On 2021/1/13 0:58, Maxime Coquelin wrote: On 1/12/21 10:37 AM, Maxime Coquelin wrote: bus/pci: ... On 10/22/20 5:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" VFIO should use the same way to map/

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2021-01-21 Thread (
On 2021/1/21 16:47, Maxime Coquelin wrote: On 1/21/21 5:12 AM, 谢华伟(此时此刻) wrote: On 2021/1/13 1:37, Maxime Coquelin wrote: On 10/22/20 5:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" Legacy virtio-pci only supports PIO BAR resource. As we need to create lots of virtio devic

Re: [dpdk-dev] [PATCH v5 2/3] PCI: support MMIO in rte_pci_ioport_map/unap/read/write

2021-01-20 Thread (
On 2021/1/12 16:23, Maxime Coquelin wrote: Title should be something like: "bus/pci: support MMIO in PCI ioport accessors On 10/22/20 5:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" If IO BAR, we get PIO address. If MMIO BAR, we get mapped virtual address. We distinguish

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2021-01-20 Thread (
On 2021/1/13 1:37, Maxime Coquelin wrote: On 10/22/20 5:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" 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

Re: [dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2021-01-20 Thread (
On 2021/1/13 0:58, Maxime Coquelin wrote: On 1/12/21 10:37 AM, Maxime Coquelin wrote: bus/pci: ... On 10/22/20 5:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" VFIO should use the same way to map/read/write PORT IO as UIO, for virtio PMD. Please provide more details in the commit

Re: [dpdk-dev] [PATCH v5 1/3] PCI: use PCI standard sysfs entry to get PIO address

2021-01-14 Thread (
On 2021/1/12 16:07, Maxime Coquelin wrote: Hi Huawei, The title should be under the form: "bus/pci: use PCI standard sysfs entry to get PIO address" On 10/22/20 5:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" Previously with igb_uio we get PIO address from igb_u

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2021-01-14 Thread (
On 2021/1/13 1:37, Maxime Coquelin wrote: On 10/22/20 5:51 PM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" 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

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2020-12-14 Thread (
Hi Maxime and David: Could we start to review this patch? /Thanks, huawei On 2020/11/10 20:42, David Marchand wrote: On Tue, Nov 10, 2020 at 1:35 PM 谢华伟(此时此刻) wrote: Previously there are different ways to get port address based on different DPDK uio driver(IGB_UIO/UIO_PCI_GENERIC/VFIO

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2020-11-12 Thread (
On 2020/11/10 20:42, David Marchand wrote: On Tue, Nov 10, 2020 at 1:35 PM 谢华伟(此时此刻) wrote: Previously there are different ways to get port address based on different DPDK uio driver(IGB_UIO/UIO_PCI_GENERIC/VFIO), which is actually not necessary. This patch makes IO/MMIO port map/RW API

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2020-11-10 Thread (
necessary. This patch makes IO/MMIO port map/RW API more generic, which also supports MMIO.  It also fixes performance issue with vfio. Could you spare some time to have time to review this? Thanks On 2020/10/22 23:51, 谢华伟(此时此刻) wrote: From: "huawei.xhw" Legacy virtio-pci onl

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2020-11-02 Thread (
Hi Ferruh: Comments to this v5 version? On 2020/10/22 23:51, 谢华伟(此时此刻) wrote: From: "huawei.xhw" 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 an

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2020-10-27 Thread (
mbols, not tested).     igb_uio with PIO bar is also tested. Weird igb_uio doens't have Makefile. On 2020/10/22 23:51, 谢华伟(此时此刻) wrote: From: "huawei.xhw" Legacy virtio-pci only supports PIO BAR resource. As we need to create lots of virtio devices and PIO resource on x86 i

Re: [dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2020-10-27 Thread (
io doens't have Makefile. On 2020/10/22 23:51, 谢华伟(此时此刻) wrote: From: "huawei.xhw" 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

[dpdk-dev] [PATCH v5 3/3] PCI: don't use vfio ioctl call to access PIO resource

2020-10-22 Thread (
From: "huawei.xhw" VFIO should use the same way to map/read/write PORT IO as UIO, for virtio PMD. Signed-off-by: huawei.xhw --- drivers/bus/pci/linux/pci.c | 8 drivers/bus/pci/linux/pci_uio.c | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/bus/pci

[dpdk-dev] [PATCH v5 2/3] PCI: support MMIO in rte_pci_ioport_map/unap/read/write

2020-10-22 Thread (
From: "huawei.xhw" If IO BAR, we get PIO address. If MMIO BAR, we get mapped virtual address. We distinguish PIO and MMIO by their address like how kernel does. ioread/write8/16/32 is provided to access PIO/MMIO. BTW, for virtio on arch other than x86, BAR flag indicates PIO but is mapped. Signe

[dpdk-dev] [PATCH v5 1/3] PCI: use PCI standard sysfs entry to get PIO address

2020-10-22 Thread (
From: "huawei.xhw" Previously with igb_uio we get PIO address from igb_uio sysfs entry, with uio_pci_generic, we get PIO address from /proc/ioports. Signed-off-by: huawei.xhw --- drivers/bus/pci/linux/pci.c | 77 - drivers/bus/pci/linux/pci_uio.c | 6

[dpdk-dev] [PATCH v5 0/3] support both PIO and MMIO BAR for virtio PMD

2020-10-22 Thread (
From: "huawei.xhw" 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.

Re: [dpdk-dev] [PATCH v4] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-22 Thread (
On 2020/10/22 17:44, Ferruh Yigit wrote: On 10/22/2020 10:15 AM, 谢华伟(此时此刻) wrote: On 2020/10/22 1:24, Ferruh Yigit wrote: On 10/21/2020 1:32 PM, 谢华伟(此时此刻) wrote: On 2020/10/21 19:49, Ferruh Yigit wrote: On 10/13/2020 9:41 AM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" Legacy virti

Re: [dpdk-dev] [PATCH v4] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-22 Thread (
On 2020/10/22 1:24, Ferruh Yigit wrote: On 10/21/2020 1:32 PM, 谢华伟(此时此刻) wrote: On 2020/10/21 19:49, Ferruh Yigit wrote: On 10/13/2020 9:41 AM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" Legacy virtio-pci only supports PIO BAR resource. As we need to create lots of virtio devic

Re: [dpdk-dev] [PATCH v4] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-21 Thread (
On 2020/10/21 19:49, Ferruh Yigit wrote: On 10/13/2020 9:41 AM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" 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 bot

Re: [dpdk-dev] [PATCH v4] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-21 Thread (
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" Legacy virtio-pci only supports PIO BA

Re: [dpdk-dev] [PATCH v4] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-13 Thread (
switch (p->dev->kdrv) { #ifdef VFIO_PRESENT case RTE_PCI_KDRV_VFIO: - pci_vfio_ioport_read(p, data, len, offset); + pci_uio_ioport_read(p, data, len, offset); break; #endif case RTE_PCI_KDRV_IGB_UIO: - pci_uio

[dpdk-dev] [PATCH v4] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-13 Thread (
From: "huawei.xhw" 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.

[dpdk-dev] [PATCH v4] support both PIO and MMIO bar for virtio pci device

2020-10-13 Thread (
From: "huawei.xhw" v2 changes: - add more explanation in the commit message v3 changes: - fix patch format issues v4 changes: - fixes for RTE_KDRV_UIO_GENERIC -> RTE_PCI_KDRV_UIO_GENERIC huawei.xhw (1): pci: support both PIO and MMIO BAR for legacy virtio on x86

Re: [dpdk-dev] [PATCH v2] kernel: remove igb_uio

2020-10-10 Thread (
On 2020/10/5 17:11, Maxime Coquelin wrote: On 10/5/20 10:57 AM, Thomas Monjalon wrote: 24/09/2020 07:41, Stephen Hemminger: On Fri, 11 Sep 2020 17:54:48 +0200 Thomas Monjalon wrote: As decided in the Technical Board in November 2019, the kernel module igb_uio is moved to the dpdk-kmods re

[dpdk-dev] [PATCH v3] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-09 Thread (
From: "huawei.xhw" 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.

Re: [dpdk-dev] [PATCH v2] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-10-01 Thread (
On 2020/10/1 18:22, Burakov, Anatoly wrote: On 30-Sep-20 3:59 PM, 谢华伟(此时此刻) wrote:  From c13f981e287254cd0877cc7b98ee2dd7b80c3b69 Mon Sep 17 00:00:00 2001 From: "huawei.xhw" Date: Wed, 30 Sep 2020 22:37:03 +0800 Subject: [PATCH v2] pci:  support both PIO and MMIO BAR for legacy

[dpdk-dev] [PATCH v2] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-09-30 Thread (
From c13f981e287254cd0877cc7b98ee2dd7b80c3b69 Mon Sep 17 00:00:00 2001 From: "huawei.xhw" Date: Wed, 30 Sep 2020 22:37:03 +0800 Subject: [PATCH v2] pci:  support both PIO and MMIO BAR for legacy virtio on  x86 Legacy virtio-pci only supports PIO BAR resource. As we need to create lots of virti

Re: [dpdk-dev] [PATCH] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-09-27 Thread (
On 2020/9/25 2:02, Ferruh Yigit wrote: On 9/15/2020 4:21 PM, 谢华伟(此时此刻) wrote: Hi Ferruh: Legacy virtio 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 support both PIO and MMIO BAR for legacy

Re: [dpdk-dev] [PATCH] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-09-15 Thread (
:18, 谢华伟(此时此刻) wrote: From d0138f24037d8df14cac04c2c24831e4b5d27b8c Mon Sep 17 00:00:00 2001 From: "huawei.xhw" Date: Mon, 14 Sep 2020 23:44:56 +0800 Subject: [PATCH] pci: support both PIO and MMIO BAR for legacy virtio on x86 In previous implementation, with igb_uio we get PIO ad

[dpdk-dev] [PATCH] pci: support both PIO and MMIO BAR for legacy virtio on x86

2020-09-15 Thread (
From d0138f24037d8df14cac04c2c24831e4b5d27b8c Mon Sep 17 00:00:00 2001 From: "huawei.xhw" Date: Mon, 14 Sep 2020 23:44:56 +0800 Subject: [PATCH] pci: support both PIO and MMIO BAR for legacy virtio on x86 In previous implementation, with igb_uio we get PIO address from igb_uio sysfs entry; with

[dpdk-dev] [PATCH] pci: support both PIO and MMIO bar for legacy virtio on x86

2020-09-14 Thread (
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 port RW is through syscall, which has big performance issue. On

[dpdk-dev] [PATCH] pci: support both PIO and MMIO bar for legacy virtio on x86

2020-09-14 Thread (
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 port RW is through syscall, which has big performance issue. On

Re: [dpdk-dev] [PATCH] pci: support both io and mmio bar for legacy virtio on x86

2020-09-13 Thread (
Hi Ferruy: Resent the patch. This patch is to support both MMIO and PIO bar for legacy virtio. We use MMIO bar for legacy virtio on x86 because we create lots of virtio devices as PIO resource is very limited. virtio is the only PMD which might use PIO. kernel virtio-pci driver supports both P

[dpdk-dev] [PATCH] pci: support both io and mmio bar for legacy virtio on x86

2020-09-13 Thread (
Signed-off-by: huawei.xhw --- drivers/bus/pci/linux/pci.c | 71 -- drivers/bus/pci/linux/pci_uio.c | 154 +++- 2 files changed, 106 insertions(+), 119 deletions(-) diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c

[dpdk-dev] [PATCH] pci: support both io and mmio bar for legacy virtio on x86

2020-09-13 Thread (
Signed-off-by: huawei.xhw --- drivers/bus/pci/linux/pci.c | 71 -- drivers/bus/pci/linux/pci_uio.c | 154 +++- 2 files changed, 106 insertions(+), 119 deletions(-) diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.

Re: [dpdk-dev] [PATCH] pci: support both io and mmio bar for legacy virtio on x86

2020-09-13 Thread (
Hi Ferruh: This patch is to support both MMIO and PIO bar for legacy virtio. We use MM bar for legacy virtio on x86 because we create lots of virtio devices as PIO resource is very limited. virtio on x86 is the only PMD which might use PIO. kernel virtio-pci driver supports both PIO bar and MMI