[v2] kernel: remove igb_uio

Message ID 20200911155448.2744303-1-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] kernel: remove igb_uio |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Thomas Monjalon Sept. 11, 2020, 3:54 p.m. UTC
  As decided in the Technical Board in November 2019,
the kernel module igb_uio is moved to the dpdk-kmods repository
in the /linux/igb_uio/ directory.

Minutes of Technical Board meeting:
https://mails.dpdk.org/archives/dev/2019-November/151763.html

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v2: update few docs (including release notes)
---
 MAINTAINERS                            |   1 -
 doc/guides/linux_gsg/enable_func.rst   |   5 +-
 doc/guides/linux_gsg/linux_drivers.rst |  21 +-
 doc/guides/rel_notes/deprecation.rst   |   7 -
 doc/guides/rel_notes/release_20_11.rst |   3 +
 kernel/linux/igb_uio/Kbuild            |   2 -
 kernel/linux/igb_uio/compat.h          | 154 ------
 kernel/linux/igb_uio/igb_uio.c         | 660 -------------------------
 kernel/linux/igb_uio/meson.build       |  20 -
 kernel/linux/meson.build               |   2 +-
 10 files changed, 12 insertions(+), 863 deletions(-)
 delete mode 100644 kernel/linux/igb_uio/Kbuild
 delete mode 100644 kernel/linux/igb_uio/compat.h
 delete mode 100644 kernel/linux/igb_uio/igb_uio.c
 delete mode 100644 kernel/linux/igb_uio/meson.build
  

Comments

Ferruh Yigit Sept. 11, 2020, 4:22 p.m. UTC | #1
On 9/11/2020 4:54 PM, Thomas Monjalon wrote:
> As decided in the Technical Board in November 2019,
> the kernel module igb_uio is moved to the dpdk-kmods repository
> in the /linux/igb_uio/ directory.
> 
> Minutes of Technical Board meeting:
> https://mails.dpdk.org/archives/dev/2019-November/151763.html
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> v2: update few docs (including release notes)

<...>

