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 3E1D4A00C2; Sun, 30 Oct 2022 12:09:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 322CA42B70; Sun, 30 Oct 2022 12:09:20 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 0BECB42905 for ; Sun, 30 Oct 2022 12:09:18 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BA5B95C00B9; Sun, 30 Oct 2022 07:09:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 30 Oct 2022 07:09:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1667128157; x=1667214557; bh=ja VSCHNBCGSydmgD6rSicAwcqkLT8NKAhpR+6+nWhpw=; b=K1A54kSvKkV/okvYdJ MzROFfOBFN7Wyth8LU3xnIfbYYLq3rQvzOu8zp6ID35YGTFy7mXaCD0uMkPABHFK rj/9iJj04rI+dtd2bcGVniuXLGdZ+7/qjCDiYbtR9hrkAwd4m2ciC7FU8uGvGx28 qmmM+WpNMku5cRdJhLqMu4oqdsqMjJt4TaPTkojQdC9TPKJSlNn8VQNzp1cwR3X0 vq6Luw+1QllnXIKA9xPXwo4YGFXqqFAa8fDitY6dpYW5ryK56/T6RNk3x+LXPjFZ QjEfAbLR3IUhLmnPgKl3y6DStI8nb02mEFe8Vtn+ZS2K7fCAR2W/x8YcwRQm6qQ2 ibwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1667128157; x=1667214557; bh=jaVSCHNBCGSyd mgD6rSicAwcqkLT8NKAhpR+6+nWhpw=; b=JxwsiRVG5TELZ6pcT2hkJNuBQRnfg kplYhSbN1zynChaYTRd46DHwCAHujPIDS7zH9aNDdlJtOzyWEWC8VHJuepK5taiD r0yQHbAne03LIbjS7WTNar5i66g/b1/a/3LJuwBqLIrwlfLE/TGXnlYIhq+Z+iQD wP+RSeVJsRLVGI0ExmpEjAUiJRp1PIxUshpxoH96t8bKRRDjWFZSg35oYKSX22nw teiBaIvcLVky151dnvC6izeU+8Zoz68XmZTjGZnh6LaT1L1WL+XOlu3YdtLDXwC8 jiz7FwYCZBiQGHMHGwKRNFWlhdwnsO2xumi8ZlrZsJTexpQiyfyZ04ing== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedruddtgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdejhfdugeehvddtieejieegteeuudfgjeeukeeiledthfetveek hefhieelhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 30 Oct 2022 07:09:16 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: valex@nvidia.com, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, rasland@nvidia.com, david.marchand@redhat.com, Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH v3 2/2] common/mlx5: move build config initialization and check Date: Sun, 30 Oct 2022 12:08:26 +0100 Message-Id: <20221030110827.1994953-3-thomas@monjalon.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221030110827.1994953-1-thomas@monjalon.net> References: <20221030110827.1994953-1-thomas@monjalon.net> 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 The variable mlx5_config may be used by other mlx5 drivers and should be always initialized. By moving its initialization (with configuration file generation), it is made consistent for Linux and Windows builds. And the check of mlx5_config in net/mlx5 is moved at the top of net/mlx5/hws/meson.build so HWS requirements are in the right context. Signed-off-by: Thomas Monjalon Tested-by: Andrew Rybchenko Reviewed-by: David Marchand Acked-by: Matan Azrad --- drivers/common/mlx5/linux/meson.build | 3 +-- drivers/common/mlx5/meson.build | 2 ++ drivers/common/mlx5/windows/meson.build | 4 ---- drivers/net/mlx5/hws/meson.build | 4 ++++ drivers/net/mlx5/meson.build | 4 +--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build index 84e2a1ad8c..7e1575efc8 100644 --- a/drivers/common/mlx5/linux/meson.build +++ b/drivers/common/mlx5/linux/meson.build @@ -8,7 +8,6 @@ dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen') LIB_GLUE_BASE = 'librte_common_mlx5_glue.so' LIB_GLUE_VERSION = abi_version LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION -mlx5_config = configuration_data() if dlopen_ibverbs dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1) cflags += [ @@ -232,7 +231,6 @@ foreach arg:has_member_args file_prefix = '#include <' + arg[1] + '>' mlx5_config.set(arg[0], cc.has_member(arg[2], arg[3], prefix : file_prefix, dependencies: libs)) endforeach -configure_file(output : 'mlx5_autoconf.h', configuration : mlx5_config) # Build Glue Library if dlopen_ibverbs @@ -243,6 +241,7 @@ if dlopen_ibverbs dlopen_install_dir = [ eal_pmd_path + '-glue' ] dlopen_includes = [global_inc] dlopen_includes += include_directories('../../../../lib/eal/include/generic') + dlopen_includes += include_directories('..') shared_lib = shared_library( dlopen_lib_name, dlopen_sources, diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build index 6ddbde7e8f..60ccd95cbc 100644 --- a/drivers/common/mlx5/meson.build +++ b/drivers/common/mlx5/meson.build @@ -37,4 +37,6 @@ else cflags += [ '-UPEDANTIC' ] endif +mlx5_config = configuration_data() subdir(exec_env) +configure_file(output: 'mlx5_autoconf.h', configuration: mlx5_config) diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build index edbbaa9ae1..cc486014a8 100644 --- a/drivers/common/mlx5/windows/meson.build +++ b/drivers/common/mlx5/windows/meson.build @@ -39,7 +39,3 @@ if get_option('buildtype').contains('debug') else cflags += [ '-UPEDANTIC' ] endif - -# Generate an empty mlx5_autoconf.h file for compatibility with Linux -config = configuration_data() -configure_file(output : 'mlx5_autoconf.h', configuration : config) diff --git a/drivers/net/mlx5/hws/meson.build b/drivers/net/mlx5/hws/meson.build index d2bb864fd2..38776d5163 100644 --- a/drivers/net/mlx5/hws/meson.build +++ b/drivers/net/mlx5/hws/meson.build @@ -1,6 +1,10 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 NVIDIA Corporation & Affiliates +if not (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false)) + subdir_done() +endif + includes += include_directories('.') sources += files( 'mlx5dr_context.c', diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index fa15158039..f1aab18f82 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -78,6 +78,4 @@ testpmd_sources += files('mlx5_testpmd.c') subdir(exec_env) -if (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false)) - subdir('hws') -endif +subdir('hws') -- 2.36.1