* [PATCH 1/2] kni: flag deprecated status at build time
@ 2022-10-05 14:34 Bruce Richardson
2022-10-05 14:34 ` [PATCH 2/2] kni: add deprecation warning at runtime Bruce Richardson
` (5 more replies)
0 siblings, 6 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-05 14:34 UTC (permalink / raw)
To: dev; +Cc: techboard, 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_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
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
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(-)
diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
index 03b5bca958..6a564f61ca 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -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.
diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build
index 2acc989694..2deb2c4166 100644
--- a/drivers/net/kni/meson.build
+++ b/drivers/net/kni/meson.build
@@ -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')
diff --git a/lib/meson.build b/lib/meson.build
index c648f7d800..264a1671df 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -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
diff --git a/meson_options.txt b/meson_options.txt
index 8640f599ae..39af78787c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/2] kni: add deprecation warning at runtime
2022-10-05 14:34 [PATCH 1/2] kni: flag deprecated status at build time Bruce Richardson
@ 2022-10-05 14:34 ` Bruce Richardson
2022-10-05 14:45 ` [PATCH 1/2] kni: flag deprecated status at build time Morten Brørup
` (4 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-05 14:34 UTC (permalink / raw)
To: dev; +Cc: techboard, 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 <bruce.richardson@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ++----
lib/kni/rte_kni.c | 2 ++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 6c2fc15c77..8d99ce5f2f 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
index 7971c56bb4..eb7c10ff19 100644
--- a/lib/kni/rte_kni.c
+++ b/lib/kni/rte_kni.c
@@ -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");
--
2.34.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH 1/2] kni: flag deprecated status at build time
2022-10-05 14:34 [PATCH 1/2] kni: flag deprecated status at build time Bruce Richardson
2022-10-05 14:34 ` [PATCH 2/2] kni: add deprecation warning at runtime Bruce Richardson
@ 2022-10-05 14:45 ` Morten Brørup
2022-10-05 20:10 ` David Marchand
` (3 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Morten Brørup @ 2022-10-05 14:45 UTC (permalink / raw)
To: Bruce Richardson, dev; +Cc: techboard
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Wednesday, 5 October 2022 16.35
>
> 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
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Probably not required, but cannot hurt either:
Series-acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] kni: flag deprecated status at build time
2022-10-05 14:34 [PATCH 1/2] kni: flag deprecated status at build time Bruce Richardson
2022-10-05 14:34 ` [PATCH 2/2] kni: add deprecation warning at runtime Bruce Richardson
2022-10-05 14:45 ` [PATCH 1/2] kni: flag deprecated status at build time Morten Brørup
@ 2022-10-05 20:10 ` David Marchand
2022-10-07 10:34 ` Bruce Richardson
2022-10-07 11:08 ` David Marchand
` (2 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: David Marchand @ 2022-10-05 20:10 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, techboard, Morten Brørup, Thomas Monjalon
On Wed, Oct 5, 2022 at 4:35 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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.
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.
>
> 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 <bruce.richardson@intel.com>
--
David Marchand
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] kni: flag deprecated status at build time
2022-10-05 20:10 ` David Marchand
@ 2022-10-07 10:34 ` Bruce Richardson
0 siblings, 0 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-07 10:34 UTC (permalink / raw)
To: David Marchand; +Cc: dev, techboard, Morten Brørup, Thomas Monjalon
On Wed, Oct 05, 2022 at 10:10:10PM +0200, David Marchand wrote:
> On Wed, Oct 5, 2022 at 4:35 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > 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.
>
> 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
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] kni: flag deprecated status at build time
2022-10-05 14:34 [PATCH 1/2] kni: flag deprecated status at build time Bruce Richardson
` (2 preceding siblings ...)
2022-10-05 20:10 ` David Marchand
@ 2022-10-07 11:08 ` David Marchand
2022-10-07 13:05 ` Bruce Richardson
2022-10-07 15:01 ` [PATCH v2 1/3] " Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 " Bruce Richardson
5 siblings, 1 reply; 17+ messages in thread
From: David Marchand @ 2022-10-07 11:08 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, techboard
Hello Bruce,
On Wed, Oct 5, 2022 at 4:35 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build
> index 2acc989694..2deb2c4166 100644
> --- a/drivers/net/kni/meson.build
> +++ b/drivers/net/kni/meson.build
> @@ -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.
> + build = false
> + reason = 'needs deprecated lib, "kni"'
> + subdir_done()
> +endif
>
> deps += 'kni'
> sources = files('rte_eth_kni.c')
--
David Marchand
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] kni: flag deprecated status at build time
2022-10-07 11:08 ` David Marchand
@ 2022-10-07 13:05 ` Bruce Richardson
0 siblings, 0 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-07 13:05 UTC (permalink / raw)
To: David Marchand; +Cc: dev, techboard
On Fri, Oct 07, 2022 at 01:08:38PM +0200, David Marchand wrote:
> Hello Bruce,
>
> On Wed, Oct 5, 2022 at 4:35 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build
> > index 2acc989694..2deb2c4166 100644
> > --- a/drivers/net/kni/meson.build
> > +++ b/drivers/net/kni/meson.build
> > @@ -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')
>
Ah, yes it should, sorry. Thanks for catching that. Will do V2 with this fixed.
/Bruce
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/3] kni: flag deprecated status at build time
2022-10-05 14:34 [PATCH 1/2] kni: flag deprecated status at build time Bruce Richardson
` (3 preceding siblings ...)
2022-10-07 11:08 ` David Marchand
@ 2022-10-07 15:01 ` Bruce Richardson
2022-10-07 15:01 ` [PATCH v2 2/3] kni: add deprecation warning at runtime Bruce Richardson
` (2 more replies)
2022-10-10 10:44 ` [PATCH v3 " Bruce Richardson
5 siblings, 3 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-07 15:01 UTC (permalink / raw)
To: dev; +Cc: david.marchand, 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_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
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
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(-)
diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
index 03b5bca958..6a564f61ca 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -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.
diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build
index 2acc989694..6289aa6cc3 100644
--- a/drivers/net/kni/meson.build
+++ b/drivers/net/kni/meson.build
@@ -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')
diff --git a/lib/meson.build b/lib/meson.build
index c648f7d800..264a1671df 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -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
diff --git a/meson_options.txt b/meson_options.txt
index 8640f599ae..39af78787c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 2/3] kni: add deprecation warning at runtime
2022-10-07 15:01 ` [PATCH v2 1/3] " Bruce Richardson
@ 2022-10-07 15:01 ` Bruce Richardson
2022-10-07 19:34 ` David Marchand
2022-10-07 15:01 ` [PATCH v2 3/3] devtools: enable kni library for test builds Bruce Richardson
2022-10-07 19:33 ` [PATCH v2 1/3] kni: flag deprecated status at build time David Marchand
2 siblings, 1 reply; 17+ messages in thread
From: Bruce Richardson @ 2022-10-07 15:01 UTC (permalink / raw)
To: dev; +Cc: david.marchand, 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 <bruce.richardson@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ++----
lib/kni/rte_kni.c | 2 ++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 7c74725968..41e81be6ae 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
index 7971c56bb4..eb7c10ff19 100644
--- a/lib/kni/rte_kni.c
+++ b/lib/kni/rte_kni.c
@@ -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");
--
2.34.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 3/3] devtools: enable kni library for test builds
2022-10-07 15:01 ` [PATCH v2 1/3] " Bruce Richardson
2022-10-07 15:01 ` [PATCH v2 2/3] kni: add deprecation warning at runtime Bruce Richardson
@ 2022-10-07 15:01 ` Bruce Richardson
2022-10-07 19:38 ` David Marchand
2022-10-07 19:33 ` [PATCH v2 1/3] kni: flag deprecated status at build time David Marchand
2 siblings, 1 reply; 17+ messages in thread
From: Bruce Richardson @ 2022-10-07 15:01 UTC (permalink / raw)
To: dev; +Cc: david.marchand, 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.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
devtools/test-meson-builds.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index e20a1c1df3..3a308bc9af 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -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
--
2.34.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/3] kni: flag deprecated status at build time
2022-10-07 15:01 ` [PATCH v2 1/3] " Bruce Richardson
2022-10-07 15:01 ` [PATCH v2 2/3] kni: add deprecation warning at runtime Bruce Richardson
2022-10-07 15:01 ` [PATCH v2 3/3] devtools: enable kni library for test builds Bruce Richardson
@ 2022-10-07 19:33 ` David Marchand
2 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-10-07 19:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Fri, Oct 7, 2022 at 5:01 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
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:
Reviewed-by: David Marchand <david.marchand@redhat.com>
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:
diff --git a/drivers/meson.build b/drivers/meson.build
index f6ba5ba4fb..f7ef22c9e6 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -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
diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build
index 6289aa6cc3..2acc989694 100644
--- a/drivers/net/kni/meson.build
+++ b/drivers/net/kni/meson.build
@@ -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')
diff --git a/lib/meson.build b/lib/meson.build
index 264a1671df..a17a5a986a 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -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
diff --git a/meson.build b/meson.build
index 8b1b09ead5..8a2d64efef 100644
--- a/meson.build
+++ b/meson.build
@@ -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 = []
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/3] kni: add deprecation warning at runtime
2022-10-07 15:01 ` [PATCH v2 2/3] kni: add deprecation warning at runtime Bruce Richardson
@ 2022-10-07 19:34 ` David Marchand
0 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-10-07 19:34 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Fri, Oct 7, 2022 at 5:01 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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 <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 3/3] devtools: enable kni library for test builds
2022-10-07 15:01 ` [PATCH v2 3/3] devtools: enable kni library for test builds Bruce Richardson
@ 2022-10-07 19:38 ` David Marchand
0 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-10-07 19:38 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Fri, Oct 7, 2022 at 5:02 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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.
--
David Marchand
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v3 1/3] kni: flag deprecated status at build time
2022-10-05 14:34 [PATCH 1/2] kni: flag deprecated status at build time Bruce Richardson
` (4 preceding siblings ...)
2022-10-07 15:01 ` [PATCH v2 1/3] " Bruce Richardson
@ 2022-10-10 10:44 ` Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 2/3] kni: add deprecation warning at runtime Bruce Richardson
` (2 more replies)
5 siblings, 3 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-10 10:44 UTC (permalink / raw)
To: dev; +Cc: david.marchand, 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_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
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
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(-)
diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
index 03b5bca958..6a564f61ca 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -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.
diff --git a/drivers/meson.build b/drivers/meson.build
index f6ba5ba4fb..f7ef22c9e6 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -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
diff --git a/lib/meson.build b/lib/meson.build
index c648f7d800..a17a5a986a 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -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
diff --git a/meson.build b/meson.build
index cf3343a547..1d35a255c3 100644
--- a/meson.build
+++ b/meson.build
@@ -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 = []
diff --git a/meson_options.txt b/meson_options.txt
index 8640f599ae..39af78787c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v3 2/3] kni: add deprecation warning at runtime
2022-10-10 10:44 ` [PATCH v3 " Bruce Richardson
@ 2022-10-10 10:44 ` Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 3/3] devtools: enable kni library for test builds Bruce Richardson
2022-10-10 15:09 ` [PATCH v3 1/3] kni: flag deprecated status at build time David Marchand
2 siblings, 0 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-10 10:44 UTC (permalink / raw)
To: dev; +Cc: david.marchand, 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 <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ++----
lib/kni/rte_kni.c | 2 ++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 7c74725968..41e81be6ae 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
index 7971c56bb4..eb7c10ff19 100644
--- a/lib/kni/rte_kni.c
+++ b/lib/kni/rte_kni.c
@@ -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");
--
2.34.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v3 3/3] devtools: enable kni library for test builds
2022-10-10 10:44 ` [PATCH v3 " Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 2/3] kni: add deprecation warning at runtime Bruce Richardson
@ 2022-10-10 10:44 ` Bruce Richardson
2022-10-10 15:09 ` [PATCH v3 1/3] kni: flag deprecated status at build time David Marchand
2 siblings, 0 replies; 17+ messages in thread
From: Bruce Richardson @ 2022-10-10 10:44 UTC (permalink / raw)
To: dev; +Cc: david.marchand, 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.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
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(+)
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 06104eca22..14148fef4a 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -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
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index e20a1c1df3..3a308bc9af 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -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
--
2.34.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 1/3] kni: flag deprecated status at build time
2022-10-10 10:44 ` [PATCH v3 " Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 2/3] kni: add deprecation warning at runtime Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 3/3] devtools: enable kni library for test builds Bruce Richardson
@ 2022-10-10 15:09 ` David Marchand
2 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-10-10 15:09 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Thomas Monjalon
On Mon, Oct 10, 2022 at 12:45 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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 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
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> ---
> 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
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!
--
David Marchand
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2022-10-10 15:09 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 14:34 [PATCH 1/2] kni: flag deprecated status at build time Bruce Richardson
2022-10-05 14:34 ` [PATCH 2/2] kni: add deprecation warning at runtime Bruce Richardson
2022-10-05 14:45 ` [PATCH 1/2] kni: flag deprecated status at build time Morten Brørup
2022-10-05 20:10 ` David Marchand
2022-10-07 10:34 ` Bruce Richardson
2022-10-07 11:08 ` David Marchand
2022-10-07 13:05 ` Bruce Richardson
2022-10-07 15:01 ` [PATCH v2 1/3] " Bruce Richardson
2022-10-07 15:01 ` [PATCH v2 2/3] kni: add deprecation warning at runtime Bruce Richardson
2022-10-07 19:34 ` David Marchand
2022-10-07 15:01 ` [PATCH v2 3/3] devtools: enable kni library for test builds Bruce Richardson
2022-10-07 19:38 ` David Marchand
2022-10-07 19:33 ` [PATCH v2 1/3] kni: flag deprecated status at build time David Marchand
2022-10-10 10:44 ` [PATCH v3 " Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 2/3] kni: add deprecation warning at runtime Bruce Richardson
2022-10-10 10:44 ` [PATCH v3 3/3] devtools: enable kni library for test builds Bruce Richardson
2022-10-10 15:09 ` [PATCH v3 1/3] kni: flag deprecated status at build time David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).