> -----Original Message-----
> From: Thomas Monjalon <tho...@monjalon.net>
> Sent: Sunday, February 19, 2023 7:55 PM
> To: dev@dpdk.org
> Cc: David Marchand <david.march...@redhat.com>; Richardson, Bruce
> <bruce.richard...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>;
> sta...@dpdk.org; Wu, Jingjing <jingjing...@intel.com>; Xing, Beilei
> <beilei.x...@intel.com>; McDaniel, Timothy <timothy.mcdan...@intel.com>;
> Ajit Khaparde <ajit.khapa...@broadcom.com>; Somnath Kotur
> <somnath.ko...@broadcom.com>; Daley, John <johnd...@cisco.com>;
> Hyong Youb Kim <hyon...@cisco.com>; Dongdong Liu
> <liudongdo...@huawei.com>; Yisen Zhuang <yisen.zhu...@huawei.com>;
> Zhang, Yuying <yuying.zh...@intel.com>; Maxime Coquelin
> <maxime.coque...@redhat.com>; Xia, Chenbo <chenbo....@intel.com>;
> Shijith Thotton <sthot...@marvell.com>; Matz, Olivier
> <olivier.m...@6wind.com>
> Subject: [PATCH] drivers: skip build of sub-libs not supporting IOVA mode
> 
> If IOVA as PA is disabled and the driver does not support IOVA as VA, 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: sta...@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
> ---
>  drivers/common/idpf/meson.build | 4 ++++
> drivers/event/dlb2/meson.build  | 5 ++++-
>  drivers/meson.build             | 4 ++--
>  drivers/net/bnxt/meson.build    | 4 ++++
>  drivers/net/enic/meson.build    | 4 ++++
>  drivers/net/hns3/meson.build    | 4 +---
>  drivers/net/i40e/meson.build    | 4 ++++
>  drivers/net/iavf/meson.build    | 3 +++
>  drivers/net/virtio/meson.build  | 4 ++++
>  9 files changed, 30 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/common/idpf/meson.build
> b/drivers/common/idpf/meson.build index 58059ef443..74c0e92cac 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 not get_option('enable_iova_as_pa')
> +    subdir_done()
> +endif


> +
>  deps += ['mbuf']
> 
>  sources = files(
> diff --git a/drivers/event/dlb2/meson.build
> b/drivers/event/dlb2/meson.build index a2e60273c5..8ae7db0011 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 not get_option('enable_iova_as_pa')
> +    subdir_done()
> +endif
> +
>  sources = files(
>          'dlb2.c',
>          'dlb2_iface.c',
> diff --git a/drivers/meson.build b/drivers/meson.build index
> 0618c31a69..9c10e2633d 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -127,9 +127,9 @@ foreach subpath:subdirs
>              # pull in driver directory which should update all the local 
> variables
>              subdir(drv_path)
> 
> -            if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not
> pmd_supports_disable_iova_as_pa and not
> always_enable.contains(drv_path)
> +            if not get_option('enable_iova_as_pa') and not
> + pmd_supports_disable_iova_as_pa and not
> + always_enable.contains(drv_path)
>                  build = false
> -                reason = 'driver does not support disabling IOVA as PA mode'
> +                reason = 'IOVA as VA not supported'
>              endif

If we check enable_iova_as_pa for each unsupported driver , do we still need 
"pmd_supports_disable_iova_as_pa"?


Reply via email to