From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v2 1/3] kni: flag deprecated status at build time
Date: Fri, 7 Oct 2022 16:01:32 +0100 [thread overview]
Message-ID: <20221007150134.1110983-1-bruce.richardson@intel.com> (raw)
In-Reply-To: <20221005143451.157613-1-bruce.richardson@intel.com>
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
next prev parent reply other threads:[~2022-10-07 15:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 14:34 [PATCH 1/2] " 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 ` Bruce Richardson [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221007150134.1110983-1-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).