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 44B9EA00C2; Sun, 30 Oct 2022 12:09:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3461542B6C; Sun, 30 Oct 2022 12:09:13 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id C5EAF42905 for ; Sun, 30 Oct 2022 12:09:11 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6FF885C00B9; Sun, 30 Oct 2022 07:09:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 30 Oct 2022 07:09:11 -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=1667128151; x=1667214551; bh=Cu gQIlfbabHdZdi7pVEUW9Q8ebmrFhLdvrcEwjKMX4c=; b=zJAb8sQZ8KkO+aAfgn iNuoj8KuuZiEF84CEuZgo2qx7QlpkEo08Msxt3qkVN5Tc0BUH0JkMY+7RFDUSoFw YZWZMbYDs8G2tM5DLu/zngSO6/MnIcNp0o5+TuIy96G5zoAiF9sx4lgtfEHBmd+N JVITiFl9nspbLwCqg9lpedbsUvt10ikbAckm0PXOm9txiHYSpesSnmMtLg+1kymF Lu2VZ6NILVSz3sE6OBnNH9Tliqc1EmGTp3w9ns+hS7LT4VrC5pWOj67P4Ai+gk1Y 61TP0wNciXcOc/W3/8yB39Fi8i4sayhZE8ohOVLRbh56FFh9jr8cCy9COU7+SA9D eM4g== 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=1667128151; x=1667214551; bh=CugQIlfbabHdZ di7pVEUW9Q8ebmrFhLdvrcEwjKMX4c=; b=mwCSyaR0PwugpqF36+BpJ2kokWqXI J0KdzWZMADH0OSHep7rX/x/lLrT0a6C/NYHAYaizJ47uaHrkduN4akiEOYzYeHY3 zyzgIBYgUCHOgNaxK/8uOz9m2zAo0Q/D8K4l2NkE642tbPC+DbodCqPQ+tXUlHyc r5zr4prLH9kGQN8CQ2eB3M/Xs3lJmSYNRcMGbjzg1LKS0akYwBoice1tKE3Q7PXt VEQ6MyI44VJqeyD+9GiXWOAvVO97xL8j9D714ObCdBLEafsNrwecYbyP/kNtfO4T Vprtf6sHrLEtFM515F4OOSTYf/zz3Y2JwnzaLed6rVg/u6I4kcEvtu7VQ== 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:09 -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 , Fan Zhang , Ashish Gupta , Viacheslav Ovsiienko , Ori Kam Subject: [PATCH v3 1/2] common/mlx5: fix build disabling Date: Sun, 30 Oct 2022 12:08:25 +0100 Message-Id: <20221030110827.1994953-2-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 If the dependency common/mlx5 is explicitly disabled, but net/mlx5 is not explicitly disabled, Meson will read the full recipe of net/mlx5 and will fail when accessing a variable from common/mlx5: drivers/net/mlx5/meson.build:76:4: ERROR: Unknown variable "mlx5_config". The solution is to stop parsing net/mlx5 if common/mlx5 is disabled. The deps array must be defined before stopping, in order to automatically disable the build of net/mlx5 and print the reason. The same protection is applied to other mlx5 drivers, so it will allow using the variable mlx5_config in future. Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering") Reported-by: Andrew Rybchenko Signed-off-by: Thomas Monjalon Tested-by: Andrew Rybchenko Reviewed-by: David Marchand Acked-by: Matan Azrad --- drivers/compress/mlx5/meson.build | 5 +++++ drivers/crypto/mlx5/meson.build | 5 +++++ drivers/net/mlx5/meson.build | 5 +++++ drivers/regex/mlx5/meson.build | 5 +++++ drivers/vdpa/mlx5/meson.build | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build index 7aac329986..49ce3aff46 100644 --- a/drivers/compress/mlx5/meson.build +++ b/drivers/compress/mlx5/meson.build @@ -9,6 +9,11 @@ endif fmt_name = 'mlx5_compress' deps += ['common_mlx5', 'eal', 'compressdev'] +if not ('mlx5' in common_drivers) + # avoid referencing undefined variables from common/mlx5 + subdir_done() +endif + sources = files( 'mlx5_compress.c', ) diff --git a/drivers/crypto/mlx5/meson.build b/drivers/crypto/mlx5/meson.build index 9d9c9c00bc..7521c4c671 100644 --- a/drivers/crypto/mlx5/meson.build +++ b/drivers/crypto/mlx5/meson.build @@ -9,6 +9,11 @@ endif fmt_name = 'mlx5_crypto' deps += ['common_mlx5', 'eal', 'cryptodev'] +if not ('mlx5' in common_drivers) + # avoid referencing undefined variables from common/mlx5 + subdir_done() +endif + sources = files( 'mlx5_crypto.c', 'mlx5_crypto_dek.c', diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index ff84448186..fa15158039 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -9,6 +9,11 @@ if not (is_linux or is_windows) endif deps += ['hash', 'common_mlx5'] +if not ('mlx5' in common_drivers) + # avoid referencing undefined variables from common/mlx5 + subdir_done() +endif + headers = files('rte_pmd_mlx5.h') sources = files( 'mlx5.c', diff --git a/drivers/regex/mlx5/meson.build b/drivers/regex/mlx5/meson.build index e553dcb83d..70edc5b6da 100644 --- a/drivers/regex/mlx5/meson.build +++ b/drivers/regex/mlx5/meson.build @@ -8,6 +8,11 @@ if not is_linux endif deps += ['common_mlx5', 'eal', 'regexdev'] +if not ('mlx5' in common_drivers) + # avoid referencing undefined variables from common/mlx5 + subdir_done() +endif + sources = files( 'mlx5_regex.c', 'mlx5_rxp.c', diff --git a/drivers/vdpa/mlx5/meson.build b/drivers/vdpa/mlx5/meson.build index 9d8dbb1a82..54a4eac6f4 100644 --- a/drivers/vdpa/mlx5/meson.build +++ b/drivers/vdpa/mlx5/meson.build @@ -8,6 +8,11 @@ if not is_linux endif deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched'] +if not ('mlx5' in common_drivers) + # avoid referencing undefined variables from common/mlx5 + subdir_done() +endif + sources = files( 'mlx5_vdpa.c', 'mlx5_vdpa_mem.c', -- 2.36.1