DPDK patches and discussions
 help / color / mirror / Atom feed
From: Alex Vesker <valex@nvidia.com>
To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
	"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
	Raslan Darawsheh <rasland@nvidia.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	Matan Azrad <matan@nvidia.com>,
	Fan Zhang <royzhang1980@gmail.com>,
	Ashish Gupta <ashish.gupta@marvell.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	Ori Kam <orika@nvidia.com>
Subject: RE: [PATCH v3 1/2] common/mlx5: fix build disabling
Date: Sun, 30 Oct 2022 13:33:56 +0000	[thread overview]
Message-ID: <DM4PR12MB51506C4CCB5C7D5B7ABF4D4BCE349@DM4PR12MB5150.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20221030110827.1994953-2-thomas@monjalon.net>



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Sunday, October 30, 2022 1:08 PM
> To: dev@dpdk.org
> Cc: Alex Vesker <valex@nvidia.com>; ferruh.yigit@amd.com;
> andrew.rybchenko@oktetlabs.ru; Raslan Darawsheh <rasland@nvidia.com>;
> david.marchand@redhat.com; Matan Azrad <matan@nvidia.com>; Fan
> Zhang <royzhang1980@gmail.com>; Ashish Gupta
> <ashish.gupta@marvell.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;
> Ori Kam <orika@nvidia.com>
> Subject: [PATCH v3 1/2] common/mlx5: fix build disabling
> 
> 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 <andrew.rybchenko@oktetlabs.ru>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  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

Acked-by: Alex Vesker <valex@nvidia.com>

  reply	other threads:[~2022-10-30 13:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29  9:05 DPDK main build is broken for me in net/mlx5 if I disable common/mlx5 Andrew Rybchenko
2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
2022-10-29 23:17   ` [PATCH 1/2] net/mlx5: fix disabling common/mlx5 dependency Thomas Monjalon
2022-10-29 23:17   ` [PATCH 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
2022-10-30  7:34   ` [PATCH 0/2] fix build disabling common/mlx5 Andrew Rybchenko
2022-10-30  8:27 ` [PATCH v2 " Thomas Monjalon
2022-10-30  8:27   ` [PATCH v2 1/2] common/mlx5: fix build disabling Thomas Monjalon
2022-10-30  9:16     ` Matan Azrad
2022-11-02 12:10     ` Bruce Richardson
2022-11-02 12:29       ` Thomas Monjalon
2022-11-02 13:14         ` Bruce Richardson
2022-11-02 13:17           ` Thomas Monjalon
2022-11-07 16:37           ` [PATCH] common/mlx5: use build configuration dictionary Thomas Monjalon
2022-11-07 17:07             ` Bruce Richardson
2022-11-08  7:51             ` David Marchand
2022-11-14 10:31               ` David Marchand
2022-10-30  8:27   ` [PATCH v2 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
2022-10-30  9:16     ` Matan Azrad
2022-10-30  9:14   ` [PATCH v2 0/2] fix build disabling common/mlx5 David Marchand
2022-10-30 11:08 ` [PATCH v3 " Thomas Monjalon
2022-10-30 11:08   ` [PATCH v3 1/2] common/mlx5: fix build disabling Thomas Monjalon
2022-10-30 13:33     ` Alex Vesker [this message]
2022-10-30 11:08   ` [PATCH v3 2/2] common/mlx5: move build config initialization and check Thomas Monjalon
2022-10-30 13:34     ` Alex Vesker
2022-10-30 15:12   ` [PATCH v3 0/2] fix build disabling common/mlx5 Thomas Monjalon

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=DM4PR12MB51506C4CCB5C7D5B7ABF4D4BCE349@DM4PR12MB5150.namprd12.prod.outlook.com \
    --to=valex@nvidia.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=ashish.gupta@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=royzhang1980@gmail.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /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).