On Tue, Mar 15, 2022 at 3:44 PM Lorenzo Bianconi <lorenzo.bianconi@xxxxxxxxxx> wrote: > > > On Tue, Mar 15, 2022 at 4:06 AM Lorenzo Bianconi <lorenzo@xxxxxxxxxx> wrote: > > > > > > Rely on the libbpf skeleton facility and other utilities provided by XDP > > > sample helpers in xdp_router_ipv4 sample. > > > > > > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx> > > > --- > > > samples/bpf/Makefile | 9 +- > > > samples/bpf/xdp_router_ipv4.bpf.c | 180 +++++++++++ > > > samples/bpf/xdp_router_ipv4_kern.c | 186 ------------ > > > > hm... git should be able to record this as a rename and the result > > patch will be much smaller, only showing what really changed. Can you > > check where this went wrong? > > I am not so familiar with git internal, but I think it depends on the similarity > between the "old" and "new" files. If they are very different (like in this case), > git will report the "old" file as remove and the creation of the "new" one. > I guess you can try to do "git mv" a given file and overwrite it with a > different one. Am I missing something? I assumed there are only pretty minimal changes inside xdp_router_ipv4.bpf.c, tbh. Hard to see when it's two separate files (which was exactly the point with file rename tracking). Oh well, that's ok. > > > > > Please also add libbpf_set_strict_mode(LIBBPF_STRICT_ALL) to enable > > stricter "libbpf 1.0" mode. Thanks! > > ack, I will add it in v2. > > Regards, > Lorenzo > > > > > > samples/bpf/xdp_router_ipv4_user.c | 462 ++++++++++++----------------- > > > 4 files changed, 377 insertions(+), 460 deletions(-) > > > create mode 100644 samples/bpf/xdp_router_ipv4.bpf.c > > > delete mode 100644 samples/bpf/xdp_router_ipv4_kern.c > > > > > > > [...] > >