[v4,1/4] kni: move IOVA build check

Message ID 20230621170058.2740340-2-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series Select optional libraries |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand June 21, 2023, 5 p.m. UTC
  kni dependency to IOVA configuration does not need to be expressed in
the top level lib/meson.build file.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/kni/meson.build | 5 +++++
 lib/meson.build     | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)
  

Comments

Bruce Richardson June 22, 2023, 8:37 a.m. UTC | #1
On Wed, Jun 21, 2023 at 07:00:55PM +0200, David Marchand wrote:
> kni dependency to IOVA configuration does not need to be expressed in
> the top level lib/meson.build file.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  lib/kni/meson.build | 5 +++++
>  lib/meson.build     | 3 ---
>  2 files changed, 5 insertions(+), 3 deletions(-)

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

even if the rest of the set gets pushed to next release, I think this patch
should go in this one anyway. It's a simple cleanup.
Thanks.
  

Patch

diff --git a/lib/kni/meson.build b/lib/kni/meson.build
index 8a71d8ba6f..5ce410f7f2 100644
--- a/lib/kni/meson.build
+++ b/lib/kni/meson.build
@@ -7,6 +7,11 @@  if is_windows
     subdir_done()
 endif
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    build = false
+    reason = 'requires IOVA in mbuf (set enable_iova_as_pa option)'
+endif
+
 if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
     build = false
     reason = 'only supported on 64-bit Linux'
diff --git a/lib/meson.build b/lib/meson.build
index 9677239236..f5c8a70a1d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -95,9 +95,6 @@  dpdk_libs_deprecated += [
 disabled_libs = []
 opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'),
         check: true).stdout().split()
-if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
-    opt_disabled_libs += ['kni']
-endif
 foreach l:opt_disabled_libs
     if not optional_libs.contains(l)
         warning('Cannot disable mandatory library "@0@"'.format(l))