[v3,5/5] drivers: skip build of sub-libs not supporting IOVA mode

Message ID 20230314142958.3479004-6-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series refactor disabling IOVA as PA |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Thomas Monjalon March 14, 2023, 2:29 p.m. UTC
  If IOVA as PA is disabled and the driver requires the IOVA field,
the build of the driver was disabled.
Unfortunately some drivers were building some sub-libraries
(with specific options for vector paths) which were not disabled.

The build parsing of those drivers need to be skipped earlier
to avoid defining the sub-libraries.

Fixes: a986c2b7973d ("build: add option to configure IOVA mode as PA")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Shijith Thotton <sthotton@marvell.com>
---
 drivers/common/idpf/meson.build | 4 ++++
 drivers/event/dlb2/meson.build  | 5 ++++-
 drivers/net/bnxt/meson.build    | 4 ++++
 drivers/net/enic/meson.build    | 4 ++++
 drivers/net/i40e/meson.build    | 4 ++++
 drivers/net/iavf/meson.build    | 3 +++
 drivers/net/virtio/meson.build  | 4 ++++
 7 files changed, 27 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build
index 58059ef443..63f60accd9 100644
--- a/drivers/common/idpf/meson.build
+++ b/drivers/common/idpf/meson.build
@@ -1,6 +1,10 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2022 Intel Corporation
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    subdir_done()
+endif
+
 deps += ['mbuf']
 
 sources = files(
diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build
index a2e60273c5..515d1795fe 100644
--- a/drivers/event/dlb2/meson.build
+++ b/drivers/event/dlb2/meson.build
@@ -1,4 +1,3 @@ 
-
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019-2020 Intel Corporation
 
@@ -8,6 +7,10 @@  if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64')
         subdir_done()
 endif
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    subdir_done()
+endif
+
 sources = files(
         'dlb2.c',
         'dlb2_iface.c',
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 09d494e90f..0288ed6262 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -8,6 +8,10 @@  if is_windows
     subdir_done()
 endif
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    subdir_done()
+endif
+
 headers = files('rte_pmd_bnxt.h')
 cflags_options = [
         '-DSUPPORT_CFA_HW_ALL=1',
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 7131a25f09..0a0992c3cb 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -7,6 +7,10 @@  if is_windows
     subdir_done()
 endif
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    subdir_done()
+endif
+
 sources = files(
         'base/vnic_cq.c',
         'base/vnic_dev.c',
diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
index e00c1a9ef9..8e53b87a65 100644
--- a/drivers/net/i40e/meson.build
+++ b/drivers/net/i40e/meson.build
@@ -13,6 +13,10 @@  if arch_subdir == 'riscv'
     subdir_done()
 endif
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    subdir_done()
+endif
+
 cflags += ['-DPF_DRIVER',
     '-DVF_DRIVER',
     '-DINTEGRATED_VF',
diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build
index 6df771f917..fc09ffa2ae 100644
--- a/drivers/net/iavf/meson.build
+++ b/drivers/net/iavf/meson.build
@@ -1,6 +1,9 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    subdir_done()
+endif
 
 cflags += ['-Wno-strict-aliasing']
 
diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index 0ffd77024e..ef016c1566 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -7,6 +7,10 @@  if is_windows
     subdir_done()
 endif
 
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
+    subdir_done()
+endif
+
 sources += files(
         'virtio.c',
         'virtio_cvq.c',