[PATCH v2 1/3] kni: flag deprecated status at build time
David Marchand
david.marchand at redhat.com
Fri Oct 7 21:33:02 CEST 2022
On Fri, Oct 7, 2022 at 5:01 PM Bruce Richardson
<bruce.richardson at 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 at 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 at 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 = []
More information about the dev
mailing list