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