3df380f617
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: 22681deead
("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>
Acked-by: Alex Vesker <valex@nvidia.com>
34 lines
750 B
Meson
34 lines
750 B
Meson
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright (c) 2021 NVIDIA Corporation & Affiliates
|
|
|
|
if not (is_linux or is_windows)
|
|
build = false
|
|
reason = 'only supported on Linux and Windows'
|
|
subdir_done()
|
|
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',
|
|
)
|
|
|
|
cflags_options = [
|
|
'-std=c11',
|
|
'-Wno-strict-prototypes',
|
|
'-D_BSD_SOURCE',
|
|
'-D_DEFAULT_SOURCE',
|
|
'-D_XOPEN_SOURCE=600',
|
|
]
|
|
foreach option:cflags_options
|
|
if cc.has_argument(option)
|
|
cflags += option
|
|
endif
|
|
endforeach
|