[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a42a6a91-53fa-5b31-4bba-273847ee8986@gmail.com>
Date: Fri, 13 Nov 2020 20:24:41 -0700
From: David Ahern <dsahern@...il.com>
To: Hangbin Liu <haliu@...hat.com>,
Stephen Hemminger <stephen@...workplumber.org>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
David Miller <davem@...emloft.net>,
Jesper Dangaard Brouer <brouer@...hat.com>,
netdev@...r.kernel.org, bpf@...r.kernel.org,
Jiri Benc <jbenc@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCHv4 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c
On 11/9/20 12:07 AM, Hangbin Liu wrote:
> diff --git a/lib/bpf_glue.c b/lib/bpf_glue.c
> new file mode 100644
> index 00000000..7626a893
> --- /dev/null
> +++ b/lib/bpf_glue.c
...
> +
> +int bpf_program_load(enum bpf_prog_type type, const struct bpf_insn *insns,
> + size_t size_insns, const char *license, char *log,
> + size_t size_log)
> +{
> +#ifdef HAVE_LIBBPF
> + return bpf_load_program(type, insns, size_insns, license, 0, log, size_log);
> +#else
> + return bpf_load_load_dev(type, insns, size_insns, license, 0, log, size_log);
> +#endif
> +}
> +
Fails to compile:
$ LIBBPF_FORCE=off ./configure
$ make
...
/usr/bin/ld: ../lib/libutil.a(bpf_glue.o): in function `bpf_program_load':
bpf_glue.c:(.text+0x13): undefined reference to `bpf_load_load_dev'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:27: ip] Error 1
make: *** [Makefile:64: all] Error 2
Powered by blists - more mailing lists