mirror of
https://github.com/spdk/dpdk.git
synced 2026-10-08 06:11:28 +00:00
spdk-21.05
mlx5 common library checks if several symbols/definitions
are presented in system header files. If some are not
presented, they will be enabled by mlx5_glue library.
The problem appears with clang and '-Werror' - code
generated by meson is not compiled due to unused variable:
Code:
#include <infiniband/mlx5dv.h>
int main(void) {
/* If it's not defined as a macro, try to use as a symbol */
#ifndef mlx5dv_create_flow_action_packet_reformat
mlx5dv_create_flow_action_packet_reformat;
#endif
return 0;
}
Compiler stdout:
Compiler stderr:
/hpc/local/work/alexeymar/repo/spdk/dpdk/build-tmp/meson-private/tmp5obnak86/testfile.c:6:17: error: expression result unused [-Werror,-Wunused-value]
mlx5dv_create_flow_action_packet_reformat;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As result, almost all symbols are enabled in mlx5_glue while
they exist is system headers. As result, we get multiple
symbols redefenitions when we compile mlx5_common.
As a solution for this problem we can suppress
-Wunused-vaurable using pragma
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I03ba5d03f7e53d8e593a9de1deace5140c67d21d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/dpdk/+/8795
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.4%
Python
0.3%
Shell
0.1%