From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH 1/2] build: change flag variable type to boolean
Date: Mon, 12 Jun 2023 17:21:03 +0100 [thread overview]
Message-ID: <20230612162104.170749-1-bruce.richardson@intel.com> (raw)
The has_libnuma flag was using 0 and 1 integer values, instead of the
more appropriate boolean type. Change to use true/false instead.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
config/arm/meson.build | 2 +-
config/meson.build | 4 ++--
lib/eal/linux/meson.build | 2 +-
lib/vhost/meson.build | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 43f6a551a2..faba5e38cf 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -592,7 +592,7 @@ if update_flags
part_number = soc_config['part_number']
soc_flags = soc_config.get('flags', [])
if not soc_config.get('numa', true)
- has_libnuma = 0
+ has_libnuma = false
endif
disable_drivers += ',' + soc_config.get('disable_drivers', '')
diff --git a/config/meson.build b/config/meson.build
index 65087ce090..8aebccbbdc 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -174,7 +174,7 @@ if link_lib != ''
endif
# check for libraries used in multiple places in DPDK
-has_libnuma = 0
+has_libnuma = false
find_libnuma = true
if meson.is_cross_build() and not meson.get_cross_property('numa', true)
# don't look for libnuma if explicitly disabled in cross build
@@ -184,7 +184,7 @@ if find_libnuma
numa_dep = cc.find_library('numa', required: false)
if numa_dep.found() and cc.has_header('numaif.h')
dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
- has_libnuma = 1
+ has_libnuma = true
add_project_link_arguments('-lnuma', language: 'c')
dpdk_extra_ldflags += '-lnuma'
endif
diff --git a/lib/eal/linux/meson.build b/lib/eal/linux/meson.build
index 1b913acc06..e99ebed256 100644
--- a/lib/eal/linux/meson.build
+++ b/lib/eal/linux/meson.build
@@ -20,6 +20,6 @@ sources += files(
)
deps += ['kvargs', 'telemetry']
-if has_libnuma == 1
+if has_libnuma
dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
endif
diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build
index 0d1abf6283..9e39d221a1 100644
--- a/lib/vhost/meson.build
+++ b/lib/vhost/meson.build
@@ -5,7 +5,7 @@ if not is_linux
build = false
reason = 'only supported on Linux'
endif
-if has_libnuma == 1
+if has_libnuma
dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
endif
if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
--
2.39.2
next reply other threads:[~2023-06-12 16:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 16:21 Bruce Richardson [this message]
2023-06-12 16:21 ` [PATCH 2/2] build: prevent accidentally building without NUMA support Bruce Richardson
2023-06-12 17:14 ` [PATCH v2 1/2] build: change flag variable type to boolean Bruce Richardson
2023-06-12 17:14 ` [PATCH v2 2/2] build: prevent accidentally building without NUMA support Bruce Richardson
2023-06-12 17:59 ` Bruce Richardson
2023-06-13 13:50 ` David Marchand
2023-06-13 13:43 ` [PATCH v2 1/2] build: change flag variable type to boolean David Marchand
2023-06-13 13:55 ` Bruce Richardson
2023-06-13 15:33 ` [PATCH v3 0/2] replace int flags with booleans Bruce Richardson
2023-06-13 15:33 ` [PATCH v3 1/2] build: change NUMA flag variable type to boolean Bruce Richardson
2023-06-13 15:33 ` [PATCH v3 2/2] build: change libfdt " Bruce Richardson
2023-06-14 12:42 ` David Marchand
2023-06-15 13:53 ` [PATCH v3 0/2] replace int flags with booleans David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230612162104.170749-1-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).