xref: /dpdk/drivers/net/mlx5/meson.build (revision da7f82b0af62649612979f6f944ca0fdd8148c4e)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright 2018 6WIND S.A.
3# Copyright 2018 Mellanox Technologies, Ltd
4
5if not (is_linux or is_windows)
6    build = false
7    reason = 'only supported on Linux and Windows'
8    subdir_done()
9endif
10
11deps += ['hash', 'common_mlx5']
12if not dpdk_conf.has('RTE_COMMON_MLX5')
13    # avoid referencing undefined variables from common/mlx5
14    subdir_done()
15endif
16
17headers = files('rte_pmd_mlx5.h')
18sources = files(
19        'mlx5.c',
20        'mlx5_ethdev.c',
21        'mlx5_flow.c',
22        'mlx5_flow_meter.c',
23        'mlx5_flow_dv.c',
24        'mlx5_flow_aso.c',
25        'mlx5_flow_flex.c',
26        'mlx5_mac.c',
27        'mlx5_rss.c',
28        'mlx5_rx.c',
29        'mlx5_rxmode.c',
30        'mlx5_rxq.c',
31        'mlx5_rxtx.c',
32        'mlx5_stats.c',
33        'mlx5_trigger.c',
34        'mlx5_trace.c',
35        'mlx5_tx.c',
36        'mlx5_tx_empw.c',
37        'mlx5_tx_mpw.c',
38        'mlx5_tx_nompw.c',
39        'mlx5_tx_txpp.c',
40        'mlx5_txq.c',
41        'mlx5_txpp.c',
42        'mlx5_vlan.c',
43        'mlx5_utils.c',
44        'mlx5_devx.c',
45        'mlx5_nta_rss.c',
46)
47
48if is_linux
49    sources += files(
50            'mlx5_flow_geneve.c',
51            'mlx5_flow_hw.c',
52            'mlx5_hws_cnt.c',
53            'mlx5_flow_quota.c',
54            'mlx5_flow_verbs.c',
55            'mlx5_nta_split.c',
56    )
57endif
58
59if is_windows or (mlx5_config.get('HAVE_INFINIBAND_VERBS_H', false) and
60        not mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
61    sources += files(
62            'mlx5_flow_hw_stubs.c',
63    )
64endif
65
66if is_linux and (dpdk_conf.has('RTE_ARCH_X86_64')
67              or dpdk_conf.has('RTE_ARCH_ARM64')
68              or dpdk_conf.has('RTE_ARCH_PPC_64'))
69    sources += files('mlx5_rxtx_vec.c')
70else
71    sources += files('mlx5_rxtx_vec_null.c')
72endif
73
74cflags_options = [
75        '-std=c11',
76        '-Wno-strict-prototypes',
77        '-D_BSD_SOURCE',
78        '-D_DEFAULT_SOURCE',
79        '-D_XOPEN_SOURCE=600',
80]
81foreach option:cflags_options
82    if cc.has_argument(option)
83        cflags += option
84    endif
85endforeach
86if get_option('buildtype').contains('debug')
87    cflags += [ '-pedantic', '-DPEDANTIC' ]
88else
89    cflags += [ '-UPEDANTIC' ]
90endif
91
92require_iova_in_mbuf = false
93
94testpmd_sources += files('mlx5_testpmd.c')
95
96subdir(exec_env)
97
98subdir('hws')
99
100annotate_locks = false
101