xref: /dpdk/drivers/net/tap/meson.build (revision e5f7bd19)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright 2018 Luca Boccassi <[email protected]>
3
4if not is_linux
5        build = false
6endif
7sources = files(
8	'rte_eth_tap.c',
9	'tap_bpf_api.c',
10	'tap_flow.c',
11	'tap_intr.c',
12	'tap_netlink.c',
13	'tap_tcmsgs.c',
14)
15
16deps = ['bus_vdev', 'gso', 'hash']
17
18cflags += '-DTAP_MAX_QUEUES=16'
19
20# To maintain the compatibility with the make build system
21# tap_autoconf.h file is still generated.
22# input array for meson symbol search:
23# [ "MACRO to define if found", "header for the search",
24#   "enum/define", "symbol to search" ]
25#
26args = [
27	[ 'HAVE_TC_FLOWER', 'linux/pkt_cls.h',
28	  'TCA_FLOWER_UNSPEC' ],
29	[ 'HAVE_TC_VLAN_ID', 'linux/pkt_cls.h',
30	  'TCA_FLOWER_KEY_VLAN_PRIO' ],
31	[ 'HAVE_TC_BPF', 'linux/pkt_cls.h',
32	  'TCA_BPF_UNSPEC' ],
33	[ 'HAVE_TC_BPF_FD', 'linux/pkt_cls.h',
34	  'TCA_BPF_FD' ],
35	[ 'HAVE_TC_ACT_BPF', 'linux/tc_act/tc_bpf.h',
36	  'TCA_ACT_BPF_UNSPEC' ],
37	[ 'HAVE_TC_ACT_BPF_FD', 'linux/tc_act/tc_bpf.h',
38	  'TCA_ACT_BPF_FD' ],
39]
40config = configuration_data()
41allow_experimental_apis = true
42foreach arg:args
43	config.set(arg[0], cc.has_header_symbol(arg[1], arg[2]))
44endforeach
45configure_file(output : 'tap_autoconf.h', configuration : config)
46