[dpdk-dev] doc: remove iomem and ioport handling in igb_uio

Message ID 1474523045-2674-1-git-send-email-jianfeng.tan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Jianfeng Tan Sept. 22, 2016, 5:44 a.m. UTC
  In igb_uio, iomem is mapped, and both ioport and io mem are recorded
into uio framework (then into sysfs files), which is duplicated with
what Linux has already provided for user space, 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 will remove 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/.

Suggested-by: Yigit, Ferruh <ferruh.yigit@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Ferruh Yigit Sept. 30, 2016, 10:13 a.m. UTC | #1
On 9/22/2016 6:44 AM, Jianfeng Tan wrote:
> In igb_uio, iomem is mapped, and both ioport and io mem are recorded
> into uio framework (then into sysfs files), which is duplicated with
> what Linux has already provided for user space, 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 will remove 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/.
> 
> Suggested-by: Yigit, Ferruh <ferruh.yigit@intel.com>
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> ---

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Remy Horton Nov. 11, 2016, 2:12 a.m. UTC | #2
On 22/09/2016 13:44, Jianfeng Tan wrote:
[..]
>
> Suggested-by: Yigit, Ferruh <ferruh.yigit@intel.com>
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>

Acked-by: Remy Horton <remy.horton@intel.com>


> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -57,3 +57,8 @@ Deprecation Notices
>  * API will change for ``rte_port_source_params`` and ``rte_port_sink_params``
>    structures. The member ``file_name`` data type will be changed from
>    ``char *`` to ``const char *``. This change targets release 16.11.

As an aside I don't think changing a structure entry to const will 
affect its binary layout, so this ought not be an ABI break..
  
Thomas Monjalon Nov. 13, 2016, 8:55 a.m. UTC | #3
> > Suggested-by: Yigit, Ferruh <ferruh.yigit@intel.com>
> > Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> 
> Acked-by: Remy Horton <remy.horton@intel.com>

Applied
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1a3831f..60f6e60 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -57,3 +57,8 @@  Deprecation Notices
 * API will change for ``rte_port_source_params`` and ``rte_port_sink_params``
   structures. The member ``file_name`` data type will be changed from
   ``char *`` to ``const char *``. This change targets release 16.11.
+
+* igb_uio: iomem mapping and sysfs files created for iomem and ioport in
+  igb_uio will be removed, because we are able to detect these from what Linux
+  has exposed, like the way we have done with uio-pci-generic. This change
+  targets release 17.02.