Rework deprecated libraries selection by introducing a new configuration
option.
This breaks existing configurations that were relying on disable_libs=''
for enabling deprecated libraries.
On the other hand, it will make enabling optional libraries more
straightforward by taking the deprecated libraries out of the picture.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
Changes since v5:
- rebased,
- updated doc (kni, flow classify docs),
- updated deprecation notices and RN,
Changes since v4:
- changed the option to a list of libraries instead of a global on/off
knob,
- moved all deprecated libs checks under a single block for readability,
---
.ci/linux-build.sh | 2 +-
devtools/test-meson-builds.sh | 8 +++---
doc/guides/prog_guide/flow_classify_lib.rst | 5 ++--
.../prog_guide/kernel_nic_interface.rst | 3 +-
doc/guides/rel_notes/deprecation.rst | 4 ---
doc/guides/rel_notes/release_23_11.rst | 3 ++
lib/meson.build | 28 +++++++++++++------
meson_options.txt | 4 ++-
8 files changed, 36 insertions(+), 21 deletions(-)
@@ -97,7 +97,7 @@ if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=net/null"
OPTS="$OPTS -Ddisable_libs=*"
else
- OPTS="$OPTS -Ddisable_libs="
+ OPTS="$OPTS -Denable_deprecated_libs=*"
fi
OPTS="$OPTS -Dlibdir=lib"
@@ -120,10 +120,10 @@ 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="
+ # deprecated libs are disabled by default, so for complete builds
+ # enable them
+ if ! echo $* | grep -q -- 'enable_deprecated_libs' ; then
+ options="$options -Denable_deprecated_libs=*"
fi
if echo $* | grep -qw -- '--default-library=shared' ; then
options="$options -Dexamples=all"
@@ -10,8 +10,9 @@ Flow Classification Library
See :doc:`../rel_notes/deprecation`.
It is disabled by default in the DPDK build.
- To re-enable the library, remove 'flow_classify' from the "disable_libs"
- meson option when configuring a build.
+ To re-enable the library, tell meson to enable 'flow_classify' as part of
+ the deprecated libraries meson option
+ ``-Denable_deprecated_libs=flow_classify``.
DPDK provides a Flow Classification library that provides the ability
to classify an input packet by matching it against a set of Flow rules.
@@ -18,7 +18,8 @@ Kernel NIC Interface
.. 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.
+ To re-enable the library, tell meson to enable 'kni' as part of the
+ deprecated libraries meson option ``-Denable_deprecated_libs=kni``.
The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.
@@ -35,10 +35,6 @@ Deprecation Notices
which also added support for standard atomics
(Ref: https://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html)
-* build: Enabling deprecated libraries (``flow_classify``, ``kni``)
- won't be possible anymore through the use of the ``disable_libs`` build option.
- A new build option for deprecated libraries will be introduced instead.
-
* kvargs: The function ``rte_kvargs_process`` will get a new parameter
for returning key match count. It will ease handling of no-match case.
@@ -55,6 +55,9 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* build: Enabling deprecated libraries (``flow_classify``, ``kni``) is now done
+ using the new ``enable_deprecated_libraries`` build option.
+
Removed Items
-------------
@@ -93,6 +93,15 @@ dpdk_libs_deprecated += [
'kni',
]
+enable_deprecated_libs = []
+foreach l:run_command(list_dir_globs, get_option('enable_deprecated_libs'),
+ check: true).stdout().split()
+ if not dpdk_libs_deprecated.contains(l)
+ continue
+ endif
+ enable_deprecated_libs += l
+endforeach
+
disabled_libs = []
opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'),
check: true).stdout().split()
@@ -137,16 +146,19 @@ foreach l:libraries
deps += ['eal']
endif
- 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)
+ if dpdk_libs_deprecated.contains(l)
+ if not enable_deprecated_libs.contains(l)
+ build = false
+ reason = 'not in enabled deprecated libraries build config'
+ else
warning('Enabling deprecated library, "@0@"'.format(l))
endif
+ elif disabled_libs.contains(l)
+ build = false
+ reason = 'explicitly disabled via build config'
+ endif
+
+ if build
subdir(l)
endif
if name != l
@@ -10,7 +10,7 @@ option('disable_apps', type: 'string', value: '', description:
'Comma-separated list of apps to explicitly disable.')
option('disable_drivers', type: 'string', value: '', description:
'Comma-separated list of drivers to explicitly disable.')
-option('disable_libs', type: 'string', value: 'flow_classify,kni', description:
+option('disable_libs', type: 'string', value: '', 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.')
@@ -18,6 +18,8 @@ option('enable_docs', type: 'boolean', value: false, description:
'build documentation')
option('enable_apps', type: 'string', value: '', description:
'Comma-separated list of apps to build. If unspecified, build all apps.')
+option('enable_deprecated_libs', type: 'string', value: '', description:
+ 'Comma-separated list of deprecated libraries to explicitly enable.')
option('enable_drivers', type: 'string', value: '', description:
'Comma-separated list of drivers to build. If unspecified, build all drivers.')
option('enable_driver_sdk', type: 'boolean', value: false, description: