From patchwork Mon Jun 12 16:21:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 128511 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3312442C50; Mon, 12 Jun 2023 18:21:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CA9B42B8E; Mon, 12 Jun 2023 18:21:19 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 051F140698 for ; Mon, 12 Jun 2023 18:21:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686586877; x=1718122877; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ppTtWLIDDhvRVck7wc/qKql3Dsr8lAITzWCyabdpBSY=; b=esLCOdwnSNPUIWK+NPUBHRcUEHDWd22VdaDqxb10LhaCNkHWPHhuUTuZ g4TWasNF2Oxwg2WehJh5eF5JQdBCLRzCL3mNrfLV/Wvs3ZBaAW6iAisOU HE9xZI5PJKH4e5rS3oHkeNwAkTAqD6gsex9tVIn6QdHSlR2C65tqDvFgf 6q+abGP+JtX7/1Z6PGLLB9y1eKBlx6xozZc0+WjglnSwZ2PGlpzoWoniZ IvWvAWzWOeXDGIT60fgIC5TywTpnOgateV1xnda7kkgnr5g9883lN1TIm 5FNQ5i/EJ/cU0k1kC1tx2+bEwdhJ4ALTFsPimd36gkIrD7zxHh0tX+UHf A==; X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="337726752" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="337726752" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 09:21:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="801076199" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="801076199" Received: from silpixa00401385.ir.intel.com ([10.237.214.11]) by FMSMGA003.fm.intel.com with ESMTP; 12 Jun 2023 09:21:15 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 2/2] build: prevent accidentally building without NUMA support Date: Mon, 12 Jun 2023 17:21:04 +0100 Message-Id: <20230612162104.170749-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230612162104.170749-1-bruce.richardson@intel.com> References: <20230612162104.170749-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 error 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. [1] https://doc.dpdk.org/guides-23.03/linux_gsg/sys_reqs.html Signed-off-by: Bruce Richardson --- config/meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/meson.build b/config/meson.build index 8aebccbbdc..bffd3600c6 100644 --- a/config/meson.build +++ b/config/meson.build @@ -381,6 +381,12 @@ endif if not dpdk_conf.has('RTE_MAX_NUMA_NODES') error('Number of NUMA nodes not specified.') endif +if not meson.is_cross_build() and dpdk_conf.get('RTE_MAX_NUMA_NODES') > 1 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)