Re: [PATCHv4 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c

2020-11-15 Thread Hangbin Liu
On Fri, Nov 13, 2020 at 08:24:41PM -0700, David Ahern wrote: > 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 ..7626a893 > > --- /dev/null > > +++ b/lib/bpf_glue.c > > ... > > > + > > +int bpf_program_load(enum b

Re: [PATCHv4 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c

2020-11-13 Thread David Ahern
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 ..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_i

[PATCHv4 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c

2020-11-08 Thread Hangbin Liu
This is a preparation for later main libbpf support in iproute2. bpf.c is moved to bpf_legacy.c first. A new file bpf_glue.c is added which could call both legacy libbpf code. There are two wrapper functions added for ipvrf. Function bpf_prog_load() is removed as it's conflict with libbpf function