From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69D0F42CA7; Tue, 13 Jun 2023 19:09:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 089B740ED6; Tue, 13 Jun 2023 19:09:26 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id ED6C240A8A for ; Tue, 13 Jun 2023 19:09:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686676164; x=1718212164; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5QZGeM3s5PAosssA4KHOXmQI3fJ+7rV+lbEzEd4ots4=; b=D+8pnyYrEA41wd30O+dM8cKUozBmvrfMPQSt4q2YV5nqnOEEs0hdCLgB +NcjpfIT/QscXMjg6Ll0xdDLxn/T7cENjppe+npoIcGBjLomrZArAPfCu dJpL0oHhQi75qynpNJqgGD2E+iEkQ0j8WtM56DbKXQRoWClKp+L3tfGHv W4O3oDQWKWXqSKgVZki3kUZDqtRTWX9u3YMQeMX/CW9EpJwKY7GIrQHRf Zn0MiZG+RGjNTz+wSHSZa4+cuZXbANcC4Wtaq7E6qGbA0wrdbI8ZHN9L+ awcHLMvARWwXB9qKXCAkLS5drteSmv0qEkCRK6/4Lz4xH/Uoy4+NzH0As w==; X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="360881584" X-IronPort-AV: E=Sophos;i="6.00,240,1681196400"; d="scan'208";a="360881584" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 10:09:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="958466999" X-IronPort-AV: E=Sophos;i="6.00,240,1681196400"; d="scan'208";a="958466999" Received: from silpixa00401385.ir.intel.com ([10.237.214.11]) by fmsmga006.fm.intel.com with ESMTP; 13 Jun 2023 10:09:20 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , David Marchand Subject: [PATCH v4] build: prevent accidentally building without NUMA support Date: Tue, 13 Jun 2023 18:08:50 +0100 Message-Id: <20230613170849.166149-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230613165839.165887-1-bruce.richardson@intel.com> References: <20230613165839.165887-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When libnuma development package is missing on a system, DPDK can still be built but will be missing much-needed support for NUMA memory management. This may later cause issues at runtime if the resulting binary is run on a NUMA system. We can reduce the incidence of such runtime errors by ensuring that, for native builds*, libnuma is present - unless the user actually specifies via "max_numa_nodes" that they don't require NUMA support. Having this as an error condition is also in keeping with what is documented in the Linux GSG doc, where libnuma is listed as a requirement for building DPDK [1]. * NOTE: cross-compilation builds have a different logic set, with a separate "numa" value indicating if numa support is necessary. Depends-on: series-28489 ("replace int flags with booleans") [1] https://doc.dpdk.org/guides-23.03/linux_gsg/sys_reqs.html Signed-off-by: Bruce Richardson Signed-off-by: David Marchand --- V4: Add Depends-on tag so CI picks up dependency V3: - install 32-bit libnuma packages on CI systems [thanks to David for the changes] - split the patch out of the previous patchset, so it can be tracked separately from the more minor fixup changes. V2: Limit check to linux only --- .github/workflows/build.yml | 5 ++++- config/meson.build | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b629fcdbd..a479783bbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,6 +91,9 @@ jobs: with: path: reference key: ${{ steps.get_ref_keys.outputs.abi }} + - name: Configure i386 architecture + if: env.BUILD_32BIT == 'true' + run: sudo dpkg --add-architecture i386 - name: Update APT cache run: sudo apt update || true - name: Install packages @@ -104,7 +107,7 @@ jobs: pkg-config - name: Install i386 cross compiling packages if: env.BUILD_32BIT == 'true' - run: sudo apt install -y gcc-multilib g++-multilib + run: sudo apt install -y gcc-multilib g++-multilib libnuma-dev:i386 - name: Install aarch64 cross compiling packages if: env.AARCH64 == 'true' run: sudo apt install -y crossbuild-essential-arm64 diff --git a/config/meson.build b/config/meson.build index 22d7d908b7..d8223718e4 100644 --- a/config/meson.build +++ b/config/meson.build @@ -381,6 +381,15 @@ endif if not dpdk_conf.has('RTE_MAX_NUMA_NODES') error('Number of NUMA nodes not specified.') endif +if (is_linux and + dpdk_conf.get('RTE_MAX_NUMA_NODES') > 1 and + not meson.is_cross_build() and + not has_libnuma) + error(''' +No NUMA library (development package) found, yet DPDK configured for multiple NUMA nodes. +Please install libnuma, or set 'max_numa_nodes' option to '1' to build without NUMA support. +''') +endif # set the install path for the drivers dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path) -- 2.39.2