[dpdk-dev] [RFC] igb_uio: deprecate iomem and ioport mapping

Tan, Jianfeng jianfeng.tan at intel.com
Fri Sep 2 14:59:52 CEST 2016



On 9/2/2016 8:31 PM, Ferruh Yigit wrote:
> On 9/1/2016 3:16 AM, Jianfeng Tan wrote:
>> Previously in igb_uio, iomem is mapped, and both ioport and io mem
>> are recorded into uio framework, which is duplicated and makes the
>> code too complex.
>>
>> For iomem, DPDK user space code never opens or reads files under
>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/. Instead,
>> /sys/pci/bus/devices/xxxx:xx:xx.x/resourceY are used to map device
>> memory.
>>
>> For ioport, non-x86 platforms cannot read from files under
>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/ directly, because
>> non-x86 platforms need to map port region for access in user space,
>> see non-x86 version pci_uio_ioport_map(). x86 platforms can use the
>> the same way as uio_pci_generic.
>>
>> This patch deprecates iomem and ioport mapping in igb_uio kernel
>> module, and adjusts the iomem implementation in both igb_uio and
>> uio_pci_generic:
>>    - for x86 platform, get ports info from /proc/ioports;
>>    - for non-x86 platform, map and get ports info by pci_uio_ioport_map().
>>
>> Note: this will affect those applications who are using files under
>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/ and
>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/.
>>
>> Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>
>> ---
> I think it is good idea to simplify to code, that piece looks like can
> go away.
>
> But since sysfs interface exposed to the world, anybody can be using it,
>
> what about this: for this release keep this patch as RFC and send
> another deprecation notice patch?

Thank you Ferruh! Sounds good to me. And I will send out a deprecation 
notice patch later.

Thanks,
Jianfeng

> And apply this patch in the following release (17.02).
>
> Thanks,
> ferruh



More information about the dev mailing list