> @@ -292,7 +292,6 @@ F: doc/guides/linux_gsg/
>  
>  Linux UIO
>  M: Ferruh Yigit <ferruh.yigit@intel.com>
> -F: kernel/linux/igb_uio/
>  F: drivers/bus/pci/linux/*uio*
>

We are loosing maintainer information for the kernel module, same concern for
other kernel modules in the 'dpdk-kmods' repo.

One option is 'dpdk-kmods' repo can have it's maintainers file, but I believe
better to have single maintainer file, and cover the maintainer and location
information in this file.

<...>

> +which can be found in the repository ``dpdk-kmods``.

There is no information where 'dpdk-kmods' repo is. It can be good to have it as
link.
  
Thomas Monjalon Sept. 12, 2020, 8:55 a.m. UTC | #2
11/09/2020 18:22, Ferruh Yigit:
> On 9/11/2020 4:54 PM, Thomas Monjalon wrote:
> > As decided in the Technical Board in November 2019,
> > the kernel module igb_uio is moved to the dpdk-kmods repository
> > in the /linux/igb_uio/ directory.
> > 
> > Minutes of Technical Board meeting:
> > https://mails.dpdk.org/archives/dev/2019-November/151763.html
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> > v2: update few docs (including release notes)
> 
> <...>
> 
> > @@ -292,7 +292,6 @@ F: doc/guides/linux_gsg/
> >  
> >  Linux UIO
> >  M: Ferruh Yigit <ferruh.yigit@intel.com>
> > -F: kernel/linux/igb_uio/
> >  F: drivers/bus/pci/linux/*uio*
> >
> 
> We are loosing maintainer information for the kernel module, same concern for
> other kernel modules in the 'dpdk-kmods' repo.

There is not even contribution guidelines, mailing-list etc.

> One option is 'dpdk-kmods' repo can have it's maintainers file, but I believe
> better to have single maintainer file, and cover the maintainer and location
> information in this file.

I think the contribution infos (including maintainers contact)
should be inside the repo dpdk-kmods.

> <...>
> > +which can be found in the repository ``dpdk-kmods``.
> 
> There is no information where 'dpdk-kmods' repo is. It can be good to have it as
> link.

The real URL would be the git ones:
	git://dpdk.org/dpdk-kmods
	http://dpdk.org/git/dpdk-kmods
but the most convenient (for clicking) should be the cgit one:
	http://git.dpdk.org/dpdk-kmods/
or directly the sub-directory in cgit:
	http://git.dpdk.org/dpdk-kmods/tree/linux/igb_uio
Note that this last one does not show the git URLs for cloning.

Which one do you prefer?
  
Ferruh Yigit Sept. 14, 2020, 9:47 a.m. UTC | #3
On 9/12/2020 9:55 AM, Thomas Monjalon wrote:
> 11/09/2020 18:22, Ferruh Yigit:
>> On 9/11/2020 4:54 PM, Thomas Monjalon wrote:
>>> As decided in the Technical Board in November 2019,
>>> the kernel module igb_uio is moved to the dpdk-kmods repository
>>> in the /linux/igb_uio/ directory.
>>>
>>> Minutes of Technical Board meeting:
>>> https://mails.dpdk.org/archives/dev/2019-November/151763.html
>>>
>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>>> ---
>>> v2: update few docs (including release notes)
>>
>> <...>
>>
>>> @@ -292,7 +292,6 @@ F: doc/guides/linux_gsg/
>>>  
>>>  Linux UIO
>>>  M: Ferruh Yigit <ferruh.yigit@intel.com>
>>> -F: kernel/linux/igb_uio/
>>>  F: drivers/bus/pci/linux/*uio*
>>>
>>
>> We are loosing maintainer information for the kernel module, same concern for
>> other kernel modules in the 'dpdk-kmods' repo.
> 
> There is not even contribution guidelines, mailing-list etc.
> 
>> One option is 'dpdk-kmods' repo can have it's maintainers file, but I believe
>> better to have single maintainer file, and cover the maintainer and location
>> information in this file.
> 
> I think the contribution infos (including maintainers contact)
> should be inside the repo dpdk-kmods.
> 
>> <...>
>>> +which can be found in the repository ``dpdk-kmods``.
>>
>> There is no information where 'dpdk-kmods' repo is. It can be good to have it as
>> link.
> 
> The real URL would be the git ones:
> 	git://dpdk.org/dpdk-kmods
> 	http://dpdk.org/git/dpdk-kmods
> but the most convenient (for clicking) should be the cgit one:
> 	http://git.dpdk.org/dpdk-kmods/
> or directly the sub-directory in cgit:
> 	http://git.dpdk.org/dpdk-kmods/tree/linux/igb_uio
> Note that this last one does not show the git URLs for cloning.
> 
> Which one do you prefer?
> 
> 

+1 that "http://git.dpdk.org/dpdk-kmods/" is more convenient for
documentation. People can figure out the git repo address from there.
  
Stephen Hemminger Sept. 24, 2020, 5:41 a.m. UTC | #4
On Fri, 11 Sep 2020 17:54:48 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> As decided in the Technical Board in November 2019,
> the kernel module igb_uio is moved to the dpdk-kmods repository
> in the /linux/igb_uio/ directory.
> 
> Minutes of Technical Board meeting:
> https://mails.dpdk.org/archives/dev/2019-November/151763.html
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> v2: update few docs (including release notes)

Good so far:
Acked-by: Stephen Hemminger <stephen@networkplumber.org>

You may want to address all the references to igb_uio in guides/nics

ark.rst
axgbe.rst
bnx2x.rst
bnxt.rst
build_and_test.rst
ena.rst
enic.rst
features.rst
hns3.rst
i40e.rst
intel_vf.rst
ixgbe.rst
liquidio.rst
mlx4.rst
mlx5.rst
nfp.rst
qede.rst
virtio.rst

What about drivers like ark which don't mention vfio?

Does virtio still require igb_uio? or x86 I/O port for doorbell?
Or is this just stale language.
  
Thomas Monjalon Oct. 5, 2020, 8:57 a.m. UTC | #5
24/09/2020 07:41, Stephen Hemminger:
> On Fri, 11 Sep 2020 17:54:48 +0200
> Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> > As decided in the Technical Board in November 2019,
> > the kernel module igb_uio is moved to the dpdk-kmods repository
> > in the /linux/igb_uio/ directory.
> > 
> > Minutes of Technical Board meeting:
> > https://mails.dpdk.org/archives/dev/2019-November/151763.html
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> > v2: update few docs (including release notes)
> 
> Good so far:
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> You may want to address all the references to igb_uio in guides/nics
> 
> ark.rst
> axgbe.rst
> bnx2x.rst
> bnxt.rst
> build_and_test.rst
> ena.rst
> enic.rst
> features.rst
> hns3.rst
> i40e.rst
> intel_vf.rst
> ixgbe.rst
> liquidio.rst
> mlx4.rst
> mlx5.rst
> nfp.rst
> qede.rst
> virtio.rst

igb_uio is still available.
A next step in deprecation might be to remove igb_uio references.

> What about drivers like ark which don't mention vfio?

They should be updated by their maintainer.

> Does virtio still require igb_uio? or x86 I/O port for doorbell?
> Or is this just stale language.

Maxime, any update on the use of igb_uio with virtio?
  
Maxime Coquelin Oct. 5, 2020, 9:11 a.m. UTC | #6
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 <thomas@monjalon.net> wrote:
>>
>>> As decided in the Technical Board in November 2019,
>>> the kernel module igb_uio is moved to the dpdk-kmods repository
>>> in the /linux/igb_uio/ directory.
>>>
>>> Minutes of Technical Board meeting:
>>> https://mails.dpdk.org/archives/dev/2019-November/151763.html
>>>
>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>>> ---
>>> v2: update few docs (including release notes)
>>
>> Good so far:
>> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>>
>> You may want to address all the references to igb_uio in guides/nics
>>
>> ark.rst
>> axgbe.rst
>> bnx2x.rst
>> bnxt.rst
>> build_and_test.rst
>> ena.rst
>> enic.rst
>> features.rst
>> hns3.rst
>> i40e.rst
>> intel_vf.rst
>> ixgbe.rst
>> liquidio.rst
>> mlx4.rst
>> mlx5.rst
>> nfp.rst
>> qede.rst
>> virtio.rst
> 
> igb_uio is still available.
> A next step in deprecation might be to remove igb_uio references.
> 
>> What about drivers like ark which don't mention vfio?
> 
> They should be updated by their maintainer.
> 
>> Does virtio still require igb_uio? or x86 I/O port for doorbell?
>> Or is this just stale language.
> 
> Maxime, any update on the use of igb_uio with virtio?

For sure Virtio don't require igb_uio, I always use vfio myself.
It seems the doc needs an update, I'll try to look at it later in this
release.

Regards,
Maxime
  
Bruce Richardson Oct. 5, 2020, 9:56 a.m. UTC | #7
On Mon, Oct 05, 2020 at 11:11:40AM +0200, 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 <thomas@monjalon.net> wrote:
> >>
> >>> As decided in the Technical Board in November 2019,
> >>> the kernel module igb_uio is moved to the dpdk-kmods repository
> >>> in the /linux/igb_uio/ directory.
> >>>
> >>> Minutes of Technical Board meeting:
> >>> https://mails.dpdk.org/archives/dev/2019-November/151763.html
> >>>
> >>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >>> ---
> >>> v2: update few docs (including release notes)
> >>
> >> Good so far:
> >> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> >>
> >> You may want to address all the references to igb_uio in guides/nics
> >>
> >> ark.rst
> >> axgbe.rst
> >> bnx2x.rst
> >> bnxt.rst
> >> build_and_test.rst
> >> ena.rst
> >> enic.rst
> >> features.rst
> >> hns3.rst
> >> i40e.rst
> >> intel_vf.rst
> >> ixgbe.rst
> >> liquidio.rst
> >> mlx4.rst
> >> mlx5.rst
> >> nfp.rst
> >> qede.rst
> >> virtio.rst
> > 
> > igb_uio is still available.
> > A next step in deprecation might be to remove igb_uio references.
> > 
> >> What about drivers like ark which don't mention vfio?
> > 
> > They should be updated by their maintainer.
> > 
> >> Does virtio still require igb_uio? or x86 I/O port for doorbell?
> >> Or is this just stale language.
> > 
> > Maxime, any update on the use of igb_uio with virtio?
> 
> For sure Virtio don't require igb_uio, I always use vfio myself.
> It seems the doc needs an update, I'll try to look at it later in this
> release.
> 

Another gap I believe we need to close is that we need some instructions in
the GSG for using vfio in noiommu mode, for those running in VMs without an
emulated iommu. The VM case is the big one where using regular VFIO may
cause problems. I do see in the GSG one mention that it's possible to use
VFIO without an IOMMU, but no instructions on how to do so.

/Bruce
  
谢华伟(此时此刻) Oct. 10, 2020, 7:23 a.m. UTC | #8
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 <thomas@monjalon.net> wrote:
>>>
>>>> As decided in the Technical Board in November 2019,
>>>> the kernel module igb_uio is moved to the dpdk-kmods repository
>>>> in the /linux/igb_uio/ directory.
>>>>
>>>> Minutes of Technical Board meeting:
>>>> https://mails.dpdk.org/archives/dev/2019-November/151763.html
>>>>
>>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>>>> ---
>>>> v2: update few docs (including release notes)
>>> Good so far:
>>> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>>>
>>> You may want to address all the references to igb_uio in guides/nics
>>>
>>> ark.rst
>>> axgbe.rst
>>> bnx2x.rst
>>> bnxt.rst
>>> build_and_test.rst
>>> ena.rst
>>> enic.rst
>>> features.rst
>>> hns3.rst
>>> i40e.rst
>>> intel_vf.rst
>>> ixgbe.rst
>>> liquidio.rst
>>> mlx4.rst
>>> mlx5.rst
>>> nfp.rst
>>> qede.rst
>>> virtio.rst
>> igb_uio is still available.
>> A next step in deprecation might be to remove igb_uio references.
>>
>>> What about drivers like ark which don't mention vfio?
>> They should be updated by their maintainer.
>>
>>> Does virtio still require igb_uio? or x86 I/O port for doorbell?
>>> Or is this just stale language.
>> Maxime, any update on the use of igb_uio with virtio?
> For sure Virtio don't require igb_uio, I always use vfio myself.
> It seems the doc needs an update, I'll try to look at it later in this
> release.
>
> Regards,
> Maxime

PIO/MMIO write(notify backend) needs to go through vfio ioctl call,

which impacts performance.  I fix this in another patch. PIO/MMIO

read/write will be executed directly in user space whatever driver is being

used.


/huawei
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 3b16d7a4b8..d74bec58e1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -292,7 +292,6 @@  F: doc/guides/linux_gsg/
 
 Linux UIO
 M: Ferruh Yigit <ferruh.yigit@intel.com>
-F: kernel/linux/igb_uio/
 F: drivers/bus/pci/linux/*uio*
 
 Linux VFIO
diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index b2bda80bb7..a6c5a980fd 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -129,7 +129,7 @@  Loading the DPDK KNI Kernel Module
 
 To run the DPDK Kernel NIC Interface (KNI) sample application, an extra kernel module (the kni module) must be loaded into the running kernel.
 The module is found in the kmod sub-directory of the DPDK target directory.
-Similar to the loading of the ``igb_uio`` module, this module should be loaded using the insmod command as shown below
+This module should be loaded using the insmod command as shown below
 (assuming that the current directory is the DPDK target directory):
 
 .. code-block:: console
@@ -156,4 +156,5 @@  This results in pass-through of the DMAR (DMA Remapping) lookup in the host.
 Also, if ``INTEL_IOMMU_DEFAULT_ON`` is not set in the kernel, the ``intel_iommu=on`` kernel parameter must be used too.
 This ensures that the Intel IOMMU is being initialized as expected.
 
-Please note that while using ``iommu=pt`` is compulsory for ``igb_uio driver``, the ``vfio-pci`` driver can actually work with both ``iommu=pt`` and ``iommu=on``.
+Please note that while using ``iommu=pt`` is compulsory for ``igb_uio`` driver,
+the ``vfio-pci`` driver can actually work with both ``iommu=pt`` and ``iommu=on``.
diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index 185074013a..0024b23050 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -27,31 +27,20 @@  can provide the uio capability. This module can be loaded using the command:
 
     ``uio_pci_generic`` module doesn't support the creation of virtual functions.
 
-As an alternative to the ``uio_pci_generic``, the DPDK also includes the igb_uio
-module which can be found in the kmod subdirectory referred to above. It can
-be loaded as shown below:
+As an alternative to the ``uio_pci_generic``, there is the ``igb_uio`` module
+which can be found in the repository ``dpdk-kmods``.
+It can be loaded as shown below:
 
 .. code-block:: console
 
     sudo modprobe uio
-    sudo insmod kmod/igb_uio.ko
-
-.. note::
-
-   ``igb_uio`` module is disabled by default starting from ``DPDK v20.02``.
-   To build it, the config option ``CONFIG_RTE_EAL_IGB_UIO`` should be enabled.
-   It is planned to move ``igb_uio`` module to a different git repository.
-
-.. note::
-
-    For some devices which lack support for legacy interrupts, e.g. virtual function
-    (VF) devices, the ``igb_uio`` module may be needed in place of ``uio_pci_generic``.
+    sudo insmod igb_uio.ko
 
 .. note::
 
    If UEFI secure boot is enabled, the Linux kernel may disallow the use of
    UIO on the system. Therefore, devices for use by DPDK should be bound to the
-   ``vfio-pci`` kernel module rather than ``igb_uio`` or ``uio_pci_generic``.
+   ``vfio-pci`` kernel module rather than any UIO-based module.
    For more details see :ref:`linux_gsg_binding_kernel` below.
 
 .. note::
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 88d7d07613..64d1c7fdff 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -96,13 +96,6 @@  Deprecation Notices
   used in the place of rte_cio_*mb APIs. The rte_cio_*mb APIs will be
   deprecated in 20.11 release.
 
-* igb_uio: In the view of reducing the kernel dependency from the main tree,
-  as a first step, the Technical Board decided to move ``igb_uio``
-  kernel module to the dpdk-kmods repository in the /linux/igb_uio/ directory
-  in 20.11.
-  Minutes of Technical Board Meeting of `2019-11-06
-  <https://mails.dpdk.org/archives/dev/2019-November/151763.html>`_.
-
 * lib: will fix extending some enum/define breaking the ABI. There are multiple
   samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
   used by iterators, and arrays holding these values are sized with this
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 667e3d54ad..ba4e237d1f 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -68,6 +68,9 @@  Removed Items
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+kernel: The module ``igb_uio`` has been moved to the git repository
+``dpdk-kmods`` in a new directory ``linux/igb_uio``.
+
 
 API Changes
 -----------
diff --git a/kernel/linux/igb_uio/Kbuild b/kernel/linux/igb_uio/Kbuild
deleted file mode 100644
index 3ab85c4116..0000000000
diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h
deleted file mode 100644
index 8dbb896ae1..0000000000
diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c
deleted file mode 100644
index 039f5a5f63..0000000000
diff --git a/kernel/linux/igb_uio/meson.build b/kernel/linux/igb_uio/meson.build
deleted file mode 100644
index 80540aecee..0000000000
diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index da79df1687..5c864a4653 100644
--- a/kernel/linux/meson.build
+++ b/kernel/linux/meson.build
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
-subdirs = ['igb_uio', 'kni']
+subdirs = ['kni']
 
 # if we are cross-compiling we need kernel_dir specified
 if get_option('kernel_dir') == '' and meson.is_cross_build()