Thread (61 messages) 61 messages, 7 authors, 2021-03-17

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

From: 谢华伟(此时此刻) <hidden>
Date: 2021-02-24 15:29:23

On 2021/2/24 20:49, David Marchand wrote:
On Sun, Feb 21, 2021 at 4:58 PM 谢华伟(此时此刻) [off-list ref] wrote:
quoted
On 2021/2/18 17:33, David Marchand wrote:
quoted
On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) [off-list ref] wrote:
quoted
From: "huawei.xhw" <redacted>

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
          for other ARCH, get PIO address from standard PCI sysfs attribute

Actually, igb_uio sysfs attribute exports exactly the same thing as standard PCI sysfs, i.e,
      pci_dev->resource[]

This patch fixes these messy things, and uses standard PCI sysfs attribute.
I can not find what is being fixed.
Could you elaborate?
Maybe i wrongly use the word fix?  With this patch, different drivers
use the same way to get IO address for virtio device.
Previously different driver get IO address with different method.
The commitlog is confusing, mentioning pci_dev->resource[] (I guess
from the kernel sources?) and talking about a fix while it works fine
Yes.
so far.
So this is a refactoring.
Ok, will change the word fix.
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.

Theoretically it works with uio_pci_generic driver. I could do the test 
if needed. Give me some time.  Have to create a legacy VM. Now bars in 
virtio device in the cloud are basically mmio.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help