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