f-stack/dpdk/drivers/net/tap/meson.build

38 lines
1.1 KiB
Meson
Raw Normal View History

2019-06-25 11:12:58 +00:00
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 Luca Boccassi <bluca@debian.org>
2020-06-18 16:55:50 +00:00
if not is_linux
2022-09-06 04:00:10 +00:00
build = false
reason = 'only supported on Linux'
2019-06-25 11:12:58 +00:00
endif
sources = files(
2022-09-06 04:00:10 +00:00
'rte_eth_tap.c',
'tap_bpf_api.c',
'tap_flow.c',
'tap_intr.c',
'tap_netlink.c',
'tap_tcmsgs.c',
2019-06-25 11:12:58 +00:00
)
deps = ['bus_vdev', 'gso', 'hash']
cflags += '-DTAP_MAX_QUEUES=16'
# input array for meson symbol search:
# [ "MACRO to define if found", "header for the search",
# "enum/define", "symbol to search" ]
#
args = [
2022-09-06 04:00:10 +00:00
[ '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' ],
2019-06-25 11:12:58 +00:00
]
config = configuration_data()
foreach arg:args
2022-09-06 04:00:10 +00:00
config.set(arg[0], cc.has_header_symbol(arg[1], arg[2]))
2019-06-25 11:12:58 +00:00
endforeach
configure_file(output : 'tap_autoconf.h', configuration : config)