On Tue, 2 Nov 2021 10:54:59 +0000 "Ananyev, Konstantin" <konstantin.anan...@intel.com> wrote:
> > > 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. > > > 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.anan...@intel.com> > > > > Wouldn't it be better to fail compiling a program using unimplemented calls > > rather than forcing the user to see a failure later? > > You mean to keep things as they are right now? > That way we'll have to put #ifdef RTE_PORT_PCAP around every call to > bpf_convert(). > Doesn't look like a good thing to me. > Also in other places we use similar approach: if HW/SW is not available > provide > a dummy implementation that will report an error. Is there a way to do both, return an error and report a warning in the build?