kernel: remove igb_uio

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

Checks

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

Commit Message

Thomas Monjalon Sept. 7, 2020, 10:50 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>
---
 MAINTAINERS                          |   1 -
 doc/guides/rel_notes/deprecation.rst |   7 -
 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 +-
 7 files changed, 1 insertion(+), 845 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

Thomas Monjalon Sept. 8, 2020, 12:14 a.m. UTC | #1
On Tue Sep 8, 2020 at 2:50 AM CEST, 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.

The code is moved with its git history in
	http://git.dpdk.org/dpdk-kmods/

The move process started with these commands:
	cd dpdk
	dir=igb_uio
	path1=lib/librte_eal/linuxapp/$dir
	path2=kernel/linux/$dir
	git format-patch -o $dir 0c9a540ed2.. -- $path1 $path2
	find $dir -type f -exec sed -i "s,$path1\|$path2,linux/$dir," '{}' \;
	cd ../dpdk-kmods
	git am ../dpdk/$dir/*
	git filter-branch --force
		--index-filter "git rm --cached --ignore-unmatch linux/$dir/Makefile"
		--prune-empty --tag-name-filter cat -- --all

Makefile and meson.build files were not imported at all.
Some other commits were skipped (virtio, vmxnet3 and Xen dom0 support),
because they were not very useful and reverted later in the history.
Anyway the original history is available forever in dpdk.git.

Currently it cannot compile because the file rte_pci_dev_feature_defs.h
is missing, defining enum rte_intr_mode. An option is to import this file.

It would be nice to add a README file in the new igb_uio directory.
Volunteers welcome :)
  
Bruce Richardson Sept. 8, 2020, 8:25 a.m. UTC | #2
On Tue, Sep 08, 2020 at 02:14:02AM +0200, Thomas Monjalon wrote:
> On Tue Sep 8, 2020 at 2:50 AM CEST, 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.
> 
> The code is moved with its git history in
> 	http://git.dpdk.org/dpdk-kmods/
> 
> The move process started with these commands:
> 	cd dpdk
> 	dir=igb_uio
> 	path1=lib/librte_eal/linuxapp/$dir
> 	path2=kernel/linux/$dir
> 	git format-patch -o $dir 0c9a540ed2.. -- $path1 $path2
> 	find $dir -type f -exec sed -i "s,$path1\|$path2,linux/$dir," '{}' \;
> 	cd ../dpdk-kmods
> 	git am ../dpdk/$dir/*
> 	git filter-branch --force
> 		--index-filter "git rm --cached --ignore-unmatch linux/$dir/Makefile"
> 		--prune-empty --tag-name-filter cat -- --all
> 
> Makefile and meson.build files were not imported at all.
> Some other commits were skipped (virtio, vmxnet3 and Xen dom0 support),
> because they were not very useful and reverted later in the history.
> Anyway the original history is available forever in dpdk.git.
> 
> Currently it cannot compile because the file rte_pci_dev_feature_defs.h
> is missing, defining enum rte_intr_mode. An option is to import this file.
> 
> It would be nice to add a README file in the new igb_uio directory.
> Volunteers welcome :)

In terms of building the module, one option which I think is worth
considering is to try and use meson subject/wrap support to download and
build this module as part of the main DPDK build, as now, when enable_kmods
option is set. With a wrap file in DPDK it can automatically pull down and
build the code as part of a main project build. I assume that integration
into main DPDK build is still something worth having? The only thing I
don't like about using a wrap file is that it has to be placed in a folder
called "subproject" at the top level of the DPDK project.

Thoughts,
/Bruce
  
Thomas Monjalon Sept. 8, 2020, 9:27 a.m. UTC | #3
08/09/2020 10:25, Bruce Richardson:
> On Tue, Sep 08, 2020 at 02:14:02AM +0200, Thomas Monjalon wrote:
> > On Tue Sep 8, 2020 at 2:50 AM CEST, 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.
> > 
> > The code is moved with its git history in
> > 	http://git.dpdk.org/dpdk-kmods/
> > 
> > The move process started with these commands:
> > 	cd dpdk
> > 	dir=igb_uio
> > 	path1=lib/librte_eal/linuxapp/$dir
> > 	path2=kernel/linux/$dir
> > 	git format-patch -o $dir 0c9a540ed2.. -- $path1 $path2
> > 	find $dir -type f -exec sed -i "s,$path1\|$path2,linux/$dir," '{}' \;
> > 	cd ../dpdk-kmods
> > 	git am ../dpdk/$dir/*
> > 	git filter-branch --force
> > 		--index-filter "git rm --cached --ignore-unmatch linux/$dir/Makefile"
> > 		--prune-empty --tag-name-filter cat -- --all
> > 
> > Makefile and meson.build files were not imported at all.
> > Some other commits were skipped (virtio, vmxnet3 and Xen dom0 support),
> > because they were not very useful and reverted later in the history.
> > Anyway the original history is available forever in dpdk.git.
> > 
> > Currently it cannot compile because the file rte_pci_dev_feature_defs.h
> > is missing, defining enum rte_intr_mode. An option is to import this file.
> > 
> > It would be nice to add a README file in the new igb_uio directory.
> > Volunteers welcome :)
> 
> In terms of building the module, one option which I think is worth
> considering is to try and use meson subject/wrap support to download and
> build this module as part of the main DPDK build, as now, when enable_kmods
> option is set. With a wrap file in DPDK it can automatically pull down and
> build the code as part of a main project build. I assume that integration
> into main DPDK build is still something worth having? The only thing I
> don't like about using a wrap file is that it has to be placed in a folder
> called "subproject" at the top level of the DPDK project.

The idea is encouraging the use of VFIO and make igb_uio deprecated.
I think we should not do any effort to ease igb_uio usage inside dpdk.git.
Compiling the kernel module standalone in dpdk-kmods.git looks enough, isn't it?
  
Bruce Richardson Sept. 8, 2020, 9:34 a.m. UTC | #4
On Tue, Sep 08, 2020 at 11:27:23AM +0200, Thomas Monjalon wrote:
> 08/09/2020 10:25, Bruce Richardson:
> > On Tue, Sep 08, 2020 at 02:14:02AM +0200, Thomas Monjalon wrote:
> > > On Tue Sep 8, 2020 at 2:50 AM CEST, 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.
> > > 
> > > The code is moved with its git history in
> > > 	http://git.dpdk.org/dpdk-kmods/
> > > 
> > > The move process started with these commands:
> > > 	cd dpdk
> > > 	dir=igb_uio
> > > 	path1=lib/librte_eal/linuxapp/$dir
> > > 	path2=kernel/linux/$dir
> > > 	git format-patch -o $dir 0c9a540ed2.. -- $path1 $path2
> > > 	find $dir -type f -exec sed -i "s,$path1\|$path2,linux/$dir," '{}' \;
> > > 	cd ../dpdk-kmods
> > > 	git am ../dpdk/$dir/*
> > > 	git filter-branch --force
> > > 		--index-filter "git rm --cached --ignore-unmatch linux/$dir/Makefile"
> > > 		--prune-empty --tag-name-filter cat -- --all
> > > 
> > > Makefile and meson.build files were not imported at all.
> > > Some other commits were skipped (virtio, vmxnet3 and Xen dom0 support),
> > > because they were not very useful and reverted later in the history.
> > > Anyway the original history is available forever in dpdk.git.
> > > 
> > > Currently it cannot compile because the file rte_pci_dev_feature_defs.h
> > > is missing, defining enum rte_intr_mode. An option is to import this file.
> > > 
> > > It would be nice to add a README file in the new igb_uio directory.
> > > Volunteers welcome :)
> > 
> > In terms of building the module, one option which I think is worth
> > considering is to try and use meson subject/wrap support to download and
> > build this module as part of the main DPDK build, as now, when enable_kmods
> > option is set. With a wrap file in DPDK it can automatically pull down and
> > build the code as part of a main project build. I assume that integration
> > into main DPDK build is still something worth having? The only thing I
> > don't like about using a wrap file is that it has to be placed in a folder
> > called "subproject" at the top level of the DPDK project.
> 
> The idea is encouraging the use of VFIO and make igb_uio deprecated.
> I think we should not do any effort to ease igb_uio usage inside dpdk.git.
> Compiling the kernel module standalone in dpdk-kmods.git looks enough, isn't it?
> 

Ok, that is fine if that is the objective. I thought the objective was to
move all kernel modules out of the DPDK tree, but if it's only certain
modules, then that is different.

/Bruce
  
Thomas Monjalon Sept. 8, 2020, 9:46 a.m. UTC | #5
08/09/2020 11:34, Bruce Richardson:
> On Tue, Sep 08, 2020 at 11:27:23AM +0200, Thomas Monjalon wrote:
> > 08/09/2020 10:25, Bruce Richardson:
> > > On Tue, Sep 08, 2020 at 02:14:02AM +0200, Thomas Monjalon wrote:
> > > > On Tue Sep 8, 2020 at 2:50 AM CEST, 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.
> > > > 
> > > > The code is moved with its git history in
> > > > 	http://git.dpdk.org/dpdk-kmods/
> > > > 
> > > > The move process started with these commands:
> > > > 	cd dpdk
> > > > 	dir=igb_uio
> > > > 	path1=lib/librte_eal/linuxapp/$dir
> > > > 	path2=kernel/linux/$dir
> > > > 	git format-patch -o $dir 0c9a540ed2.. -- $path1 $path2
> > > > 	find $dir -type f -exec sed -i "s,$path1\|$path2,linux/$dir," '{}' \;
> > > > 	cd ../dpdk-kmods
> > > > 	git am ../dpdk/$dir/*
> > > > 	git filter-branch --force
> > > > 		--index-filter "git rm --cached --ignore-unmatch linux/$dir/Makefile"
> > > > 		--prune-empty --tag-name-filter cat -- --all
> > > > 
> > > > Makefile and meson.build files were not imported at all.
> > > > Some other commits were skipped (virtio, vmxnet3 and Xen dom0 support),
> > > > because they were not very useful and reverted later in the history.
> > > > Anyway the original history is available forever in dpdk.git.
> > > > 
> > > > Currently it cannot compile because the file rte_pci_dev_feature_defs.h
> > > > is missing, defining enum rte_intr_mode. An option is to import this file.
> > > > 
> > > > It would be nice to add a README file in the new igb_uio directory.
> > > > Volunteers welcome :)
> > > 
> > > In terms of building the module, one option which I think is worth
> > > considering is to try and use meson subject/wrap support to download and
> > > build this module as part of the main DPDK build, as now, when enable_kmods
> > > option is set. With a wrap file in DPDK it can automatically pull down and
> > > build the code as part of a main project build. I assume that integration
> > > into main DPDK build is still something worth having? The only thing I
> > > don't like about using a wrap file is that it has to be placed in a folder
> > > called "subproject" at the top level of the DPDK project.
> > 
> > The idea is encouraging the use of VFIO and make igb_uio deprecated.
> > I think we should not do any effort to ease igb_uio usage inside dpdk.git.
> > Compiling the kernel module standalone in dpdk-kmods.git looks enough, isn't it?
> 
> Ok, that is fine if that is the objective. I thought the objective was to
> move all kernel modules out of the DPDK tree, but if it's only certain
> modules, then that is different.

As we discussed in the Technical Board, the FreeBSD modules are required
for any use and should stay inside dpdk.git.

But the question is open for KNI.
I think KNI should be deprecated as well to encourage using other
methods which are more "upstream" for Linux.
  
Ferruh Yigit Sept. 8, 2020, 12:06 p.m. UTC | #6
On 9/7/2020 11:50 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>
> ---
>  MAINTAINERS                          |   1 -
>  doc/guides/rel_notes/deprecation.rst |   7 -
>  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 +-
>  7 files changed, 1 insertion(+), 845 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
> 
> 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*
>  

What do you think to have the new git repo information here as
"T: ..."
To help people looking for the module.

And I think at least 'doc/guides/linux_gsg/linux_drivers.rst' should be updated
to document the new home of the kernel module, but there are multiple references
in the documentation to the 'igb_uio', perhaps they should be replaced with
'vfio' too?
  
Thomas Monjalon Sept. 11, 2020, 12:22 p.m. UTC | #7
08/09/2020 14:06, Ferruh Yigit:
> On 9/7/2020 11:50 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>
> > ---
> >  MAINTAINERS                          |   1 -
> >  doc/guides/rel_notes/deprecation.rst |   7 -
> >  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 +-
> >  7 files changed, 1 insertion(+), 845 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
> > 
> > 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*
> >  
> 
> What do you think to have the new git repo information here as
> "T: ..."
> To help people looking for the module.

I don't think we should reference the new home in the file MAINTAINERS
of dpdk.git. But yes, it should be documented. I'll add something in v2.

> And I think at least 'doc/guides/linux_gsg/linux_drivers.rst' should be updated
> to document the new home of the kernel module, but there are multiple references
> in the documentation to the 'igb_uio', perhaps they should be replaced with
> 'vfio' too?

As part of this patch, I will document the new home of igb_uio,
but won't change the usage references.
I think moving to VFIO in docs is another patch, and probably multiple.
  

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/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 279eccb04a..6f722ad79d 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/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()