Thread (58 messages) 58 messages, 6 authors, 2021-01-28

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

From: Ferruh Yigit <hidden>
Date: 2021-01-27 16:45:38

On 1/27/2021 2:43 PM, 谢华伟(此时此刻) wrote:
On 2021/1/27 18:32, Ferruh Yigit wrote:
quoted
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 PIO.
And as far as I can see second patch requires this new interface to be able to 
access the MEM resources.

I have a concern that this interface change may cause issues with various 
distros, kernel versions etc.. And prefer it goes through a full -rc1 
validation cycle.

Huawei, I am aware the patch is around for a while but to play safe, I suggest 
considering it for early next release, so it can be tested enough, instead of 
getting if for -rc2/3 in this release.

Thanks,
ferruh
Hi Ferruh and Maxime:

igb_uio kernel driver gets resource through pci_resource_start, i.e, 
(dev)->resource[(bar)].start

uio_pci_generic and the generic way in my patch 1 gets resource through the same 
interface:

         pci dev driver exports to userspace the bar resource attributes through 
pci_dev->resource (check resource_show in kernel's drivers/pci/pci-sysfs.c)

Other arch than x86 uses the same interface in their pci_uio_ioport_map.

So patch 1 is the most generic way and shouldn't break things. /proc/ioports 
should be fully dropped.

Using /proc/ioport is partly my fault at the very beginning. It causes so much 
mess.

Could you please confirm this?
Hi Huawei,

I confirm that interface is already in use, 'pci_parse_sysfs_resource()' does 
similar parsing.

Most probably it is safe as you and Maxime said, and I am not trying to be 
difficult but extra conscious here.

Will it cause too much trouble to consider the patch early next release? This 
gives more time and testing after the patch merged.

Thanks,
ferruh
Thanks huawei
quoted
quoted
Could you please post v6?

Thanks,
Maxime
quoted
quoted
It is not too late for this release, as the change will not be that
intrusive. But if you prepare such patch, please base it on top of my
virtio rework series; To make it easier to you, I added it to the dpdk-
next-virtio tree:
https://git.dpdk.org/next/dpdk-next-virtio/log/?h=virtio_pmd_rework_v2

Thanks,
Maxime
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help