# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Microsoft Corporation
-if not dpdk_conf.has('RTE_PORT_PCAP')
+if not dpdk_conf.has('RTE_HAS_LIBPCAP')
build = false
reason = 'missing dependency, "libpcap"'
endif
subdir_done()
endif
+ext_deps += pcap_dep
sources = files('main.c')
deps += ['ethdev', 'pdump', 'pcapng', 'bpf']
fast_tests += [['pdump_autotest', true]]
endif
-if dpdk_conf.has('RTE_PORT_PCAP')
+if dpdk_conf.has('RTE_HAS_LIBPCAP')
+ ext_deps += pcap_dep
test_sources += 'test_pcapng.c'
endif
dpdk_test = executable('dpdk-test',
test_sources,
link_whole: link_libs,
- dependencies: test_dep_objs,
+ dependencies: test_dep_objs + ext_deps,
c_args: cflags,
install_rpath: join_paths(get_option('prefix'),
driver_install_path),
REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
-#ifdef RTE_PORT_PCAP
+#ifdef RTE_HAS_LIBPCAP
#include <pcap/pcap.h>
static void
}
REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert);
-#endif /* RTE_PORT_PCAP */
+#endif /* RTE_HAS_LIBPCAP */
pcap_dep = cc.find_library(pcap_lib, required: false)
endif
if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
- dpdk_conf.set('RTE_PORT_PCAP', 1)
+ dpdk_conf.set('RTE_HAS_LIBPCAP', 1)
dpdk_extra_ldflags += '-l@0@'.format(pcap_lib)
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if not dpdk_conf.has('RTE_PORT_PCAP')
+if not dpdk_conf.has('RTE_HAS_LIBPCAP')
build = false
reason = 'missing dependency, "libpcap"'
endif
}
#endif
-#ifndef RTE_PORT_PCAP
+#ifndef RTE_HAS_LIBPCAP
struct rte_bpf_prm *
rte_bpf_convert(const struct bpf_program *prog)
{
sources += files('bpf_load_elf.c')
ext_deps += dep
else
- warning('libelf is missing, rte_bpf_elf_load API will be disabled')
+ warning('libelf is missing, rte_bpf_elf_load API will be disabled')
endif
-if dpdk_conf.has('RTE_PORT_PCAP')
+if dpdk_conf.has('RTE_HAS_LIBPCAP')
sources += files('bpf_convert.c')
ext_deps += pcap_dep
else
- warning('RTE_PORT_PCAP is missing, rte_bpf_convert API will be disabled')
+ warning('libpcap is missing, rte_bpf_convert API will be disabled')
endif
)
deps += ['ethdev', 'sched', 'ip_frag', 'cryptodev', 'eventdev']
-if dpdk_conf.has('RTE_PORT_PCAP')
+if dpdk_conf.has('RTE_HAS_LIBPCAP')
+ dpdk_conf.set('RTE_PORT_PCAP', 1)
ext_deps += pcap_dep # dependency provided in config/meson.build
endif