]> git.droids-corp.org - dpdk.git/commit
bpf: fix convert API when libpcap missing
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Wed, 3 Nov 2021 11:17:47 +0000 (11:17 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Nov 2021 18:56:20 +0000 (19:56 +0100)
commit65d9b7c664cc8cc090ced1c3260d803f306a2bba
tree7dbe42d627974e740cac413828d71244a36f3a4b
parent7b0a120157504f20019a26229506b92963e3e146
bpf: fix convert API when libpcap missing

rte_bpf_convert() implementation depends on libpcap.
Right now it is defined only when this library is installed and
RTE_PORT_PCAP is defined.
Fix that by providing for such case stub rte_bpf_convert()
implementation that will always return an error.
To draw user attention, if proper implementation is disabled,
warning will be thrown at meson configure stage.
Also move stub for another function (rte_bpf_elf_load) into
the same place (bpf_stub.c).

Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
app/dumpcap/main.c
lib/bpf/bpf_load.c
lib/bpf/bpf_stub.c [new file with mode: 0644]
lib/bpf/meson.build
lib/bpf/rte_bpf.h