summaryrefslogtreecommitdiffstats
path: root/drivers/net/tap/meson.build
blob: 9cb7142a0901f03af3adfcb0686e92520747438f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 Luca Boccassi <bluca@debian.org>

if host_machine.system() != 'linux'
        build = false
endif
sources = files(
	'rte_eth_tap.c',
	'tap_bpf_api.c',
	'tap_flow.c',
	'tap_intr.c',
	'tap_netlink.c',
	'tap_tcmsgs.c',
)

deps = ['bus_vdev', 'gso', 'hash']

cflags += '-DTAP_MAX_QUEUES=16'

# To maintain the compatibility with the make build system
# tap_autoconf.h file is still generated.
# input array for meson symbol search:
# [ "MACRO to define if found", "header for the search",
#   "enum/define", "symbol to search" ]
#
args = [
	[ 'HAVE_TC_FLOWER', 'linux/pkt_cls.h',
	  'TCA_FLOWER_UNSPEC' ],
	[ 'HAVE_TC_VLAN_ID', 'linux/pkt_cls.h',
	  'TCA_FLOWER_KEY_VLAN_PRIO' ],
	[ 'HAVE_TC_BPF', 'linux/pkt_cls.h',
	  'TCA_BPF_UNSPEC' ],
	[ 'HAVE_TC_BPF_FD', 'linux/pkt_cls.h',
	  'TCA_BPF_FD' ],
	[ 'HAVE_TC_ACT_BPF', 'linux/tc_act/tc_bpf.h',
	  'TCA_ACT_BPF_UNSPEC' ],
	[ 'HAVE_TC_ACT_BPF_FD', 'linux/tc_act/tc_bpf.h',
	  'TCA_ACT_BPF_FD' ],
]
config = configuration_data()
allow_experimental_apis = true
foreach arg:args
	config.set(arg[0], cc.has_header_symbol(arg[1], arg[2]))
endforeach
configure_file(output : 'tap_autoconf.h', configuration : config)