kni: flag deprecated status at build time
Subsystems (3)
PATCH 1/2 kni: flag deprecated status at build time
To ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting disabled_libs to the empty string (or other string not including 'kni')
2. add support for a list of deprecated libs to the lib/meson.build file so the error message for KNI being disabled includes the fact that it is a deprecated library.
3. for the dependent NIC driver, drivers/net/kni, modify its disabled message to also reference the fact that KNI is disabled.
NOTE: This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
--- doc/guides/prog_guide/kernel_nic_interface.rst | 4 ++++ drivers/net/kni/meson.build | 5 +++++ lib/meson.build | 7 +++++++ meson_options.txt | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-)
doc/guides/prog_guide/kernel_nic_interface.rst +4 -0
@@ -14,6 +14,10 @@ Kernel NIC Interface For an alternative to KNI, that does not require any out-of-tree Linux kernel modules, or a custom library, see :ref:`virtio_user_as_exception_path`. +.. note:: + + KNI is disabled by default in the DPDK build. + To re-enable the library, remove 'kni' from the "disable_libs" meson option when configuring a build. The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.
drivers/net/kni/meson.build +5 -0
@@ -6,6 +6,11 @@ if is_windows reason = 'not supported on Windows' subdir_done() endif +if not dpdk_conf.has('kni') + build = false + reason = 'needs deprecated lib, "kni"' + subdir_done() +endif deps += 'kni' sources = files('rte_eth_kni.c')
lib/meson.build +7 -0
@@ -85,6 +85,7 @@ optional_libs = [ 'vhost', ] +deprecated_libs = ['kni'] disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split()
@@ -133,7 +134,13 @@ foreach l:libraries if disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' + if deprecated_libs.contains(l) + reason += ' (deprecated lib)' + endif else + if deprecated_libs.contains(l) + warning('Enabling deprecated library, "@0@"'.format(l)) + endif subdir(l) endif if name != l
meson_options.txt +1 -1
@@ -8,7 +8,7 @@ option('developer_mode', type: 'feature', description: 'turn on additional build checks relevant for DPDK developers') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') -option('disable_libs', type: 'string', value: '', description: +option('disable_libs', type: 'string', value: 'kni', description: 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
Signature · 1 line
2.34.1
PATCH 2/2 kni: add deprecation warning at runtime
When KNI is being used at runtime, output a warning message about its deprecated status. This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
--- doc/guides/rel_notes/deprecation.rst | 6 ++---- lib/kni/rte_kni.c | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-)
doc/guides/rel_notes/deprecation.rst +2 -4
@@ -44,10 +44,8 @@ Deprecation Notices applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_ - and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_: - - * Some deprecation warnings will be added in DPDK 22.11. - * The KNI kernel module, library and PMD will be removed from the DPDK 23.11. + and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_, + the KNI kernel module, library and PMD will be removed from the DPDK 23.11 release. * 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
lib/kni/rte_kni.c +2 -0
@@ -96,6 +96,8 @@ static volatile int kni_fd = -1;int rte_kni_init(unsigned int max_kni_ifaces __rte_unused) { +RTE_LOG (WARNING ,KNI ,"WARNING: KNI is deprecated and will be removed in DPDK 23.11\n" ); +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,10 ,0 )if (rte_eal_iova_mode () !=RTE_IOVA_PA ) {RTE_LOG (ERR ,KNI ,"KNI requires IOVA as PA\n" );
Signature · 1 line
2.34.1
Quoted 19 lines
From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 5 October 2022 16.35To ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting
disabled_libsto the empty string (or other string not including 'kni')2. add support for a list of deprecated libs to the
lib/meson.buildfile
so the error message for KNI being disabled includes the fact that
it
is a deprecated library.3. for the dependent NIC driver,
drivers/net/kni, modify its disabled message to also reference the fact that KNI is disabled.
Quoted 8 lines
NOTE: This is part of the deprecation process for KNI agreed by the DPDK
technical board.[1][1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
Signed-off-by Bruce Richardson <[email protected]>---
Probably not required, but cannot hurt either:
Quoted 8 lines · Bruce Richardson
To ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting
disabled_libsto the empty string (or other string not including 'kni')
Quoted 6 lines
2. add support for a list of deprecated libs to the
lib/meson.buildfile so the error message for KNI being disabled includes the fact that it is a deprecated library.3. for the dependent NIC driver,
drivers/net/kni, modify its disabled message to also reference the fact that KNI is disabled.
Let's say I want to re-enable the net/kni driver.
How should I do this?
Passing -Denable_drivers=net/kni results in only getting net/kni. Passing -Denable_drivers=*/* gives the same result as passing none:
net/kni is disabled because relying on a deprecated lib.
Quoted 7 lines
NOTE: This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
Signed-off-by Bruce Richardson <[email protected]>
Signature · 1 line
David Marchand
Quoted 17 lines · David Marchand
Quoted 8 lines · Bruce Richardson
To ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting
disabled_libsto the empty string (or other string not including 'kni')Quoted 6 lines
2. add support for a list of deprecated libs to the
lib/meson.buildfile so the error message for KNI being disabled includes the fact that it is a deprecated library.3. for the dependent NIC driver,
drivers/net/kni, modify its disabled message to also reference the fact that KNI is disabled.
Quoted 7 lines
Let's say I want to re-enable the net/kni driver.
How should I do this?Passing -Denable_drivers=net/kni results in only getting net/kni. Passing -Denable_drivers=*/* gives the same result as passing none:
net/kni is disabled because relying on a deprecated lib.
Well, the error message still says that the library part is missing and that is why is has been disabled. In terms of enabling the library itself, from the doc part of the patch:
+.. note::
+
+ KNI is disabled by default in the DPDK build.
+ To re-enable the library, remove 'kni' from the "disable_libs" meson option when configuring a build.
I can similarly add a note to the net/kni documentation to say that it will be disabled by default because KNI is, and to re-enable it just enable KNI lib as described there. Is something like that needed, you think?
/Bruce
Hello Bruce,
drivers/net/kni/meson.build if is_windows · line 9
Quoted 9 lines · Bruce Richardson
drivers/net/kni/meson.build +1
-0@@ -6,6 +6,11 @@ if is_windows reason = 'not supported on Windows' subdir_done() endif +if not dpdk_conf.has('kni')
I think it should be:
if not dpdk_conf.has('RTE_LIB_KNI')
And to reply to your recent comment, I don't think we need to update this driver documentation.
The meson log is enough to figure out why net/kni is disabled.
Quoted 7 lines
drivers/net/kni/meson.build +4
-0+ build = false + reason = 'needs deprecated lib, "kni"' + subdir_done() +endif deps += 'kni' sources = files('rte_eth_kni.c')
Signature · 1 line
David Marchand
Quoted 16 lines · David Marchand
Hello Bruce,
drivers/net/kni/meson.build if is_windows · line 9
Quoted 9 lines · Bruce Richardson
drivers/net/kni/meson.build +1
-0@@ -6,6 +6,11 @@ if is_windows reason = 'not supported on Windows' subdir_done() endif +if not dpdk_conf.has('kni')I think it should be:
Quoted 2 lines
if not
dpdk_conf.has('RTE_LIB_KNI')
Ah, yes it should, sorry. Thanks for catching that. Will do V2 with this fixed.
/Bruce
PATCH v2 1/3 kni: flag deprecated status at build time
In reply to Bruce RichardsonTo ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting disabled_libs to the empty string (or other string not including 'kni')
2. add support for a list of deprecated libs to the lib/meson.build file so the error message for KNI being disabled includes the fact that it is a deprecated library.
3. for the dependent NIC driver, drivers/net/kni, modify its disabled message to also reference the fact that KNI is disabled.
NOTE: This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
---
V2: correct dpdk_conf lookup key to RTE_LIB_KNI
--- doc/guides/prog_guide/kernel_nic_interface.rst | 4 ++++ drivers/net/kni/meson.build | 5 +++++ lib/meson.build | 7 +++++++ meson_options.txt | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-)
doc/guides/prog_guide/kernel_nic_interface.rst +4 -0
@@ -14,6 +14,10 @@ Kernel NIC Interface For an alternative to KNI, that does not require any out-of-tree Linux kernel modules, or a custom library, see :ref:`virtio_user_as_exception_path`. +.. note:: + + KNI is disabled by default in the DPDK build. + To re-enable the library, remove 'kni' from the "disable_libs" meson option when configuring a build. The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.
drivers/net/kni/meson.build +5 -0
@@ -6,6 +6,11 @@ if is_windows reason = 'not supported on Windows' subdir_done() endif +if not dpdk_conf.has('RTE_LIB_KNI') + build = false + reason = 'needs deprecated lib, "kni"' + subdir_done() +endif deps += 'kni' sources = files('rte_eth_kni.c')
lib/meson.build +7 -0
@@ -85,6 +85,7 @@ optional_libs = [ 'vhost', ] +deprecated_libs = ['kni'] disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split()
@@ -133,7 +134,13 @@ foreach l:libraries if disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' + if deprecated_libs.contains(l) + reason += ' (deprecated lib)' + endif else + if deprecated_libs.contains(l) + warning('Enabling deprecated library, "@0@"'.format(l)) + endif subdir(l) endif if name != l
meson_options.txt +1 -1
@@ -8,7 +8,7 @@ option('developer_mode', type: 'feature', description: 'turn on additional build checks relevant for DPDK developers') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') -option('disable_libs', type: 'string', value: '', description: +option('disable_libs', type: 'string', value: 'kni', description: 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
--
2.34.1
PATCH v2 2/3 kni: add deprecation warning at runtime
When KNI is being used at runtime, output a warning message about its deprecated status. This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
--- doc/guides/rel_notes/deprecation.rst | 6 ++---- lib/kni/rte_kni.c | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-)
doc/guides/rel_notes/deprecation.rst +2 -4
@@ -37,10 +37,8 @@ Deprecation Notices applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_ - and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_: - - * Some deprecation warnings will be added in DPDK 22.11. - * The KNI kernel module, library and PMD will be removed from the DPDK 23.11. + and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_, + the KNI kernel module, library and PMD will be removed from the DPDK 23.11 release. * 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
lib/kni/rte_kni.c +2 -0
@@ -96,6 +96,8 @@ static volatile int kni_fd = -1;int rte_kni_init(unsigned int max_kni_ifaces __rte_unused) { +RTE_LOG (WARNING ,KNI ,"WARNING: KNI is deprecated and will be removed in DPDK 23.11\n" ); +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,10 ,0 )if (rte_eal_iova_mode () !=RTE_IOVA_PA ) {RTE_LOG (ERR ,KNI ,"KNI requires IOVA as PA\n" );
Signature · 1 line
2.34.1
Re: [PATCH v2 2/3] kni: add deprecation warning at runtime
Quoted 8 lines · Bruce Richardson
When KNI is being used at runtime, output a warning message about its deprecated status. This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
Signed-off-by Bruce Richardson <[email protected]>
Signature · 1 line
David Marchand
PATCH v2 3/3 devtools: enable kni library for test builds
In reply to Bruce RichardsonWhile KNI (or any other deprecated library) may be disabled by default, for build testing we need it enabled. Therefore explicitly set "disable_libs" build parameter to empty for any DPDK build where the value is not being explicitly set by the script.
--- devtools/test-meson-builds.sh | 5 +++++ 1 file changed, 5 insertions(+)
devtools/test-meson-builds.sh +5 -0
@@ -109,6 +109,11 @@ config () # <dir> <builddir> <meson options> return fi options= + # deprecated libs may be disabled by default, so for complete builds ensure + # no libs are disabled + if ! echo $* | grep -q -- 'disable_libs' ; then + options="$options -Ddisable_libs=" + fi if echo $* | grep -qw -- '--default-library=shared' ; then options="$options -Dexamples=all" else
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] devtools: enable kni library for test builds
Quoted 5 lines · Bruce Richardson
While KNI (or any other deprecated library) may be disabled by default, for build testing we need it enabled. Therefore explicitly set "
disable_libs" build parameter to empty for any DPDK build where the value is not being explicitly set by the script.
We also need an update in .ci/linux-build.sh so that KNI is still tested in GHA (esp. by ovsrobot).
It will help catch issues earlier than maintainers using test-meson-builds.sh.
Signature · 1 line
David Marchand
Quoted 15 lines · Bruce Richardson
To ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting
disabled_libsto the empty string (or other string not including 'kni')2. add support for a list of deprecated libs to the
lib/meson.buildfile so the error message for KNI being disabled includes the fact that it is a deprecated library.3. for the dependent NIC driver,
drivers/net/kni, modify its disabled message to also reference the fact that KNI is disabled.
Quoted 6 lines
NOTE: This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
Signed-off-by Bruce Richardson <[email protected]>
I suppose you wanted to go as simple as possible but let me suggest something. If you think it is not worth, I am ok with the current patch and you can add:
The suggestion:
By exposing the deprecated lib list to meson.build, we can make the deprecation warning as part of {drivers,lib}/meson.build. Then the other components depending on a deprecated library don't need to be updated.
Like:
drivers/meson.build +3 -0
@@ -133,6 +133,9 @@ foreach subpath:subdirs if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason += ' (deprecated lib)' + endif message('Disabling @1@ [@2@]: missing internal
dependency "@0@"'
.format(d, name, 'drivers/' + drv_path))
elsedrivers/net/kni/meson.build +0 -5
@@ -6,11 +6,6 @@ if is_windows reason = 'not supported on Windows' subdir_done() endif -if not dpdk_conf.has('RTE_LIB_KNI') - build = false - reason = 'needs deprecated lib, "kni"' - subdir_done() -endif deps += 'kni' sources = files('rte_eth_kni.c')
lib/meson.build +7 -3
@@ -85,7 +85,8 @@ optional_libs = [ 'vhost', ] -deprecated_libs = ['kni'] +dpdk_libs_deprecated += ['kni'] + disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split()
@@ -134,11 +135,11 @@ foreach l:libraries if disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' - if deprecated_libs.contains(l) + if dpdk_libs_deprecated.contains(l) reason += ' (deprecated lib)' endif else - if deprecated_libs.contains(l) + if dpdk_libs_deprecated.contains(l) warning('Enabling deprecated library, "@0@"'.format(l)) endif subdir(l)
@@ -156,6 +157,9 @@ foreach l:libraries if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason += ' (deprecated lib)' + endif message('Disabling @1@ [@2@]: missing internal dependency "@0@"' .format(d, name, 'lib/' + l)) else
meson.build +1 -0
@@ -42,6 +42,7 @@ dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] +dpdk_libs_deprecated = [] dpdk_libs_disabled = [] dpdk_drvs_disabled = [] testpmd_drivers_sources = []
PATCH v3 1/3 kni: flag deprecated status at build time
In reply to Bruce RichardsonTo ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting disabled_libs to the empty string (or other string not including 'kni')
2. add support for a list of deprecated libs to the lib/meson.build file so the error message for KNI being disabled includes the fact that it is a deprecated library.
3. for the dependent NIC driver, drivers/net/kni, modify the driver build code to similarly flag the deprecation in the reason why the driver is not being built..
NOTE: This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
---
V3: Incorporate code from David M. to generalise the driver dependency
handling of deprecated libs.
V2: correct dpdk_conf lookup key to RTE_LIB_KNI
--- doc/guides/prog_guide/kernel_nic_interface.rst | 4 ++++ drivers/meson.build | 3 +++ lib/meson.build | 11 +++++++++++ meson.build | 1 + meson_options.txt | 2 +- 5 files changed, 20 insertions(+), 1 deletion(-)
doc/guides/prog_guide/kernel_nic_interface.rst +4 -0
@@ -14,6 +14,10 @@ Kernel NIC Interface For an alternative to KNI, that does not require any out-of-tree Linux kernel modules, or a custom library, see :ref:`virtio_user_as_exception_path`. +.. note:: + + KNI is disabled by default in the DPDK build. + To re-enable the library, remove 'kni' from the "disable_libs" meson option when configuring a build. The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.
drivers/meson.build +3 -0
@@ -133,6 +133,9 @@ foreach subpath:subdirs if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason += ' (deprecated lib)' + endif message('Disabling @1@ [@2@]: missing internal dependency "@0@"' .format(d, name, 'drivers/' + drv_path)) else
lib/meson.build +11 -0
@@ -85,6 +85,8 @@ optional_libs = [ 'vhost', ] +dpdk_libs_deprecated += ['kni'] + disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split()
@@ -133,7 +135,13 @@ foreach l:libraries if disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' + if dpdk_libs_deprecated.contains(l) + reason += ' (deprecated lib)' + endif else + if dpdk_libs_deprecated.contains(l) + warning('Enabling deprecated library, "@0@"'.format(l)) + endif subdir(l) endif if name != l
@@ -149,6 +157,9 @@ foreach l:libraries if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) + if dpdk_libs_deprecated.contains(d) + reason += ' (deprecated lib)' + endif message('Disabling @1@ [@2@]: missing internal dependency "@0@"' .format(d, name, 'lib/' + l)) else
meson.build +1 -0
@@ -40,6 +40,7 @@ dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] +dpdk_libs_deprecated = [] dpdk_libs_disabled = [] dpdk_drvs_disabled = [] testpmd_drivers_sources = []
meson_options.txt +1 -1
@@ -8,7 +8,7 @@ option('developer_mode', type: 'feature', description: 'turn on additional build checks relevant for DPDK developers') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') -option('disable_libs', type: 'string', value: '', description: +option('disable_libs', type: 'string', value: 'kni', description: 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
Signature · 1 line
2.34.1
PATCH v3 2/3 kni: add deprecation warning at runtime
When KNI is being used at runtime, output a warning message about its deprecated status. This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
--- doc/guides/rel_notes/deprecation.rst | 6 ++---- lib/kni/rte_kni.c | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-)
doc/guides/rel_notes/deprecation.rst +2 -4
@@ -37,10 +37,8 @@ Deprecation Notices applications - other technologies such as virtio-user are recommended instead. Following the DPDK technical board `decision <https://mails.dpdk.org/archives/dev/2021-January/197077.html>`_ - and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_: - - * Some deprecation warnings will be added in DPDK 22.11. - * The KNI kernel module, library and PMD will be removed from the DPDK 23.11. + and `refinement <http://mails.dpdk.org/archives/dev/2022-June/243596.html>`_, + the KNI kernel module, library and PMD will be removed from the DPDK 23.11 release. * 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
lib/kni/rte_kni.c +2 -0
@@ -96,6 +96,8 @@ static volatile int kni_fd = -1;int rte_kni_init(unsigned int max_kni_ifaces __rte_unused) { +RTE_LOG (WARNING ,KNI ,"WARNING: KNI is deprecated and will be removed in DPDK 23.11\n" ); +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,10 ,0 )if (rte_eal_iova_mode () !=RTE_IOVA_PA ) {RTE_LOG (ERR ,KNI ,"KNI requires IOVA as PA\n" );
Signature · 1 line
2.34.1
PATCH v3 3/3 devtools: enable kni library for test builds
In reply to Bruce RichardsonWhile KNI (or any other deprecated library) may be disabled by default, for build testing we need it enabled. Therefore explicitly set "disable_libs" build parameter to empty for any DPDK build where the value is not being explicitly set by the script.
---
V3: Add disable_libs parameter clearing to CI jobs
--- .ci/linux-build.sh | 2 ++ devtools/test-meson-builds.sh | 5 +++++ 2 files changed, 7 insertions(+)
.ci/linux-build.sh +2 -0
@@ -107,6 +107,8 @@ OPTS="$OPTS -Dcheck_includes=true" if [ "$MINI" = "true" ]; then OPTS="$OPTS -Denable_drivers=net/null" OPTS="$OPTS -Ddisable_libs=*" +else + OPTS="$OPTS -Ddisable_libs=" fi if [ "$ASAN" = "true" ]; then
devtools/test-meson-builds.sh +5 -0
@@ -109,6 +109,11 @@ config () # <dir> <builddir> <meson options> return fi options= + # deprecated libs may be disabled by default, so for complete builds ensure + # no libs are disabled + if ! echo $* | grep -q -- 'disable_libs' ; then + options="$options -Ddisable_libs=" + fi if echo $* | grep -qw -- '--default-library=shared' ; then options="$options -Dexamples=all" else
Signature · 1 line
2.34.1
Quoted 21 lines · Bruce Richardson
To ensure all users are aware of KNI's deprecated status at build time we can take the following actions:
1. disable the library by default. It can be re-enabled by setting
disabled_libsto the empty string (or other string not including 'kni')2. add support for a list of deprecated libs to the
lib/meson.buildfile so the error message for KNI being disabled includes the fact that it is a deprecated library.3. for the dependent NIC driver,
drivers/net/kni, modify the driver build code to similarly flag the deprecation in the reason why the driver is not being built..NOTE: This is part of the deprecation process for KNI agreed by the DPDK technical board.[1]
[1] http://mails.dpdk.org/archives/dev/2022-June/243596.html
Quoted 7 lines
Signed-off-by Bruce Richardson <[email protected]>Signed-off-by David Marchand <[email protected]>---
V3: Incorporate code from David M. to generalise the driver dependency
handling of deprecated libs.
V2: correctdpdk_conflookup key toRTE_LIB_KNI
Thomas had some last minute offlist comments that I handled (he was asking for introducing the deprecated library handling first, then marking kni as deprecated).
I handled it and reworked the patches, the end-result is the same.
Series applied, thanks Bruce!
Signature · 1 line
David Marchand